File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed
lib/Doctrine/Common/Annotations
tests/Doctrine/Tests/Common/Annotations Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,9 @@ class AnnotationReader implements Reader
104
104
'experimental ' => true ,
105
105
// Slevomat Coding Standard
106
106
'phpcsSuppress ' => true ,
107
+ // PHP CodeSniffer
108
+ 'codingStandardsIgnoreStart ' => true ,
109
+ 'codingStandardsIgnoreEnd ' => true ,
107
110
];
108
111
109
112
/**
Original file line number Diff line number Diff line change 7
7
use Doctrine \Common \Annotations \DocParser ;
8
8
use Doctrine \Tests \Common \Annotations \Fixtures \Annotation \SingleUseAnnotation ;
9
9
use Doctrine \Tests \Common \Annotations \Fixtures \ClassWithFullPathUseStatement ;
10
+ use Doctrine \Tests \Common \Annotations \Fixtures \ClassWithPHPCodeSnifferAnnotation ;
10
11
use Doctrine \Tests \Common \Annotations \Fixtures \ClassWithPhpCsSuppressAnnotation ;
11
12
use Doctrine \Tests \Common \Annotations \Fixtures \IgnoredNamespaces \AnnotatedAtClassLevel ;
12
13
use Doctrine \Tests \Common \Annotations \Fixtures \IgnoredNamespaces \AnnotatedAtMethodLevel ;
@@ -156,4 +157,12 @@ public function testGloballyIgnoredAnnotationNotIgnored() : void
156
157
spl_autoload_unregister ($ testLoader );
157
158
}
158
159
}
160
+
161
+ public function testPHPCodeSnifferAnnotationsAreIgnored ()
162
+ {
163
+ $ reader = $ this ->getReader ();
164
+ $ ref = new \ReflectionClass (ClassWithPHPCodeSnifferAnnotation::class);
165
+
166
+ self ::assertEmpty ($ reader ->getClassAnnotations ($ ref ));
167
+ }
159
168
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Doctrine \Tests \Common \Annotations \Fixtures ;
4
+
5
+ /**
6
+ * @codingStandardsIgnoreStart
7
+ * @codingStandardsIgnoreEnd
8
+ */
9
+ class ClassWithPHPCodeSnifferAnnotation
10
+ {
11
+ }
You can’t perform that action at this time.
0 commit comments