@@ -442,30 +442,11 @@ public function process()
442
442
continue ;
443
443
}
444
444
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 ) {
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 ) {
469
450
// We assume a / directory separator, as do the exclude rules
470
451
// most developers write, so we need a special case for any system
471
452
// that is different.
@@ -475,15 +456,36 @@ public function process()
475
456
476
457
$ pattern = '` ' .$ pattern .'`i ' ;
477
458
if (preg_match ($ pattern , $ this ->path ) === 1 ) {
478
- $ included = true ;
479
- break ;
459
+ $ this -> ignoredListeners [ $ class ] = true ;
460
+ continue ( 2 ) ;
480
461
}
481
462
}
482
463
483
- if ($ included === false ) {
484
- $ this ->ignoredListeners [$ class ] = true ;
485
- continue ;
486
- }
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
487
489
}//end if
488
490
489
491
$ this ->activeListener = $ class ;
0 commit comments