Conditions | 3 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
28 | 13 | public function updateQualityByDayPassed() |
|
29 | { |
||
30 | 13 | $this->item->sell_in--; |
|
31 | 13 | if (true === static::DEGRADE_WITH_TIME) { |
|
32 | 7 | $this->item->quality = $this->item->quality - $this->getQualityMagnitudeForNextUpdate(); |
|
33 | } |
||
34 | |||
35 | 13 | if (false === static::DEGRADE_WITH_TIME) { |
|
36 | 6 | $this->item->quality = $this->item->quality + $this->getQualityMagnitudeForNextUpdate(); |
|
37 | } |
||
38 | 13 | $this->validateQualityBoundaries(); |
|
39 | 13 | } |
|
40 | |||
52 |