Conditions | 3 |
Paths | 4 |
Total Lines | 8 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
46 | public function toStruct(): string |
||
47 | { |
||
48 | $t = VueCode::mapTypeToJS($this->type); |
||
49 | return "\"{$this->name}\": {\n". |
||
50 | " type: {$t}" . |
||
51 | ($this->required ?? false ? ", required: true" : '') . |
||
52 | ($this->default ?? false ? ", default: " . $this->default : '') . |
||
53 | " } "; |
||
54 | } |
||
86 |