Файловый менеджер - Редактировать - /home/kckglobal/public_html/portal/vendor/nunomaduro/larastan/src/Methods/StorageMethodsClassReflectionExtension.php
Назад
<?php declare(strict_types=1); namespace NunoMaduro\Larastan\Methods; use Illuminate\Filesystem\FilesystemAdapter; use Illuminate\Filesystem\FilesystemManager; use Illuminate\Support\Facades\Storage; use NunoMaduro\Larastan\Reflection\StaticMethodReflection; use PHPStan\Analyser\OutOfClassScope; use PHPStan\Reflection\ClassReflection; use PHPStan\Reflection\MethodReflection; use PHPStan\Reflection\MethodsClassReflectionExtension; use PHPStan\Reflection\ReflectionProvider; class StorageMethodsClassReflectionExtension implements MethodsClassReflectionExtension { /** * @var ReflectionProvider */ private $reflectionProvider; public function __construct(ReflectionProvider $reflectionProvider) { $this->reflectionProvider = $reflectionProvider; } public function hasMethod(ClassReflection $classReflection, string $methodName): bool { if ($classReflection->getName() !== Storage::class) { return false; } if ($this->reflectionProvider->getClass(FilesystemManager::class)->hasMethod($methodName)) { return true; } if ($this->reflectionProvider->getClass(FilesystemAdapter::class)->hasMethod($methodName)) { return true; } return false; } public function getMethod( ClassReflection $classReflection, string $methodName ): MethodReflection { if ($this->reflectionProvider->getClass(FilesystemManager::class)->hasMethod($methodName)) { return new StaticMethodReflection( $this->reflectionProvider->getClass(FilesystemManager::class)->getMethod($methodName, new OutOfClassScope()) ); } return new StaticMethodReflection( $this->reflectionProvider->getClass(FilesystemAdapter::class)->getMethod($methodName, new OutOfClassScope()) ); } }
| ver. 1.4 |
Github
|
.
| PHP 8.2.28 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка