Conditions | 1 |
Paths | 1 |
Total Lines | 7 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | 1 | public function create():string { |
|
23 | 1 | $script="Vue.component('".$this->name."',"; |
|
24 | 1 | $script.=JavascriptUtils::arrayToJsObject($this->props + $this->data + $this->methods + $this->computeds + $this->watchers + $this->hooks + $this->template); |
|
25 | 1 | $script=JsUtils::cleanJSONFunctions($script); |
|
26 | 1 | $script.=")"; |
|
27 | 1 | \file_put_contents($this->name.".js", $script); |
|
28 | 1 | return $script; |
|
29 | } |
||
30 | } |