Fork me on GitHub
a Sensio Labs Product

15 Keys Accelerate (v3.54.0) edition

Rule function_typehint_space

Ensure single space between function’s argument and its typehint.

Warning

This rule is deprecated and will be removed in the next major version

You should use type_declaration_spaces instead.

Examples

Example #1

--- Original
+++ New
 <?php
-function sample(array$a)
+function sample(array $a)
 {}

Example #2

--- Original
+++ New
 <?php
-function sample(array  $a)
+function sample(array $a)
 {}

References

The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.