File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 1313
1414namespace phpDocumentor \Reflection \Types ;
1515
16+ use phpDocumentor \Reflection \PseudoType ;
17+ use phpDocumentor \Reflection \Type ;
18+
1619/**
1720 * Value Object representing a array-key Type.
1821 *
1922 * A array-key Type is the supertype (but not a union) of int and string.
2023 *
2124 * @psalm-immutable
2225 */
23- final class ArrayKey extends AggregatedType
26+ final class ArrayKey extends AggregatedType implements PseudoType
2427{
2528 public function __construct ()
2629 {
2730 parent ::__construct ([new String_ (), new Integer ()], '| ' );
2831 }
2932
33+ public function underlyingType (): Type
34+ {
35+ return new String_ ();
36+ }
37+
3038 public function __toString (): string
3139 {
3240 return 'array-key ' ;
Original file line number Diff line number Diff line change 1414namespace phpDocumentor \Reflection \Types ;
1515
1616use phpDocumentor \Reflection \Fqsen ;
17+ use phpDocumentor \Reflection \PseudoType ;
18+ use phpDocumentor \Reflection \Type ;
1719
1820/**
1921 * Value Object representing the type 'string'.
2022 *
2123 * @psalm-immutable
2224 */
23- final class ClassString extends String_
25+ final class ClassString extends String_ implements PseudoType
2426{
2527 /** @var Fqsen|null */
2628 private $ fqsen ;
@@ -33,6 +35,11 @@ public function __construct(?Fqsen $fqsen = null)
3335 $ this ->fqsen = $ fqsen ;
3436 }
3537
38+ public function underlyingType (): Type
39+ {
40+ return new String_ ();
41+ }
42+
3643 /**
3744 * Returns the FQSEN associated with this object.
3845 */
You can’t perform that action at this time.
0 commit comments