function ClassMap::getPsrViolations
Returns warning strings containing details about PSR-0/4 violations that were detected
Violations are for ex a class which is in the wrong file/directory and thus should not be found using psr-0/psr-4 autoloading but was found by the ClassMapGenerator as it scans all files.
This is only happening when scanning paths using psr-0/psr-4 autoload type. Classmap type always accepts every class as it finds it.
Return value
string[]
File
-
vendor/
composer/ class-map-generator/ src/ ClassMap.php, line 58
Class
- ClassMap
- @author Jordi Boggiano <j.boggiano@seld.be>
Namespace
Composer\ClassMapGeneratorCode
public function getPsrViolations() : array {
if (\count($this->psrViolations) === 0) {
return [];
}
return array_map(static function (array $violation) : string {
return $violation['warning'];
}, array_merge(...array_values($this->psrViolations)));
}