include.rst 681 B

1234567891011121314151617181920212223242526272829303132333435
  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 <./../../ruleSets/PhpCsFixer.rst>`_
  26. - `@Symfony <./../../ruleSets/Symfony.rst>`_