File Name Matches Type (ARCH7005)
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Key php.naming.file-name-matches-type · Severity info · Category naming
PSR-4 autoloading requires the file name to match the single top-level type it declares. A mismatch both breaks loading and makes the file hard to locate.
Incorrect
Section titled “Incorrect”<?phpclass PaymentProcessor{ public function charge(int $amount): bool { return true; }}Correct
Section titled “Correct”<?phpclass PaymentProcessor{ public function charge(int $amount): bool { return true; }}Rename the file to match the primary type it declares (PaymentProcessor.php).