no_spaces_after_function_name.rst 880 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. -require ('sample.php');
  15. -echo (test (3));
  16. -exit (1);
  17. -$func ();
  18. +require('sample.php');
  19. +echo(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-CS1.0 <./../../ruleSets/PER-CS1.0.rst>`_
  27. - `@PER-CS2.0 <./../../ruleSets/PER-CS2.0.rst>`_
  28. - `@PSR2 <./../../ruleSets/PSR2.rst>`_
  29. - `@PSR12 <./../../ruleSets/PSR12.rst>`_
  30. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  31. - `@Symfony <./../../ruleSets/Symfony.rst>`_