File tree Expand file tree Collapse file tree 4 files changed +8
-13
lines changed Expand file tree Collapse file tree 4 files changed +8
-13
lines changed Original file line number Diff line number Diff line change 1313use function strlen ;
1414use const STR_PAD_LEFT ;
1515
16- class QuoteAwareConstExprStringNode implements ConstExprNode
16+ class QuoteAwareConstExprStringNode extends ConstExprStringNode implements ConstExprNode
1717{
1818
1919 public const SINGLE_QUOTED = 1 ;
2020 public const DOUBLE_QUOTED = 2 ;
2121
2222 use NodeAttributes;
2323
24- /** @var string */
25- public $ value ;
26-
2724 /** @var self::SINGLE_QUOTED|self::DOUBLE_QUOTED */
2825 public $ quoteType ;
2926
@@ -32,7 +29,7 @@ class QuoteAwareConstExprStringNode implements ConstExprNode
3229 */
3330 public function __construct (string $ value , int $ quoteType )
3431 {
35- $ this -> value = $ value ;
32+ parent :: __construct ( $ value) ;
3633 $ this ->quoteType = $ quoteType ;
3734 }
3835
Original file line number Diff line number Diff line change 44
55use PHPStan \PhpDocParser \Ast \ConstExpr \ConstExprIntegerNode ;
66use PHPStan \PhpDocParser \Ast \ConstExpr \ConstExprStringNode ;
7- use PHPStan \PhpDocParser \Ast \ConstExpr \QuoteAwareConstExprStringNode ;
87use PHPStan \PhpDocParser \Ast \NodeAttributes ;
98use function sprintf ;
109
@@ -13,7 +12,7 @@ class ArrayShapeItemNode implements TypeNode
1312
1413 use NodeAttributes;
1514
16- /** @var ConstExprIntegerNode|QuoteAwareConstExprStringNode| ConstExprStringNode|IdentifierTypeNode|null */
15+ /** @var ConstExprIntegerNode|ConstExprStringNode|IdentifierTypeNode|null */
1716 public $ keyName ;
1817
1918 /** @var bool */
@@ -23,7 +22,7 @@ class ArrayShapeItemNode implements TypeNode
2322 public $ valueType ;
2423
2524 /**
26- * @param ConstExprIntegerNode|QuoteAwareConstExprStringNode| ConstExprStringNode|IdentifierTypeNode|null $keyName
25+ * @param ConstExprIntegerNode|ConstExprStringNode|IdentifierTypeNode|null $keyName
2726 */
2827 public function __construct ($ keyName , bool $ optional , TypeNode $ valueType )
2928 {
Original file line number Diff line number Diff line change 33namespace PHPStan \PhpDocParser \Ast \Type ;
44
55use PHPStan \PhpDocParser \Ast \ConstExpr \ConstExprStringNode ;
6- use PHPStan \PhpDocParser \Ast \ConstExpr \QuoteAwareConstExprStringNode ;
76use PHPStan \PhpDocParser \Ast \NodeAttributes ;
87use function sprintf ;
98
@@ -12,7 +11,7 @@ class ObjectShapeItemNode implements TypeNode
1211
1312 use NodeAttributes;
1413
15- /** @var QuoteAwareConstExprStringNode| ConstExprStringNode|IdentifierTypeNode */
14+ /** @var ConstExprStringNode|IdentifierTypeNode */
1615 public $ keyName ;
1716
1817 /** @var bool */
@@ -22,7 +21,7 @@ class ObjectShapeItemNode implements TypeNode
2221 public $ valueType ;
2322
2423 /**
25- * @param QuoteAwareConstExprStringNode| ConstExprStringNode|IdentifierTypeNode $keyName
24+ * @param ConstExprStringNode|IdentifierTypeNode $keyName
2625 */
2726 public function __construct ($ keyName , bool $ optional , TypeNode $ valueType )
2827 {
Original file line number Diff line number Diff line change @@ -566,7 +566,7 @@ private function parseArrayShapeItem(TokenIterator $tokens): Ast\Type\ArrayShape
566566
567567 /**
568568 * @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
570570 */
571571 private function parseArrayShapeKey (TokenIterator $ tokens )
572572 {
@@ -639,7 +639,7 @@ private function parseObjectShapeItem(TokenIterator $tokens): Ast\Type\ObjectSha
639639
640640 /**
641641 * @phpstan-impure
642- * @return Ast\ConstExpr\QuoteAwareConstExprStringNode|Ast\ConstExpr\ ConstExprStringNode|Ast\Type\IdentifierTypeNode
642+ * @return Ast\ConstExpr\ConstExprStringNode|Ast\Type\IdentifierTypeNode
643643 */
644644 private function parseObjectShapeKey (TokenIterator $ tokens )
645645 {
You can’t perform that action at this time.
0 commit comments