ImplicitlyIgnoredAnnotationNames.php 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <?php
  2. declare(strict_types=1);
  3. namespace Doctrine\Common\Annotations;
  4. /**
  5. * A list of annotations that are implicitly ignored during the parsing process.
  6. *
  7. * All names are case sensitive.
  8. */
  9. final class ImplicitlyIgnoredAnnotationNames
  10. {
  11. private const Reserved = [
  12. 'Annotation' => true,
  13. 'Attribute' => true,
  14. 'Attributes' => true,
  15. /* Can we enable this? 'Enum' => true, */
  16. 'Required' => true,
  17. 'Target' => true,
  18. 'NamedArgumentConstructor' => true,
  19. ];
  20. private const WidelyUsedNonStandard = [
  21. 'fix' => true,
  22. 'fixme' => true,
  23. 'override' => true,
  24. ];
  25. private const PhpDocumentor1 = [
  26. 'abstract' => true,
  27. 'access' => true,
  28. 'code' => true,
  29. 'deprec' => true,
  30. 'endcode' => true,
  31. 'exception' => true,
  32. 'final' => true,
  33. 'ingroup' => true,
  34. 'inheritdoc' => true,
  35. 'inheritDoc' => true,
  36. 'magic' => true,
  37. 'name' => true,
  38. 'private' => true,
  39. 'static' => true,
  40. 'staticvar' => true,
  41. 'staticVar' => true,
  42. 'toc' => true,
  43. 'tutorial' => true,
  44. 'throw' => true,
  45. ];
  46. private const PhpDocumentor2 = [
  47. 'api' => true,
  48. 'author' => true,
  49. 'category' => true,
  50. 'copyright' => true,
  51. 'deprecated' => true,
  52. 'example' => true,
  53. 'filesource' => true,
  54. 'global' => true,
  55. 'ignore' => true,
  56. /* Can we enable this? 'index' => true, */
  57. 'internal' => true,
  58. 'license' => true,
  59. 'link' => true,
  60. 'method' => true,
  61. 'package' => true,
  62. 'param' => true,
  63. 'property' => true,
  64. 'property-read' => true,
  65. 'property-write' => true,
  66. 'return' => true,
  67. 'see' => true,
  68. 'since' => true,
  69. 'source' => true,
  70. 'subpackage' => true,
  71. 'throws' => true,
  72. 'todo' => true,
  73. 'TODO' => true,
  74. 'usedby' => true,
  75. 'uses' => true,
  76. 'var' => true,
  77. 'version' => true,
  78. ];
  79. private const PHPUnit = [
  80. 'author' => true,
  81. 'after' => true,
  82. 'afterClass' => true,
  83. 'backupGlobals' => true,
  84. 'backupStaticAttributes' => true,
  85. 'before' => true,
  86. 'beforeClass' => true,
  87. 'codeCoverageIgnore' => true,
  88. 'codeCoverageIgnoreStart' => true,
  89. 'codeCoverageIgnoreEnd' => true,
  90. 'covers' => true,
  91. 'coversDefaultClass' => true,
  92. 'coversNothing' => true,
  93. 'dataProvider' => true,
  94. 'depends' => true,
  95. 'doesNotPerformAssertions' => true,
  96. 'expectedException' => true,
  97. 'expectedExceptionCode' => true,
  98. 'expectedExceptionMessage' => true,
  99. 'expectedExceptionMessageRegExp' => true,
  100. 'group' => true,
  101. 'large' => true,
  102. 'medium' => true,
  103. 'preserveGlobalState' => true,
  104. 'requires' => true,
  105. 'runTestsInSeparateProcesses' => true,
  106. 'runInSeparateProcess' => true,
  107. 'small' => true,
  108. 'test' => true,
  109. 'testdox' => true,
  110. 'testWith' => true,
  111. 'ticket' => true,
  112. 'uses' => true,
  113. ];
  114. private const PhpCheckStyle = ['SuppressWarnings' => true];
  115. private const PhpStorm = ['noinspection' => true];
  116. private const PEAR = ['package_version' => true];
  117. private const PlainUML = [
  118. 'startuml' => true,
  119. 'enduml' => true,
  120. ];
  121. private const Symfony = ['experimental' => true];
  122. private const PhpCodeSniffer = [
  123. 'codingStandardsIgnoreStart' => true,
  124. 'codingStandardsIgnoreEnd' => true,
  125. ];
  126. private const SlevomatCodingStandard = ['phpcsSuppress' => true];
  127. private const Phan = ['suppress' => true];
  128. private const Rector = ['noRector' => true];
  129. private const StaticAnalysis = [
  130. // PHPStan, Psalm
  131. 'extends' => true,
  132. 'implements' => true,
  133. 'readonly' => true,
  134. 'template' => true,
  135. 'use' => true,
  136. // Psalm
  137. 'pure' => true,
  138. 'immutable' => true,
  139. ];
  140. public const LIST = self::Reserved
  141. + self::WidelyUsedNonStandard
  142. + self::PhpDocumentor1
  143. + self::PhpDocumentor2
  144. + self::PHPUnit
  145. + self::PhpCheckStyle
  146. + self::PhpStorm
  147. + self::PEAR
  148. + self::PlainUML
  149. + self::Symfony
  150. + self::SlevomatCodingStandard
  151. + self::PhpCodeSniffer
  152. + self::Phan
  153. + self::Rector
  154. + self::StaticAnalysis;
  155. private function __construct()
  156. {
  157. }
  158. }