Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
68 | 3 | public function createComponent(string $name, $compile = true): ReactComponent { |
|
69 | 3 | $compo = new ReactComponent($name, $this); |
|
70 | 3 | $this->components[\strtolower($name)] = $name; |
|
71 | 3 | if ($compile) { |
|
72 | 3 | $this->operations[] = function () use ($compo) { |
|
73 | 3 | return $compo->parse(); |
|
74 | }; |
||
75 | } |
||
76 | 3 | return $compo; |
|
77 | } |
||
97 |