File tree 6 files changed +70
-3
lines changed
6 files changed +70
-3
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ setup: install-phive
15
15
phpcs :
16
16
docker run -it --rm -v${PWD} :/opt/project -w /opt/project phpdoc/phpcs-ga:latest -s
17
17
18
+ .PHONY : phpcbf
19
+ phpcbf :
20
+ docker run -it --rm -v${PWD} :/opt/project -w /opt/project phpdoc/phpcs-ga:latest phpcbf
21
+
22
+
18
23
.PHONY : phpstan
19
24
phpstan :
20
25
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
87
87
'scalar ' => Types \Scalar::class,
88
88
'callback ' => Types \Callable_::class,
89
89
'callable ' => Types \Callable_::class,
90
- 'false ' => Types \Boolean ::class,
91
- 'true ' => Types \Boolean ::class,
90
+ 'false ' => Types \False_ ::class,
91
+ 'true ' => Types \True_ ::class,
92
92
'self ' => Types \Self_::class,
93
93
'$this ' => Types \This::class,
94
94
'static ' => Types \Static_::class,
Original file line number Diff line number Diff line change 20
20
*
21
21
* @psalm-immutable
22
22
*/
23
- final class Boolean implements Type
23
+ class Boolean implements Type
24
24
{
25
25
/**
26
26
* 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
712
712
['double ' , Types \Float_::class],
713
713
['bool ' , Types \Boolean::class],
714
714
['boolean ' , Types \Boolean::class],
715
+ ['true ' , Types \Boolean::class],
716
+ ['true ' , Types \True_::class],
717
+ ['false ' , Types \Boolean::class],
718
+ ['false ' , Types \False_::class],
715
719
['resource ' , Types \Resource_::class],
716
720
['null ' , Types \Null_::class],
717
721
['callable ' , Types \Callable_::class],
You can’t perform that action at this time.
0 commit comments