@@ -106,7 +106,7 @@ public function testTriggeredNotice(NoticeTriggered $event): void
106106 }
107107
108108 if ($ this ->source ->restrictNotices () &&
109- !( new SourceFilter )->includes ($ this -> source , $ event ->file ())) {
109+ !SourceFilter:: instance ( )->includes ($ event ->file ())) {
110110 return ;
111111 }
112112
@@ -124,7 +124,7 @@ public function testTriggeredPhpNotice(PhpNoticeTriggered $event): void
124124 }
125125
126126 if ($ this ->source ->restrictNotices () &&
127- !( new SourceFilter )->includes ($ this -> source , $ event ->file ())) {
127+ !SourceFilter:: instance ( )->includes ($ event ->file ())) {
128128 return ;
129129 }
130130
@@ -142,7 +142,7 @@ public function testTriggeredDeprecation(DeprecationTriggered $event): void
142142 }
143143
144144 if ($ this ->source ->restrictDeprecations () &&
145- !( new SourceFilter )->includes ($ this -> source , $ event ->file ())) {
145+ !SourceFilter:: instance ( )->includes ($ event ->file ())) {
146146 return ;
147147 }
148148
@@ -160,7 +160,7 @@ public function testTriggeredPhpDeprecation(PhpDeprecationTriggered $event): voi
160160 }
161161
162162 if ($ this ->source ->restrictDeprecations () &&
163- !( new SourceFilter )->includes ($ this -> source , $ event ->file ())) {
163+ !SourceFilter:: instance ( )->includes ($ event ->file ())) {
164164 return ;
165165 }
166166
@@ -188,7 +188,7 @@ public function testTriggeredWarning(WarningTriggered $event): void
188188 }
189189
190190 if ($ this ->source ->restrictWarnings () &&
191- !( new SourceFilter )->includes ($ this -> source , $ event ->file ())) {
191+ !SourceFilter:: instance ( )->includes ($ event ->file ())) {
192192 return ;
193193 }
194194
@@ -206,7 +206,7 @@ public function testTriggeredPhpWarning(PhpWarningTriggered $event): void
206206 }
207207
208208 if ($ this ->source ->restrictWarnings () &&
209- !( new SourceFilter )->includes ($ this -> source , $ event ->file ())) {
209+ !SourceFilter:: instance ( )->includes ($ event ->file ())) {
210210 return ;
211211 }
212212
0 commit comments