doctrine_annotation_indentation.rst 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. ========================================
  2. Rule ``doctrine_annotation_indentation``
  3. ========================================
  4. Doctrine annotations must be indented with four spaces.
  5. Configuration
  6. -------------
  7. ``ignored_tags``
  8. ~~~~~~~~~~~~~~~~
  9. List of tags that must not be treated as Doctrine Annotations.
  10. Allowed types: ``array``
  11. Default value: ``['abstract', 'access', 'code', 'deprec', 'encode', 'exception', 'final', 'ingroup', 'inheritdoc', 'inheritDoc', 'magic', 'name', 'toc', 'tutorial', 'private', 'static', 'staticvar', 'staticVar', 'throw', 'api', 'author', 'category', 'copyright', 'deprecated', 'example', 'filesource', 'global', 'ignore', 'internal', 'license', 'link', 'method', 'package', 'param', 'property', 'property-read', 'property-write', 'return', 'see', 'since', 'source', 'subpackage', 'throws', 'todo', 'TODO', 'usedBy', 'uses', 'var', 'version', 'after', 'afterClass', 'backupGlobals', 'backupStaticAttributes', 'before', 'beforeClass', 'codeCoverageIgnore', 'codeCoverageIgnoreStart', 'codeCoverageIgnoreEnd', 'covers', 'coversDefaultClass', 'coversNothing', 'dataProvider', 'depends', 'expectedException', 'expectedExceptionCode', 'expectedExceptionMessage', 'expectedExceptionMessageRegExp', 'group', 'large', 'medium', 'preserveGlobalState', 'requires', 'runTestsInSeparateProcesses', 'runInSeparateProcess', 'small', 'test', 'testdox', 'ticket', 'uses', 'SuppressWarnings', 'noinspection', 'package_version', 'enduml', 'startuml', 'psalm', 'phpstan', 'template', 'fix', 'FIXME', 'fixme', 'override']``
  12. ``indent_mixed_lines``
  13. ~~~~~~~~~~~~~~~~~~~~~~
  14. Whether to indent lines that have content before closing parenthesis.
  15. Allowed types: ``bool``
  16. Default value: ``false``
  17. Examples
  18. --------
  19. Example #1
  20. ~~~~~~~~~~
  21. *Default* configuration.
  22. .. code-block:: diff
  23. --- Original
  24. +++ New
  25. <?php
  26. /**
  27. - * @Foo(
  28. - * foo="foo"
  29. - * )
  30. + * @Foo(
  31. + * foo="foo"
  32. + * )
  33. */
  34. class Bar {}
  35. Example #2
  36. ~~~~~~~~~~
  37. With configuration: ``['indent_mixed_lines' => true]``.
  38. .. code-block:: diff
  39. --- Original
  40. +++ New
  41. <?php
  42. /**
  43. - * @Foo({@Bar,
  44. - * @Baz})
  45. + * @Foo({@Bar,
  46. + * @Baz})
  47. */
  48. class Bar {}
  49. Rule sets
  50. ---------
  51. The rule is part of the following rule set:
  52. - `@DoctrineAnnotation <./../../ruleSets/DoctrineAnnotation.rst>`_