Skip to content

Commit

Permalink
Correct file/class name relation in sniff doc
Browse files Browse the repository at this point in the history
Per PR PHPCSStandards#845, the filename must be modified to match the class name,
since class names are much more restrictive than filenames and the
inverse is not always possible.

This clarifies in the example titles that the fix for the invalid code
is to modify the filename rather than the class name.
  • Loading branch information
braindawg committed Mar 7, 2025
1 parent 1e8f5db commit f75039a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Standards/Squiz/Docs/Classes/ClassFileNameStandard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class <em>Foo</em>
}
]]>
</code>
<code title="Invalid: Class name does not match filename.">
<code title="Invalid: Filename does not match class name.">
<![CDATA[
/* ./src/<em>Foo.php</em> contents: */
Expand All @@ -34,7 +34,7 @@ class <em>MyFoo</em>
}
]]>
</code>
<code title="Invalid: Class name case does not match filename case.">
<code title="Invalid: Filename case does not match class name case.">
<![CDATA[
/* ./src/<em>myFoo.php</em> contents: */
Expand Down

0 comments on commit f75039a

Please sign in to comment.