function Extension::parseInfo
1 call to Extension::parseInfo()
- Extension::getDependencies in vendor/
mglaman/ phpstan-drupal/ src/ Drupal/ Extension.php
File
-
vendor/
mglaman/ phpstan-drupal/ src/ Drupal/ Extension.php, line 226
Class
- Extension
- Defines an extension (file) object.
Namespace
mglaman\PHPStanDrupal\DrupalCode
private function parseInfo() : array {
if (is_array($this->info)) {
return $this->info;
}
$infoContent = file_get_contents(sprintf('%s/%s', $this->root, $this->getPathname()));
if (false === $infoContent) {
throw new RuntimeException(sprintf('Cannot read "%s', $this->getPathname()));
}
return $this->info = Yaml::parse($infoContent);
}