We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 5 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 5.3906 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | 36 | public function getTemplate() |
|
37 | { |
||
38 | 36 | $parentTemplate = parent::getTemplate(); |
|
39 | 36 | $isEmpty = empty($this->template); |
|
40 | |||
41 | 36 | if (!$isEmpty && $this->template != $parentTemplate) { |
|
42 | return $this->template; |
||
43 | } |
||
44 | 36 | if ($isEmpty && 1 === count($this->related)) { |
|
45 | return current($this->related)->getTemplate(); |
||
46 | } else { |
||
47 | 36 | return $parentTemplate; |
|
48 | } |
||
49 | } |
||
50 | } |
||
51 |