Conditions | 5 |
Paths | 3 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
55 | public function updateQuota(Quota $quota) |
||
56 | { |
||
57 | $this->fill($quota->toArray())->save(); |
||
58 | |||
59 | if ($this->full && $this->percent_full < 99) { |
||
60 | $this->enable(); |
||
61 | } else if (!$this->full && $this->percent_full > 99) { |
||
62 | $this->disable(self::SPACE_FULL); |
||
63 | } |
||
64 | |||
65 | return $this; |
||
66 | } |
||
67 | } |
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: