File tree Expand file tree Collapse file tree 6 files changed +70
-3
lines changed Expand file tree Collapse file tree 6 files changed +70
-3
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ setup: install-phive
1515phpcs :
1616 docker run -it --rm -v${PWD} :/opt/project -w /opt/project phpdoc/phpcs-ga:latest -s
1717
18+ .PHONY : phpcbf
19+ phpcbf :
20+ docker run -it --rm -v${PWD} :/opt/project -w /opt/project phpdoc/phpcs-ga:latest phpcbf
21+
22+
1823.PHONY : phpstan
1924phpstan :
2025 docker run -it --rm -v${PWD} :/opt/project -w /opt/project phpdoc/phpstan-ga:latest analyse src --no-progress --configuration phpstan.neon
Original file line number Diff line number Diff line change @@ -87,8 +87,8 @@ final class TypeResolver
8787 'scalar ' => Types \Scalar::class,
8888 'callback ' => Types \Callable_::class,
8989 'callable ' => Types \Callable_::class,
90- 'false ' => Types \Boolean ::class,
91- 'true ' => Types \Boolean ::class,
90+ 'false ' => Types \False_ ::class,
91+ 'true ' => Types \True_ ::class,
9292 'self ' => Types \Self_::class,
9393 '$this ' => Types \This::class,
9494 'static ' => Types \Static_::class,
Original file line number Diff line number Diff line change 2020 *
2121 * @psalm-immutable
2222 */
23- final class Boolean implements Type
23+ class Boolean implements Type
2424{
2525 /**
2626 * Returns a rendered output of the Type as it would be used in a DocBlock.
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * This file is part of phpDocumentor.
4+ *
5+ * For the full copyright and license information, please view the LICENSE
6+ * file that was distributed with this source code.
7+ *
8+ * @link http://phpdoc.org
9+ */
10+
11+ declare (strict_types=1 );
12+
13+ namespace phpDocumentor \Reflection \Types ;
14+
15+ /**
16+ * Value Object representing a False pseudo type.
17+ *
18+ * @psalm-immutable
19+ */
20+ class False_ extends Boolean
21+ {
22+ /**
23+ * Returns a rendered output of the Type as it would be used in a DocBlock.
24+ */
25+ public function __toString () : string
26+ {
27+ return 'false ' ;
28+ }
29+ }
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * This file is part of phpDocumentor.
4+ *
5+ * For the full copyright and license information, please view the LICENSE
6+ * file that was distributed with this source code.
7+ *
8+ * @link http://phpdoc.org
9+ */
10+
11+ declare (strict_types=1 );
12+
13+ namespace phpDocumentor \Reflection \Types ;
14+
15+ /**
16+ * Value Object representing a True pseudo type.
17+ *
18+ * @psalm-immutable
19+ */
20+ class True_ extends Boolean
21+ {
22+ /**
23+ * Returns a rendered output of the Type as it would be used in a DocBlock.
24+ */
25+ public function __toString () : string
26+ {
27+ return 'true ' ;
28+ }
29+ }
Original file line number Diff line number Diff line change @@ -712,6 +712,10 @@ public function provideKeywords() : array
712712 ['double ' , Types \Float_::class],
713713 ['bool ' , Types \Boolean::class],
714714 ['boolean ' , Types \Boolean::class],
715+ ['true ' , Types \Boolean::class],
716+ ['true ' , Types \True_::class],
717+ ['false ' , Types \Boolean::class],
718+ ['false ' , Types \False_::class],
715719 ['resource ' , Types \Resource_::class],
716720 ['null ' , Types \Null_::class],
717721 ['callable ' , Types \Callable_::class],
You can’t perform that action at this time.
0 commit comments