File tree 4 files changed +8
-13
lines changed
4 files changed +8
-13
lines changed Original file line number Diff line number Diff line change 13
13
use function strlen ;
14
14
use const STR_PAD_LEFT ;
15
15
16
- class QuoteAwareConstExprStringNode implements ConstExprNode
16
+ class QuoteAwareConstExprStringNode extends ConstExprStringNode implements ConstExprNode
17
17
{
18
18
19
19
public const SINGLE_QUOTED = 1 ;
20
20
public const DOUBLE_QUOTED = 2 ;
21
21
22
22
use NodeAttributes;
23
23
24
- /** @var string */
25
- public $ value ;
26
-
27
24
/** @var self::SINGLE_QUOTED|self::DOUBLE_QUOTED */
28
25
public $ quoteType ;
29
26
@@ -32,7 +29,7 @@ class QuoteAwareConstExprStringNode implements ConstExprNode
32
29
*/
33
30
public function __construct (string $ value , int $ quoteType )
34
31
{
35
- $ this -> value = $ value ;
32
+ parent :: __construct ( $ value) ;
36
33
$ this ->quoteType = $ quoteType ;
37
34
}
38
35
Original file line number Diff line number Diff line change 4
4
5
5
use PHPStan \PhpDocParser \Ast \ConstExpr \ConstExprIntegerNode ;
6
6
use PHPStan \PhpDocParser \Ast \ConstExpr \ConstExprStringNode ;
7
- use PHPStan \PhpDocParser \Ast \ConstExpr \QuoteAwareConstExprStringNode ;
8
7
use PHPStan \PhpDocParser \Ast \NodeAttributes ;
9
8
use function sprintf ;
10
9
@@ -13,7 +12,7 @@ class ArrayShapeItemNode implements TypeNode
13
12
14
13
use NodeAttributes;
15
14
16
- /** @var ConstExprIntegerNode|QuoteAwareConstExprStringNode| ConstExprStringNode|IdentifierTypeNode|null */
15
+ /** @var ConstExprIntegerNode|ConstExprStringNode|IdentifierTypeNode|null */
17
16
public $ keyName ;
18
17
19
18
/** @var bool */
@@ -23,7 +22,7 @@ class ArrayShapeItemNode implements TypeNode
23
22
public $ valueType ;
24
23
25
24
/**
26
- * @param ConstExprIntegerNode|QuoteAwareConstExprStringNode| ConstExprStringNode|IdentifierTypeNode|null $keyName
25
+ * @param ConstExprIntegerNode|ConstExprStringNode|IdentifierTypeNode|null $keyName
27
26
*/
28
27
public function __construct ($ keyName , bool $ optional , TypeNode $ valueType )
29
28
{
Original file line number Diff line number Diff line change 3
3
namespace PHPStan \PhpDocParser \Ast \Type ;
4
4
5
5
use PHPStan \PhpDocParser \Ast \ConstExpr \ConstExprStringNode ;
6
- use PHPStan \PhpDocParser \Ast \ConstExpr \QuoteAwareConstExprStringNode ;
7
6
use PHPStan \PhpDocParser \Ast \NodeAttributes ;
8
7
use function sprintf ;
9
8
@@ -12,7 +11,7 @@ class ObjectShapeItemNode implements TypeNode
12
11
13
12
use NodeAttributes;
14
13
15
- /** @var QuoteAwareConstExprStringNode| ConstExprStringNode|IdentifierTypeNode */
14
+ /** @var ConstExprStringNode|IdentifierTypeNode */
16
15
public $ keyName ;
17
16
18
17
/** @var bool */
@@ -22,7 +21,7 @@ class ObjectShapeItemNode implements TypeNode
22
21
public $ valueType ;
23
22
24
23
/**
25
- * @param QuoteAwareConstExprStringNode| ConstExprStringNode|IdentifierTypeNode $keyName
24
+ * @param ConstExprStringNode|IdentifierTypeNode $keyName
26
25
*/
27
26
public function __construct ($ keyName , bool $ optional , TypeNode $ valueType )
28
27
{
Original file line number Diff line number Diff line change @@ -566,7 +566,7 @@ private function parseArrayShapeItem(TokenIterator $tokens): Ast\Type\ArrayShape
566
566
567
567
/**
568
568
* @phpstan-impure
569
- * @return Ast\ConstExpr\ConstExprIntegerNode|Ast\ConstExpr\QuoteAwareConstExprStringNode|Ast\ConstExpr\ ConstExprStringNode|Ast\Type\IdentifierTypeNode
569
+ * @return Ast\ConstExpr\ConstExprIntegerNode|Ast\ConstExpr\ConstExprStringNode|Ast\Type\IdentifierTypeNode
570
570
*/
571
571
private function parseArrayShapeKey (TokenIterator $ tokens )
572
572
{
@@ -639,7 +639,7 @@ private function parseObjectShapeItem(TokenIterator $tokens): Ast\Type\ObjectSha
639
639
640
640
/**
641
641
* @phpstan-impure
642
- * @return Ast\ConstExpr\QuoteAwareConstExprStringNode|Ast\ConstExpr\ ConstExprStringNode|Ast\Type\IdentifierTypeNode
642
+ * @return Ast\ConstExpr\ConstExprStringNode|Ast\Type\IdentifierTypeNode
643
643
*/
644
644
private function parseObjectShapeKey (TokenIterator $ tokens )
645
645
{
You can’t perform that action at this time.
0 commit comments