Conditions | 4 |
Paths | 8 |
Total Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
51 | public function unhashId($value) |
||
52 | { |
||
53 | $obscure = property_exists($this, 'obscure') && is_array($this->obscure) ? $this->obscure : config('cortex.foundation.obscure'); |
||
54 | |||
55 | return in_array(request()->accessarea(), $obscure['areas']) ? optional(Hashids::decode($value))[0] : $value; |
||
56 | } |
||
57 | } |
||
58 |
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: