no_spaces_after_function_name.rst 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. ======================================
  2. Rule ``no_spaces_after_function_name``
  3. ======================================
  4. When making a method or function call, there MUST NOT be a space between the
  5. method or function name and the opening parenthesis.
  6. Examples
  7. --------
  8. Example #1
  9. ~~~~~~~~~~
  10. .. code-block:: diff
  11. --- Original
  12. +++ New
  13. <?php
  14. -strlen ('Hello World!');
  15. -foo (test (3));
  16. -exit (1);
  17. -$func ();
  18. +strlen('Hello World!');
  19. +foo(test(3));
  20. +exit(1);
  21. +$func();
  22. Rule sets
  23. ---------
  24. The rule is part of the following rule sets:
  25. - `@PER <./../../ruleSets/PER.rst>`_
  26. - `@PER-CS <./../../ruleSets/PER-CS.rst>`_
  27. - `@PER-CS1.0 <./../../ruleSets/PER-CS1.0.rst>`_
  28. - `@PER-CS2.0 <./../../ruleSets/PER-CS2.0.rst>`_
  29. - `@PSR2 <./../../ruleSets/PSR2.rst>`_
  30. - `@PSR12 <./../../ruleSets/PSR12.rst>`_
  31. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  32. - `@Symfony <./../../ruleSets/Symfony.rst>`_
  33. References
  34. ----------
  35. - Fixer class: `PhpCsFixer\\Fixer\\FunctionNotation\\NoSpacesAfterFunctionNameFixer <./../../../src/Fixer/FunctionNotation/NoSpacesAfterFunctionNameFixer.php>`_
  36. - Test class: `PhpCsFixer\\Tests\\Fixer\\FunctionNotation\\NoSpacesAfterFunctionNameFixerTest <./../../../tests/Fixer/FunctionNotation/NoSpacesAfterFunctionNameFixerTest.php>`_
  37. The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.