Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
40.00% covered (danger)
40.00%
2 / 5
40.00% covered (danger)
40.00%
2 / 5
CRAP
0.00% covered (danger)
0.00%
0 / 1
GotoStatement
40.00% covered (danger)
40.00%
2 / 5
40.00% covered (danger)
40.00%
2 / 5
10.40
0.00% covered (danger)
0.00%
0 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 toTypescript
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 toJavascript
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 needsDefinitions
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 providesDefinitions
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2namespace Apie\TypescriptCodeBuilder\Dto\ControlFlow;
3
4use Apie\TypescriptCodeBuilder\Lists\JavascriptIdentifierList;
5use Apie\TypescriptCodeBuilder\TypescriptFileExpressionInterface;
6
7class GotoStatement implements TypescriptFileExpressionInterface
8{
9    public function __construct(public string $label)
10    {
11    }
12    public function toTypescript(): string
13    {
14        return 'goto ' . $this->label . ';';
15    }
16    public function toJavascript(): string
17    {
18        return $this->toTypescript();
19    }
20    public function needsDefinitions(): JavascriptIdentifierList
21    {
22        return new JavascriptIdentifierList();
23    }
24    public function providesDefinitions(bool $applyBlockScope): JavascriptIdentifierList
25    {
26        return new JavascriptIdentifierList();
27    }
28}