Remove extraneous Introspection->isTraceClassOrSkippedFunction second parameter
This commit is contained in:
parent
59b5d080d5
commit
9dbcbe0482
|
@ -75,7 +75,7 @@ class Introspection implements IHaveCallIntrospections
|
||||||
|
|
||||||
$i = 1;
|
$i = 1;
|
||||||
|
|
||||||
while ($this->isTraceClassOrSkippedFunction($trace, $i)) {
|
while ($this->isTraceClassOrSkippedFunction($trace[$i] ?? [])) {
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,24 +92,23 @@ class Introspection implements IHaveCallIntrospections
|
||||||
/**
|
/**
|
||||||
* Checks if the current trace class or function has to be skipped
|
* Checks if the current trace class or function has to be skipped
|
||||||
*
|
*
|
||||||
* @param array $trace The current trace array
|
* @param array $traceItem The current trace item
|
||||||
* @param int $index The index of the current hierarchy level
|
|
||||||
*
|
*
|
||||||
* @return bool True if the class or function should get skipped, otherwise false
|
* @return bool True if the class or function should get skipped, otherwise false
|
||||||
*/
|
*/
|
||||||
private function isTraceClassOrSkippedFunction(array $trace, int $index): bool
|
private function isTraceClassOrSkippedFunction(array $traceItem): bool
|
||||||
{
|
{
|
||||||
if (!isset($trace[$index])) {
|
if (!$traceItem) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($trace[$index]['class'])) {
|
if (isset($traceItem['class'])) {
|
||||||
foreach ($this->skipClassesPartials as $part) {
|
foreach ($this->skipClassesPartials as $part) {
|
||||||
if (strpos($trace[$index]['class'], $part) !== false) {
|
if (strpos($traceItem['class'], $part) !== false) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif (in_array($trace[$index]['function'], $this->skipFunctions)) {
|
} elseif (in_array($traceItem['function'], $this->skipFunctions)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user