Class File Name

The file name and the name of the class defined within the file must match exactly, including case.

Valid: Defined class name and filename match.

/* ./src/<em>Foo.php</em> contents: */

class <em>Foo</em> { }

Invalid: Filename does not match class name.

/* ./src/<em>Foo.php</em> contents: */

class <em>MyFoo</em> { }

Valid: Class name and filename use the same casing.

/* ./src/<em>MyFoo.php</em> contents: */

class <em>MyFoo</em> { }

Invalid: Filename case does not match class name case.

/* ./src/<em>myFoo.php</em> contents: */

class <em>MyFoo</em> { }