File tree 4 files changed +42
-1
lines changed
4 files changed +42
-1
lines changed Original file line number Diff line number Diff line change 29
29
30
30
.PHONY : test
31
31
test :
32
- docker run -it --rm -v${PWD} :/opt/project -w /opt/project php:7.2 tools/phpunit
32
+ docker run -it --rm -v${PWD} :/opt/project -w /opt/project php:7.3 tools/phpunit
33
33
34
34
.PHONY : pre-commit-test
35
35
pre-commit-test : test phpcs phpstan psalm
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ /**
6
+ * This file is part of phpDocumentor.
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ *
11
+ * @link http://phpdoc.org
12
+ */
13
+
14
+ namespace phpDocumentor \Reflection \PseudoTypes ;
15
+
16
+ use phpDocumentor \Reflection \PseudoType ;
17
+ use phpDocumentor \Reflection \Type ;
18
+ use phpDocumentor \Reflection \Types \String_ ;
19
+
20
+ /**
21
+ * Value Object representing the type 'string'.
22
+ *
23
+ * @psalm-immutable
24
+ */
25
+ final class LiteralString extends String_ implements PseudoType
26
+ {
27
+ public function underlyingType (): Type
28
+ {
29
+ return new String_ ();
30
+ }
31
+
32
+ /**
33
+ * Returns a rendered output of the Type as it would be used in a DocBlock.
34
+ */
35
+ public function __toString (): string
36
+ {
37
+ return 'literal-string ' ;
38
+ }
39
+ }
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ final class TypeResolver
102
102
'callable-string ' => PseudoTypes \CallableString::class,
103
103
'false ' => PseudoTypes \False_::class,
104
104
'true ' => PseudoTypes \True_::class,
105
+ 'literal-string ' => PseudoTypes \LiteralString::class,
105
106
'self ' => Types \Self_::class,
106
107
'$this ' => Types \This::class,
107
108
'static ' => Types \Static_::class,
Original file line number Diff line number Diff line change @@ -758,6 +758,7 @@ public function provideKeywords(): array
758
758
['parent ' , Types \Parent_::class],
759
759
['iterable ' , Types \Iterable_::class],
760
760
['never ' , Types \Never_::class],
761
+ ['literal-string ' , PseudoTypes \LiteralString::class],
761
762
];
762
763
}
763
764
You can’t perform that action at this time.
0 commit comments