| Conditions | 4 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 41 | public function setMatrix(array $matrix){ |
||
| 42 | $this->pixelCount = count($matrix); |
||
| 43 | |||
| 44 | // specify valid range? |
||
| 45 | if($this->pixelCount < 2 |
||
| 46 | || !isset($matrix[$this->pixelCount - 1]) |
||
| 47 | || $this->pixelCount !== count($matrix[$this->pixelCount - 1]) |
||
| 48 | ){ |
||
| 49 | throw new QRCodeOutputException('Invalid matrix!'); |
||
| 50 | } |
||
| 51 | |||
| 52 | $this->matrix = $matrix; |
||
| 53 | |||
| 54 | return $this; |
||
| 55 | } |
||
| 56 | |||
| 58 |