getVariable($objectName); $reflection = new \ReflectionObject($object); } catch (\InvalidArgumentException $e) { return []; } catch (\ReflectionException $e) { return []; } $methods = $reflection->getMethods(); foreach ($methods as $method) { if ($method->getName() === $functionName[1]) { return $this->getDefaultParameterCompletion($method->getParameters()); } } return []; } public function hasMatched(array $tokens): bool { $openBracket = \array_pop($tokens); if ($openBracket !== '(') { return false; } $functionName = \array_pop($tokens); if (!self::tokenIs($functionName, self::T_STRING)) { return false; } $operator = \array_pop($tokens); if (!self::tokenIs($operator, self::T_OBJECT_OPERATOR)) { return false; } return true; } }