ClassComment
Parses and verifies the class doc comment.
Verifies that :
- A class doc comment exists.
- The comment uses the correct docblock style.
- There are no blank lines after the class comment.
- No tags are used in the docblock.
Scope
Squiz.Commenting.ClassComment
Usage
xml
<rule ref="Squiz.Commenting.ClassComment"></rule>
Examples
Example 1
Valid: Lowercase self used.
php
self::foo();
Invalid: Uppercase self used.
php
SELF::foo();
Example 2
Valid: Correct spacing used.
php
self::foo();
Invalid: Incorrect spacing used.
php
self :: foo();
Example 3
Valid: Self used as reference.
php
class Foo
{
public static function bar()
{
}
public static function baz()
{
self::bar();
}
}
Invalid: Local class name used as reference.
php
class Foo
{
public static function bar()
{
}
public static function baz()
{
Foo::bar();
}
}