| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 27 | public function __construct( |
||
| 28 | $url, |
||
| 29 | $ratio, |
||
| 30 | $description = '', |
||
| 31 | $information = '' |
||
| 32 | ) { |
||
| 33 | if (! in_array($ratio, $this->getAvailableRatios(), true)) { |
||
| 34 | throw new \Exception("ratio ${ratio} not allowed, allowed ratio are " . implode(', ', $this->getAvailableRatios())); |
||
| 35 | } |
||
| 36 | |||
| 37 | $this->collection = new Collection([ |
||
| 38 | 'url' => $this->filterUriInstance($url), |
||
| 39 | 'ratio' => $ratio, |
||
| 40 | 'description' => $this->filterStringInstance($description), |
||
| 41 | 'information' => $this->filterStringInstance($information), |
||
| 42 | ]); |
||
| 59 |