Author does not seem to conform to the naming convention (Utils?$).
This check examines a number of code elements and verifies that they conform
to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties,
methods, parameters, interfaces, classes, exceptions and special methods.
Loading history...
6
{
7
/**
8
* @var mixed
9
*/
10
public $identifier;
11
12
/**
13
* @var string
14
*/
15
public $type;
16
17
/**
18
* Do not let user instantiate the class directly.
19
* Use static method instead.
20
* You can still edit public properties afterwards.
21
*
22
* @param mixed $identifier
23
* @param string $type
24
*/
25
private function __construct($identifier, $type)
26
{
27
$this->identifier = $identifier;
28
$this->type = $type;
29
}
30
31
/**
32
* @param AuthorInterface $author
33
*
34
* @return Author
35
*/
36
public static function fromObject(AuthorInterface $author)
37
{
38
return new self($author->getId(), get_class($author));
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.