Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 2 |
Changes | 4 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | 1 | public function __toString(): string { |
|
32 | 1 | $script = ""; |
|
33 | 1 | if ($this->useAxios) { |
|
34 | 1 | $script .= "Vue.prototype.\$http = axios;\n"; |
|
35 | } |
||
36 | 1 | $script .= "const app=new Vue("; |
|
37 | 1 | $script .= JavascriptUtils::arrayToJsObject($this->configuration + $this->data + $this->methods + $this->watchers + $this->computeds + $this->hooks); |
|
38 | 1 | $script = JsUtils::cleanJSONFunctions($script); |
|
39 | 1 | $script .= ")"; |
|
40 | 1 | $script = JavascriptUtils::wrapScript($script); |
|
41 | 1 | return $script; |
|
42 | } |
||
59 | } |