static function FileInspector::inspectPhpFile in X Autoload 7.4
Same name and namespace in other branches
- 7.5 src/Discovery/FileInspector.php \Drupal\xautoload\Discovery\FileInspector::inspectPhpFile()
Parameters
string $path:
Return value
string[]
Throws
RuntimeException
1 call to FileInspector::inspectPhpFile()
- ClassMapGenerator::filesToClassmap in lib/
Discovery/ ClassMapGenerator.php
File
- lib/
Discovery/ FileInspector.php, line 14
Class
Namespace
Drupal\xautoload\DiscoveryCode
static function inspectPhpFile($path) {
try {
$contents = php_strip_whitespace($path);
} catch (\Exception $e) {
throw new \RuntimeException('Could not scan for classes inside ' . $path . ": \n" . $e
->getMessage(), 0, $e);
}
return self::inspectFileContents($contents);
}