diff --git a/Makefile b/Makefile index a8a6b51..763adce 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,11 @@ setup: install-phive phpcs: docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phpcs-ga:latest -s +.PHONY: phpcbf +phpcbf: + docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phpcs-ga:latest phpcbf + + .PHONY: phpstan phpstan: docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phpstan-ga:latest analyse src --no-progress --configuration phpstan.neon diff --git a/src/TypeResolver.php b/src/TypeResolver.php index ce81a67..62edeca 100644 --- a/src/TypeResolver.php +++ b/src/TypeResolver.php @@ -87,8 +87,8 @@ final class TypeResolver 'scalar' => Types\Scalar::class, 'callback' => Types\Callable_::class, 'callable' => Types\Callable_::class, - 'false' => Types\Boolean::class, - 'true' => Types\Boolean::class, + 'false' => Types\False_::class, + 'true' => Types\True_::class, 'self' => Types\Self_::class, '$this' => Types\This::class, 'static' => Types\Static_::class, diff --git a/src/Types/Boolean.php b/src/Types/Boolean.php index afeccba..9163b51 100644 --- a/src/Types/Boolean.php +++ b/src/Types/Boolean.php @@ -20,7 +20,7 @@ * * @psalm-immutable */ -final class Boolean implements Type +class Boolean implements Type { /** * Returns a rendered output of the Type as it would be used in a DocBlock. diff --git a/src/Types/False_.php b/src/Types/False_.php new file mode 100644 index 0000000..39666fb --- /dev/null +++ b/src/Types/False_.php @@ -0,0 +1,29 @@ +