| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2.1481 |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | 1 | public function setPhotos(array $photos) |
|
| 22 | { |
||
| 23 | 1 | $photosCount = count($photos); |
|
| 24 | |||
| 25 | 1 | if ($photosCount > self::MAX_PHOTOS) { |
|
| 26 | 1 | throw new Exception("Photo files limit exceeded, " . self::MAX_PHOTOS . " allowed, " . $photosCount . " given"); |
|
| 27 | } |
||
| 28 | |||
| 29 | $this->photos = $photos; |
||
| 30 | } |
||
| 31 | |||
| 81 |