Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
75.00% |
3 / 4 |
|
75.00% |
3 / 4 |
CRAP | |
0.00% |
0 / 1 |
| UndefinedTypeDefinition | |
75.00% |
3 / 4 |
|
75.00% |
3 / 4 |
4.25 | |
0.00% |
0 / 1 |
| toTypescript | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| toJavascript | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| providesDefinitions | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| needsDefinitions | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\TypescriptCodeBuilder\Dto\Typehints; |
| 3 | |
| 4 | use Apie\TypescriptCodeBuilder\Lists\JavascriptIdentifierList; |
| 5 | use Apie\TypescriptCodeBuilder\TypescriptTypeDeclarationInterface; |
| 6 | |
| 7 | /** |
| 8 | * Typescript definition for the undefined type. |
| 9 | */ |
| 10 | class UndefinedTypeDefinition implements TypescriptTypeDeclarationInterface |
| 11 | { |
| 12 | public function toTypescript(): string |
| 13 | { |
| 14 | return 'undefined'; |
| 15 | } |
| 16 | |
| 17 | public function toJavascript(): string |
| 18 | { |
| 19 | return ''; |
| 20 | } |
| 21 | |
| 22 | public function providesDefinitions(): JavascriptIdentifierList |
| 23 | { |
| 24 | return new JavascriptIdentifierList(); |
| 25 | } |
| 26 | |
| 27 | public function needsDefinitions(): JavascriptIdentifierList |
| 28 | { |
| 29 | return new JavascriptIdentifierList(); |
| 30 | } |
| 31 | } |