include.rst 827 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. @@ -1,5 +1,5 @@
  14. <?php
  15. -require ("sample1.php");
  16. -require_once "sample2.php";
  17. -include "sample3.php";
  18. -include_once("sample4.php");
  19. +require "sample1.php";
  20. +require_once "sample2.php";
  21. +include "sample3.php";
  22. +include_once "sample4.php";
  23. Rule sets
  24. ---------
  25. The rule is part of the following rule sets:
  26. @PhpCsFixer
  27. Using the `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_ rule set will enable the ``include`` rule.
  28. @Symfony
  29. Using the `@Symfony <./../../ruleSets/Symfony.rst>`_ rule set will enable the ``include`` rule.