Conditions | 1 |
Paths | 1 |
Total Lines | 4 |
Code Lines | 2 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
25 | public function setSexAttribute($value) |
||
26 | { |
||
27 | $this->attributes['sex'] = Sex::type($value); |
||
1 ignored issue
–
show
|
|||
28 | } |
||
29 | } |
||
30 |
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: