File tree Expand file tree Collapse file tree 4 files changed +42
-1
lines changed Expand file tree Collapse file tree 4 files changed +42
-1
lines changed Original file line number Diff line number Diff line change 2929
3030.PHONY : test
3131test :
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
3333
3434.PHONY : pre-commit-test
3535pre-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
102102 'callable-string ' => PseudoTypes \CallableString::class,
103103 'false ' => PseudoTypes \False_::class,
104104 'true ' => PseudoTypes \True_::class,
105+ 'literal-string ' => PseudoTypes \LiteralString::class,
105106 'self ' => Types \Self_::class,
106107 '$this ' => Types \This::class,
107108 'static ' => Types \Static_::class,
Original file line number Diff line number Diff line change @@ -758,6 +758,7 @@ public function provideKeywords(): array
758758 ['parent ' , Types \Parent_::class],
759759 ['iterable ' , Types \Iterable_::class],
760760 ['never ' , Types \Never_::class],
761+ ['literal-string ' , PseudoTypes \LiteralString::class],
761762 ];
762763 }
763764
You can’t perform that action at this time.
0 commit comments