| Conditions | 4 |
| Paths | 8 |
| Total Lines | 24 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 17 | public function __construct( |
||
| 18 | string $title, |
||
| 19 | string $body, |
||
| 20 | $source, |
||
| 21 | $order, |
||
| 22 | $cover = '', |
||
| 23 | $lead = '' |
||
| 24 | ) { |
||
| 25 | $properties = [ |
||
| 26 | 'title' => $this->filterStringInstance($title), |
||
| 27 | 'lead' => empty($lead) ? $this->createLeadFromBody($body) : $this->filterStringInstance($lead), |
||
| 28 | 'body' => $this->filterStringInstance($body), |
||
| 29 | 'order' => $order, |
||
| 30 | ]; |
||
| 31 | |||
| 32 | if (! empty($cover)) { |
||
| 33 | $properties['cover'] = $this->filterUriInstance($cover); |
||
| 34 | } |
||
| 35 | |||
| 36 | if (! empty($source)) { |
||
| 37 | $properties['source'] = $this->filterUriInstance($source); |
||
| 38 | } |
||
| 39 | |||
| 40 | $this->collection = new Collection($properties); |
||
| 41 | } |
||
| 43 |