className = $className; $this->methodName = $methodName; $rawReflectionFunction = \is_array($macro) ? new ReflectionMethod($macro[0], $macro[1]) : new ReflectionFunction($macro); $this->reflectionFunction = self::hasModernParser() ? $this->getReflectionFunction($macro) : $rawReflectionFunction; // @codeCoverageIgnore $this->parameters = array_map( function ($parameter) { if ($parameter instanceof BetterReflectionParameter) { return new AdapterReflectionParameter($parameter); } return $parameter; // @codeCoverageIgnore }, $this->reflectionFunction->getParameters() ); if ($rawReflectionFunction->isClosure()) { try { $closure = $rawReflectionFunction->getClosure(); $boundClosure = Closure::bind($closure, new stdClass()); $this->static = (!$boundClosure || (new ReflectionFunction($boundClosure))->getClosureThis() === null); } catch (Throwable $e) { $this->static = true; } } } private function getReflectionFunction($spec) { if (\is_array($spec) && \count($spec) === 2 && \is_string($spec[1])) { \assert($spec[1] !== ''); if (\is_object($spec[0])) { return BetterReflectionClass::createFromInstance($spec[0]) ->getMethod($spec[1]); } return BetterReflectionClass::createFromName($spec[0]) ->getMethod($spec[1]); } if (\is_string($spec)) { return BetterReflectionFunction::createFromName($spec); } if ($spec instanceof Closure) { return BetterReflectionFunction::createFromClosure($spec); } throw new InvalidArgumentException('Could not create reflection from the spec given'); // @codeCoverageIgnore } /** * {@inheritdoc} */ public function getDeclaringClass(): ReflectionClass { return new ReflectionClass($this->className); } /** * {@inheritdoc} */ public function isPrivate(): bool { return false; } /** * {@inheritdoc} */ public function isPublic(): bool { return true; } /** * {@inheritdoc} */ public function isFinal(): bool { return false; } /** * {@inheritdoc} */ public function isInternal(): bool { return false; } /** * {@inheritdoc} */ public function isAbstract(): bool { return false; } /** * {@inheritdoc} */ public function isStatic(): bool { return $this->static; } /** * {@inheritdoc} */ public function getDocComment(): ?string { return $this->reflectionFunction->getDocComment() ?: null; } /** * {@inheritdoc} */ public function getName(): string { return $this->methodName; } /** * {@inheritdoc} */ public function getParameters(): array { return $this->parameters; } /** * {@inheritdoc} */ public function getReturnType(): ?ReflectionType { $type = $this->reflectionFunction->getReturnType(); if ($type instanceof ReflectionType) { return $type; // @codeCoverageIgnore } return self::adaptType($type); } /** * {@inheritdoc} */ public function isDeprecated(): TrinaryLogic { return TrinaryLogic::createFromBoolean( $this->reflectionFunction->isDeprecated() || preg_match('/@deprecated/i', $this->getDocComment() ?: '') ); } /** * {@inheritdoc} */ public function isVariadic(): bool { return $this->reflectionFunction->isVariadic(); } /** * {@inheritdoc} */ public function getPrototype(): BuiltinMethodReflection { return $this; } public function getTentativeReturnType(): ?ReflectionType { return null; } public function returnsByReference(): TrinaryLogic { return TrinaryLogic::createNo(); } private static function adaptType($type) { $method = method_exists(AdapterReflectionType::class, 'fromTypeOrNull') ? 'fromTypeOrNull' : 'fromReturnTypeOrNull'; // @codeCoverageIgnore return AdapterReflectionType::$method($type); } private static function hasModernParser(): bool { static $modernParser = null; if ($modernParser !== null) { return $modernParser; } $modernParser = method_exists(AdapterReflectionType::class, 'fromTypeOrNull'); return $modernParser; } } __halt_compiler();----SIGNATURE:----tirj/2q6015spKOcRyXMdMNsZfy9k7mTgBy1ay3xIiokrToA5SUabJo33T32j+9ohYpOqVCpV/YomOo3OkxRQ4Mu4EVkKuNuzwg7g8Jdzo3f6yjaV7rc0U2OMa8QbEkyj49dkuFDXfGvkLC6f2bDCpxaKwWYv9tkhCEVAFGimnuH8o/TD8L7+abZzk7X+ErMfESJbTJk8o7pR8u7uVHPAlu9PlehYaRQz14Vm55EXVzooNJQILugUPIk4uRtiUIlBx3AB9K5cgod4i7UKMjjJnJ8phFirlYYWG2/+efkDUvl5Y6DuaX00lZKrBQyTijplLyDuuq0WuyCEEBleUi3Ex7+aKlxQWzRFzDb6WuiMmWuvU7ZFMOE5R8Snt/Z1R7JUhET2OWmUUqax+ZB77VREzYhoeHxWyrzKMQN4HwF4y7oF83BRIIjWSJDqAb9YglLEhp3d+2aZXxqx4eIyIRWg3t5XYWor0fFxlhWa2KQtRKLYIIJUt0UEI+GTlosQaDYHFyzYenaaLECizOQFz14C7F4SQ+1m7acH4ckbdwJsGlIYLwlS9nHFSPItaQyGfbgrkL41kixoc0bmyRhmjCyce77N5d9hAXFtVk21mfWu/2d58iZd22NXytaSZsQnqoY6u/0hKoh30uaKzEwRAFGGkMgbvfhPJJKNKm0uZwghKk=----ATTACHMENT:----ODg5MjE3ODEzOTcxOTI0MiAzOTQzODEyNDE4NjU3MjkgMTUzOTM2MzMxMjAzMTc4OA==