public function matches($point, $context = null, $instance = null, array $arguments = null)
{
// With single parameter (statically) always matches
if (!$instance) {
return true;
}
$trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
foreach ($trace as $stackFrame) {
if (!isset($stackFrame['class'])) {
continue;
}
$refClass = new ReflectionClass($stackFrame['class']);
if (!$this->internalClassFilter->matches($refClass)) {
continue;
}
$refMethod = new ReflectionMethod($stackFrame['class'], $stackFrame['function']);
if ($this->internalPointFilter->matches($refMethod)) {
return true;
}
}
return false;
}