1 | <?php |
||
5 | final class Author |
||
|
|||
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) |
||
30 | |||
31 | /** |
||
32 | * @param AuthorInterface $author |
||
33 | * |
||
34 | * @return Author |
||
35 | */ |
||
36 | public static function fromObject(AuthorInterface $author) |
||
40 | |||
41 | /** |
||
42 | * @return Author |
||
43 | */ |
||
44 | public static function robot() |
||
48 | } |
||
49 |
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.