| Conditions | 5 |
| Paths | 8 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | public function __construct($width, $height) |
||
| 25 | { |
||
| 26 | if (!$width) { |
||
| 27 | $width = null; |
||
| 28 | } |
||
| 29 | |||
| 30 | if (!$height) { |
||
| 31 | $height = null; |
||
| 32 | } |
||
| 33 | |||
| 34 | if (is_null($width) and is_null($height)) { |
||
| 35 | throw new InvalidArgumentException('Both width and height are empty values'); |
||
| 36 | } |
||
| 37 | |||
| 38 | $this->width = $width; |
||
| 39 | $this->height = $height; |
||
| 40 | } |
||
| 58 |