Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php namespace Arcanesoft\Seo\Models\Presenters; |
||
49 | protected function getLabelStatus($status) |
||
50 | { |
||
51 | $statuses = [ |
||
52 | SeoChecker::STATUS_DANGER => 'danger', |
||
53 | SeoChecker::STATUS_GOOD => 'success', |
||
54 | SeoChecker::STATUS_WARNING => 'warning', |
||
55 | ]; |
||
56 | |||
57 | return Arr::get($statuses, $status, 'default'); |
||
58 | } |
||
59 | } |
||
60 |
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: