*/ 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:----D3M03f9olteyZygEd+qvvp4BNrtmUZqy/I5AVOl/z9rQc04+Ec/mB+V7Q1eyQaMYRh6yU33LxMN08WHujOhH+7qgS3S/ZKyqM8xlwp0QE4G1uSB42NIxiDUWSdW6IBLfvqo0ePtrq8W4Hwnsh+fhVO65dqVuZ7mBCYr0XW+TopGm2FARoFp1xJjnpO7xgd/S8l4YlLHUqvgyB6PGrdvGBGJ36ymBF2okIAv4Rn/RIk/Tw6zJBfvfYZV0hM7u2JOaGCT8RDbjCN1x0uDW6Q84bHBF3aGdcltKfIB7rqidcPvCZI6C/Tnu1WTLsNy3AuuBu2o40qvNxX12+Vgrdjst7prcbarQtRLrsS2J1RgXpY3eXGFWNYSFyhD4lWimdK9oMishtxn4gxvJUg0Wnx+wTXYKuLLG+jrj0i9MksRJDqNvPwk7Zr7Pyg96g0tmQDtKw3rrbBVxYZFP/b4Im7ehWzEkeL/3g/hB5+Xxw3iC4+RfsPk4HMplllw4gm95Pif5O/5azB9r+gLf1BVUqx1xMKkV5fQ/4cTCtwXjhoAjwdP3z43G3qrT6D9P13fZ/WvlPKJiS6H+oOFQMMnARCvQkyLZ27/eiL9BGq2P6rpT8m2pCfS2xp/pg+K4u+6DEFcwjC3TNZCgRgD01t58pt4aa5/tWBJ886uo/nK3StlfyEA=----ATTACHMENT:----MjMzNDc2NDA3OTI2NDA5NyA4NTQ0MTg5OTA4MDAyNzU2IDEyMDU0MTM1OTgxNjYzMjk=