
Rule compact_nullable_typehint
ΒΆ
Remove extra spaces in a nullable typehint.
DescriptionΒΆ
Rule is applied only in a PHP 7.1+ environment.
WarningΒΆ
This rule is deprecated and will be removed in the next major versionΒΆ
You should use compact_nullable_type_declaration
instead.
ExamplesΒΆ
Example #1ΒΆ
--- Original
+++ New
<?php
-function sample(? string $str): ? string
+function sample(?string $str): ?string
{}