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