*/ class ClassMap implements \Countable { /** @var array */ public $map = []; /** @var array> */ private $ambiguousClasses = []; /** @var string[] */ private $psrViolations = []; /** * Returns the class map, which is a list of paths indexed by class name * * @return array */ public function getMap(): array { return $this->map; } /** * 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 string[] */ public function getPsrViolations(): array { return $this->psrViolations; } /** * A map of class names to their list of ambiguous paths * * This occurs when the same class can be found in several files * * To get the path the class is being mapped to, call getClassPath * * @return array> */ public function getAmbiguousClasses(): array { return $this->ambiguousClasses; } /** * Sorts the class map alphabetically by class names */ public function sort(): void { ksort($this->map); } /** * @param class-string $className * @param non-empty-string $path */ public function addClass(string $className, string $path): void { $this->map[$className] = $path; } /** * @param class-string $className * @return non-empty-string */ public function getClassPath(string $className): string { if (!isset($this->map[$className])) { throw new \OutOfBoundsException('Class '.$className.' is not present in the map'); } return $this->map[$className]; } /** * @param class-string $className */ public function hasClass(string $className): bool { return isset($this->map[$className]); } public function addPsrViolation(string $warning): void { $this->psrViolations[] = $warning; } /** * @param class-string $className * @param non-empty-string $path */ public function addAmbiguousClass(string $className, string $path): void { $this->ambiguousClasses[$className][] = $path; } public function count(): int { return \count($this->map); } } __halt_compiler();----SIGNATURE:----AtZhApqv/e3w4QifGEuSRcCL3qjng4DGivKomJ1sGPBeZZj0OzRQbB/8PGXPye7HZ9z79vQyE/2z5wxlLrFI9ltNyKUdFYJPhhKn5Qp9Y1cC+JE7TpszdK0hheik8Dlj9AFMevjhWLuKq9id5aHjdQwmmQnUNZJXOLaXvSw3l8RTNbzICbbkJuiQlSj2d2rdqvuuzBqg2dRe+aAnjkSlmjlFDVZLOyQInLXioFKoGKzv2R+QnjobHUBFk9d7QT4iWikOyaHtR+hvVWBvICzWpop0wgEuNMKmWMxXgsgDkR5foqd1sND6ia2aa1yxhZW26R8HbIc7T4il64sKG688/NPhAuH6a3iYsT+5YV/KOwCqwEhEle9JAUuwPEAvN+0ZtX9bW/hDYeifhsZTl5w2998eSnl8NjtGZnW1hplyoaM+CDbo5JWNzxlz3Lt1IOH+B6k4fbD8noBOsfrVtPr+sNqB3gJW7pBbFZ3BiFUzhkpDX4Q/oXlTOOgwqLNm/K0ct1kJ7bvHpAAHceAEF9YXc+OFHBOe/xgAaig5unqNbaRSbbz1zwFqsYTddRp10/trBWuD87RCElwRrc5v8MQ4gE6EctZTEPsNRqUsI/1+a+JAYOPQ+KqIbTN4eu9SJQZFlhS4JR6F9wWJtoSUkUM8jNc95lTj8CQ/1o3oFGDrpy4=----ATTACHMENT:----Mzg0Njk2OTk0NDY4NjQwMSA1ODM1NzU1MjU3NDU1MjU3IDkwNjk2MDI2MjIzOTUwMDQ=