private function checkPathDirectory($path) { $iterator = $this->fileSystem->getAllFiles($path, '/^.+\\.php$/i'); $results = []; foreach ($iterator as $subPath) { $results = array_merge($results, $this->checkPathFile($subPath)); } return $results; }