protected function getFiles(array $files, array $directories): array
    {
        $foundFiles = [];

        /** @var \SplFileInfo $file */
        foreach ($this->getFinder($directories) as $file) {
            if (\count($files) !== 0 && ! \in_array($file->getFilename(), $files, true)) {
                continue;
            }

            $foundFiles[] = $file->getRealPath();
        }

        return $foundFiles;
    }