@@ -110,8 +110,7 @@ public static function register($mode = 0)
110110
111111 $ trace = debug_backtrace (true );
112112 $ group = 'other ' ;
113- $ isVendor = false ;
114- $ isWeak = DeprecationErrorHandler::MODE_WEAK === $ mode || (DeprecationErrorHandler::MODE_WEAK_VENDORS === $ mode && $ isVendor = $ inVendors ($ file ));
113+ $ isVendor = DeprecationErrorHandler::MODE_WEAK_VENDORS === $ mode && $ inVendors ($ file );
115114
116115 $ i = count ($ trace );
117116 while (1 < $ i && (!isset ($ trace [--$ i ]['class ' ]) || ('ReflectionMethod ' === $ trace [$ i ]['class ' ] || 0 === strpos ($ trace [$ i ]['class ' ], 'PHPUnit_ ' ) || 0 === strpos ($ trace [$ i ]['class ' ], 'PHPUnit \\' )))) {
@@ -128,7 +127,7 @@ public static function register($mode = 0)
128127 // \Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerTrait::endTest()
129128 // then we need to use the serialized information to determine
130129 // if the error has been triggered from vendor code.
131- $ isWeak = DeprecationErrorHandler::MODE_WEAK === $ mode || (DeprecationErrorHandler:: MODE_WEAK_VENDORS === $ mode && $ isVendor = isset ($ parsedMsg ['triggering_file ' ]) && $ inVendors ($ parsedMsg ['triggering_file ' ]) );
130+ $ isVendor = DeprecationErrorHandler::MODE_WEAK_VENDORS === $ mode && isset ($ parsedMsg ['triggering_file ' ]) && $ inVendors ($ parsedMsg ['triggering_file ' ]);
132131 } else {
133132 $ class = isset ($ trace [$ i ]['object ' ]) ? get_class ($ trace [$ i ]['object ' ]) : $ trace [$ i ]['class ' ];
134133 $ method = $ trace [$ i ]['function ' ];
@@ -145,7 +144,7 @@ public static function register($mode = 0)
145144 || in_array ('legacy ' , $ Test ::getGroups ($ class , $ method ), true )
146145 ) {
147146 $ group = 'legacy ' ;
148- } elseif (DeprecationErrorHandler:: MODE_WEAK_VENDORS === $ mode && $ isVendor ) {
147+ } elseif ($ isVendor ) {
149148 $ group = 'remaining vendor ' ;
150149 } else {
151150 $ group = 'remaining ' ;
@@ -165,13 +164,13 @@ public static function register($mode = 0)
165164
166165 exit (1 );
167166 }
168- if ('legacy ' !== $ group && ! $ isWeak ) {
167+ if ('legacy ' !== $ group && DeprecationErrorHandler:: MODE_WEAK !== $ mode ) {
169168 $ ref = &$ deprecations [$ group ][$ msg ]['count ' ];
170169 ++$ ref ;
171170 $ ref = &$ deprecations [$ group ][$ msg ][$ class .':: ' .$ method ];
172171 ++$ ref ;
173172 }
174- } elseif (! $ isWeak ) {
173+ } elseif (DeprecationErrorHandler:: MODE_WEAK !== $ mode ) {
175174 $ ref = &$ deprecations [$ group ][$ msg ]['count ' ];
176175 ++$ ref ;
177176 }
0 commit comments