We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
1 | <?php |
||
17 | trait FieldsTrait |
||
18 | { |
||
19 | /** |
||
20 | * @var FieldDefinition[] |
||
21 | */ |
||
22 | private $_fields; |
||
23 | |||
24 | /** |
||
25 | * @return FieldDefinition[] |
||
26 | */ |
||
27 | 80 | public function getFields() |
|
37 | |||
38 | /** |
||
39 | * @param string $name |
||
40 | * |
||
41 | * @return FieldDefinition |
||
42 | * |
||
43 | * @throws \Exception |
||
44 | */ |
||
45 | public function getField($name) |
||
54 | } |
||
55 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: