Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
17 | 1 | public function create(?array $ops = null): Article |
|
18 | { |
||
19 | 1 | $component = new Article(); |
|
20 | 1 | $this->init($component, $ops); |
|
21 | 1 | $component->setTitle($this->ops['title']); |
|
22 | 1 | $component->setSubtitle($this->ops['subtitle']); |
|
23 | 1 | $component->setContent($this->ops['content']); |
|
24 | 1 | $component->setFilePath($this->ops['filePath']); |
|
25 | 1 | $this->validate($component); |
|
26 | 1 | return $component; |
|
27 | } |
||
45 |