| Conditions | 4 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 68 | public function setMatrix(array $matrix){ |
||
| 69 | $this->pixelCount = count($matrix); |
||
| 70 | |||
| 71 | // specify valid range? |
||
| 72 | if($this->pixelCount < 2 |
||
| 73 | || !isset($matrix[$this->pixelCount - 1]) |
||
| 74 | || $this->pixelCount !== count($matrix[$this->pixelCount - 1]) |
||
| 75 | ){ |
||
| 76 | throw new QRCodeOutputException('Invalid matrix!'); |
||
| 77 | } |
||
| 78 | |||
| 79 | $this->matrix = $matrix; |
||
| 80 | |||
| 81 | return $this; |
||
| 82 | } |
||
| 83 | |||
| 85 |