@@ -346,7 +346,6 @@ public function process()
346
346
$ listenerIgnoreTo = [];
347
347
$ inTests = defined ('PHP_CODESNIFFER_IN_TESTS ' );
348
348
$ checkAnnotations = $ this ->config ->annotations ;
349
- $ annotationErrors = [];
350
349
351
350
// Foreach of the listeners that have registered to listen for this
352
351
// token, get them to process it.
@@ -415,15 +414,7 @@ public function process()
415
414
'scope ' => 'sniff ' ,
416
415
];
417
416
$ listenerClass = $ this ->ruleset ->sniffCodes [$ listenerCode ];
418
- try {
419
- $ this ->ruleset ->setSniffProperty ($ listenerClass , $ propertyCode , $ settings );
420
- } catch (RuntimeException $ e ) {
421
- // Non-existant property being set via an inline annotation.
422
- // This is typically a PHPCS test case file, but we can't throw an error on the annotation
423
- // line as it would get ignored. We also don't want this error to block
424
- // the scan of the current file, so collect these and throw later.
425
- $ annotationErrors [] = 'Line ' .$ token ['line ' ].': ' .str_replace ('Ruleset invalid. ' , '' , $ e ->getMessage ());
426
- }
417
+ $ this ->ruleset ->setSniffProperty ($ listenerClass , $ propertyCode , $ settings );
427
418
}
428
419
}
429
420
}//end if
@@ -553,13 +544,6 @@ public function process()
553
544
}
554
545
}
555
546
556
- if ($ annotationErrors !== []) {
557
- $ error = 'Encountered invalid inline phpcs:set annotations. Found: ' .PHP_EOL ;
558
- $ error .= implode (PHP_EOL , $ annotationErrors );
559
-
560
- $ this ->addWarning ($ error , null , 'Internal.PropertyDoesNotExist ' );
561
- }
562
-
563
547
if (PHP_CODESNIFFER_VERBOSITY > 2 ) {
564
548
echo "\t*** END TOKEN PROCESSING *** " .PHP_EOL ;
565
549
echo "\t*** START SNIFF PROCESSING REPORT *** " .PHP_EOL ;
0 commit comments