Keywords in this file to indicate requirement levels are as defined in the RFC2119:
"MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL".
These keywords MUST always be capitalized to emphasize their importance.
Rule: Every class MUST have a non empty top level documentation.
Error text: Class %s has no/an empty doc comment.
Class:
Oneserv\PHPStan\Rules\Classes\ClassDocumentationIsRequiredRule
class SomeClass
{
...
}
/**
* Doc
*/
class SomeClass
{
...
}
Rule: The top level documentation of a class MUST start with: "Class classname".
Error text: The doc comment of class %s must start with "Class %s".
Class:
Oneserv\PHPStan\Rules\Classes\ClassNameMustBeFirstInClassDocumentationRule
/**
* Some text
*/
class SomeClass
{
...
}
/**
* Class SomeClass
*/
class SomeClass
{
...
}
Rule: The documentation of a __construct method MUST start with: "classname constructor.".
Error text: The doc comment of the __construct method of class %s must start with "%s constructor.".
Class:
Oneserv\PHPStan\Rules\Methods\ClassNameMustBeFirstInConstructMethodDocumentationRule
class SomeClass
{
public function __construct() {
}
}
class SomeClass
{
/**
* SomeClass constructor.
*/
public function __construct() {
}
}
Rule: A documentation MUST be provided for functions.
Error text: Function %s has no/an empty doc comment.
Class:
Oneserv\PHPStan\Rules\Functions\FunctionDocumentationIsRequiredRule
function someFunction() {
}
/**
* Some documentation.
*/
function someFunction() {
}
Rule: A documentation MUST be provided for methods.
Error text: Method %s has no/an empty doc comment.
Class:
Oneserv\PHPStan\Rules\Methods\MethodDocumentationIsRequiredRule
class SomeClass
{
function someFunction() {
}
}
class SomeClass
{
/**
* Some documentation.
*/
function someFunction() {
}
}