@@ -442,11 +442,30 @@ public function process()
442
442
continue ;
443
443
}
444
444
445
- if (trim ($ this ->path , '\'" ' ) !== 'STDIN ' ) {
446
- // If the file path matches one of our ignore patterns, skip it.
447
- // While there is support for a type of each pattern
448
- // (absolute or relative) we don't actually support it here.
449
- foreach ($ listenerData ['ignore ' ] as $ pattern ) {
445
+ // If the file path matches one of our ignore patterns, skip it.
446
+ // While there is support for a type of each pattern
447
+ // (absolute or relative) we don't actually support it here.
448
+ foreach ($ listenerData ['ignore ' ] as $ pattern ) {
449
+ // We assume a / directory separator, as do the exclude rules
450
+ // most developers write, so we need a special case for any system
451
+ // that is different.
452
+ if (DIRECTORY_SEPARATOR === '\\' ) {
453
+ $ pattern = str_replace ('/ ' , '\\\\' , $ pattern );
454
+ }
455
+
456
+ $ pattern = '` ' .$ pattern .'`i ' ;
457
+ if (preg_match ($ pattern , $ this ->path ) === 1 ) {
458
+ $ this ->ignoredListeners [$ class ] = true ;
459
+ continue (2 );
460
+ }
461
+ }
462
+
463
+ // If the file path does not match one of our include patterns, skip it.
464
+ // While there is support for a type of each pattern
465
+ // (absolute or relative) we don't actually support it here.
466
+ if (empty ($ listenerData ['include ' ]) === false ) {
467
+ $ included = false ;
468
+ foreach ($ listenerData ['include ' ] as $ pattern ) {
450
469
// We assume a / directory separator, as do the exclude rules
451
470
// most developers write, so we need a special case for any system
452
471
// that is different.
@@ -456,36 +475,15 @@ public function process()
456
475
457
476
$ pattern = '` ' .$ pattern .'`i ' ;
458
477
if (preg_match ($ pattern , $ this ->path ) === 1 ) {
459
- $ this -> ignoredListeners [ $ class ] = true ;
460
- continue ( 2 ) ;
478
+ $ included = true ;
479
+ break ;
461
480
}
462
481
}
463
482
464
- // If the file path does not match one of our include patterns, skip it.
465
- // While there is support for a type of each pattern
466
- // (absolute or relative) we don't actually support it here.
467
- if (empty ($ listenerData ['include ' ]) === false ) {
468
- $ included = false ;
469
- foreach ($ listenerData ['include ' ] as $ pattern ) {
470
- // We assume a / directory separator, as do the exclude rules
471
- // most developers write, so we need a special case for any system
472
- // that is different.
473
- if (DIRECTORY_SEPARATOR === '\\' ) {
474
- $ pattern = str_replace ('/ ' , '\\\\' , $ pattern );
475
- }
476
-
477
- $ pattern = '` ' .$ pattern .'`i ' ;
478
- if (preg_match ($ pattern , $ this ->path ) === 1 ) {
479
- $ included = true ;
480
- break ;
481
- }
482
- }
483
-
484
- if ($ included === false ) {
485
- $ this ->ignoredListeners [$ class ] = true ;
486
- continue ;
487
- }
488
- }//end if
483
+ if ($ included === false ) {
484
+ $ this ->ignoredListeners [$ class ] = true ;
485
+ continue ;
486
+ }
489
487
}//end if
490
488
491
489
$ this ->activeListener = $ class ;
0 commit comments