public static function find($message, $index = 0, $times = 0, &$args = [])
    {
        $success = false;
        $messages = !is_array($message) ? [$message] : $message;

        $message = reset($messages);
        $reference = $message->reference();
        $reference = $message->isStatic() && is_object($reference) ? get_class($reference) : $reference;

        $lastFound = null;

        $count = count(static::$_logs);

        for ($i = $index; $i < $count; $i++) {
            $logs = static::$_logs[$i];
            if (!$log = static::_matchReference($reference, $logs)) {
                continue;
            }

            if (!$message->match($log, false)) {
                continue;
            }
            $args[] = $log['args'];

            if (!$message->matchArgs($log['args'])) {
                continue;
            }

            if ($message = next($messages)) {
                $lastFound = $message;
                if (!$reference = $message->reference() && $log['method']) {
                    $reference = $log['method']->actualReturn();
                }
                if (!is_object($reference)) {
                    $message = reset($messages);
                    $reference = $message->reference();
                }
                $reference = $message->isStatic() && is_object($reference) ? get_class($reference) : $reference;
                continue;
            }

            $times -= 1;
            if ($times < 0) {
                $success = true;
                static::find($messages, $i + 1, 0, $args);
                static::$_index = $i + 1;
                break;
            } elseif ($times === 0) {
                $next = static::find($messages, $i + 1, 0, $args);
                if ($next['success']) {
                    $success = false;
                } else {
                    $success = true;
                    static::$_index = $i + 1;
                }
                break;
            }
            return static::find($messages, $i + 1, $times, $args);
        }
        $index = static::$_index;
        $message = $lastFound ?: reset($messages);
        return compact('success', 'message', 'args', 'index');
    }