File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ class DiagnosticsLogger
17
17
/** @var array */
18
18
protected const ALGOLIA_TAGS = ['group ' => 'algolia ' ];
19
19
protected const PROFILE_LOG_MESSAGES_DEFAULT = false ;
20
+ protected const DEFAULT_NAMESPACE_DEPTH = 2 ;
21
+
20
22
protected bool $ isLoggerEnabled = false ;
21
23
protected bool $ isProfilerEnabled = false ;
22
24
@@ -140,12 +142,12 @@ protected function getCallingMethodName(int $level = 2): ?string
140
142
: null ;
141
143
}
142
144
143
- protected function simplifyMethodName (string $ methodName , int $ namespaceDepth = 2 ): string
145
+ protected function simplifyMethodName (string $ methodName , int $ namespaceDepth = self :: DEFAULT_NAMESPACE_DEPTH ): string
144
146
{
145
147
$ separator = '\\' ;
146
148
$ parts = explode ($ separator , $ methodName );
147
149
148
- if (count ($ parts ) <= $ namespaceDepth ) {
150
+ if (count ($ parts ) <= abs ( $ namespaceDepth) ) {
149
151
return $ methodName ;
150
152
}
151
153
You can’t perform that action at this time.
0 commit comments