include.rst 808 B

12345678910111213141516171819202122232425262728293031323334353637
  1. ================
  2. Rule ``include``
  3. ================
  4. Include/Require and file path should be divided with a single space. File path
  5. should not be placed under brackets.
  6. Examples
  7. --------
  8. Example #1
  9. ~~~~~~~~~~
  10. .. code-block:: diff
  11. --- Original
  12. +++ New
  13. <?php
  14. -require ("sample1.php");
  15. -require_once "sample2.php";
  16. -include "sample3.php";
  17. -include_once("sample4.php");
  18. +require "sample1.php";
  19. +require_once "sample2.php";
  20. +include "sample3.php";
  21. +include_once "sample4.php";
  22. Rule sets
  23. ---------
  24. The rule is part of the following rule sets:
  25. @PhpCsFixer
  26. Using the `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_ rule set will enable the ``include`` rule.
  27. @Symfony
  28. Using the `@Symfony <./../../ruleSets/Symfony.rst>`_ rule set will enable the ``include`` rule.