private function getFilesFromSource($source, array $exclude, $fileMasks)
{
if (is_file($source)) {
$foundFiles[$source] = new SplFileInfo($source);
return $foundFiles;
} else {
$finder = Finder::findFiles($fileMasks)->exclude($exclude)->from($source)->exclude($exclude);
return $this->convertFinderToArray($finder);
}
}