File tree Expand file tree Collapse file tree 4 files changed +8
-4
lines changed Expand file tree Collapse file tree 4 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 5
5
namespace Brainshaker95 \PhpToTsBundle \Model \Ast \ConstExpr ;
6
6
7
7
use Brainshaker95 \PhpToTsBundle \Interface \Node ;
8
+ use Brainshaker95 \PhpToTsBundle \Model \TsProperty ;
8
9
use Brainshaker95 \PhpToTsBundle \Tool \Assert ;
9
10
use PHPStan \PhpDocParser \Ast \ConstExpr \ConstExprFalseNode as PHPStanConstExprFalseNode ;
10
11
use PHPStan \PhpDocParser \Ast \Node as PHPStanNode ;
@@ -21,7 +22,7 @@ public function __toString(): string
21
22
22
23
public function toString (): string
23
24
{
24
- return ' false ' ;
25
+ return TsProperty:: TYPE_FALSE ;
25
26
}
26
27
27
28
public static function fromPhpStan (PHPStanNode $ node ): self
Original file line number Diff line number Diff line change 5
5
namespace Brainshaker95 \PhpToTsBundle \Model \Ast \ConstExpr ;
6
6
7
7
use Brainshaker95 \PhpToTsBundle \Interface \Node ;
8
+ use Brainshaker95 \PhpToTsBundle \Model \TsProperty ;
8
9
use Brainshaker95 \PhpToTsBundle \Tool \Assert ;
9
10
use PHPStan \PhpDocParser \Ast \ConstExpr \ConstExprNullNode as PHPStanConstExprNullNode ;
10
11
use PHPStan \PhpDocParser \Ast \Node as PHPStanNode ;
@@ -21,7 +22,7 @@ public function __toString(): string
21
22
22
23
public function toString (): string
23
24
{
24
- return ' null ' ;
25
+ return TsProperty:: TYPE_NULL ;
25
26
}
26
27
27
28
public static function fromPhpStan (PHPStanNode $ node ): self
Original file line number Diff line number Diff line change 5
5
namespace Brainshaker95 \PhpToTsBundle \Model \Ast \ConstExpr ;
6
6
7
7
use Brainshaker95 \PhpToTsBundle \Interface \Node ;
8
+ use Brainshaker95 \PhpToTsBundle \Model \TsProperty ;
8
9
use Brainshaker95 \PhpToTsBundle \Tool \Assert ;
9
10
use PHPStan \PhpDocParser \Ast \ConstExpr \ConstExprTrueNode as PHPStanConstExprTrueNode ;
10
11
use PHPStan \PhpDocParser \Ast \Node as PHPStanNode ;
@@ -21,7 +22,7 @@ public function __toString(): string
21
22
22
23
public function toString (): string
23
24
{
24
- return ' true ' ;
25
+ return TsProperty:: TYPE_TRUE ;
25
26
}
26
27
27
28
public static function fromPhpStan (PHPStanNode $ node ): self
Original file line number Diff line number Diff line change 5
5
namespace Brainshaker95 \PhpToTsBundle \Model \Ast \Type ;
6
6
7
7
use Brainshaker95 \PhpToTsBundle \Interface \Node ;
8
+ use Brainshaker95 \PhpToTsBundle \Model \TsProperty ;
8
9
use Brainshaker95 \PhpToTsBundle \Tool \Assert ;
9
10
use Brainshaker95 \PhpToTsBundle \Tool \PhpStan ;
10
11
use PHPStan \PhpDocParser \Ast \Node as PHPStanNode ;
@@ -26,7 +27,7 @@ public function __toString(): string
26
27
27
28
public function toString (): string
28
29
{
29
- return '( ' . $ this ->type . ' | null ) ' ;
30
+ return '( ' . $ this ->type . ' | ' . TsProperty:: TYPE_NULL . ' ) ' ;
30
31
}
31
32
32
33
public static function fromPhpStan (PHPStanNode $ node ): self
You can’t perform that action at this time.
0 commit comments