Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 809 Bytes

function_typehint_space.rst

File metadata and controls

43 lines (31 loc) · 809 Bytes

Rule function_typehint_space

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

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)
 {}

Rule sets

The rule is part of the following rule sets:

@PhpCsFixer
Using the @PhpCsFixer rule set will enable the function_typehint_space rule.
@Symfony
Using the @Symfony rule set will enable the function_typehint_space rule.