Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php declare(strict_types=1); namespace Larastan\Larastan\ReturnTypes; use Illuminate\..
Decoded Output download
<?php
declare(strict_types=1);
namespace Larastan\Larastan\ReturnTypes;
use Illuminate\Contracts\Foundation\Application;
use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Type\DynamicMethodReturnTypeExtension;
use PHPStan\Type\Type;
use function in_array;
final class ApplicationMakeDynamicReturnTypeExtension implements DynamicMethodReturnTypeExtension
{
public function __construct(
private AppMakeHelper $appMakeHelper,
) {
}
public function getClass(): string
{
return Application::class;
}
public function isMethodSupported(MethodReflection $methodReflection): bool
{
return in_array($methodReflection->getName(), ['make', 'makeWith', 'resolve'], true);
}
public function getTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope): Type
{
return $this->appMakeHelper->resolveTypeFromCall($methodCall, $scope);
}
}
?>
Did this file decode correctly?
Original Code
<?php
declare(strict_types=1);
namespace Larastan\Larastan\ReturnTypes;
use Illuminate\Contracts\Foundation\Application;
use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Type\DynamicMethodReturnTypeExtension;
use PHPStan\Type\Type;
use function in_array;
final class ApplicationMakeDynamicReturnTypeExtension implements DynamicMethodReturnTypeExtension
{
public function __construct(
private AppMakeHelper $appMakeHelper,
) {
}
public function getClass(): string
{
return Application::class;
}
public function isMethodSupported(MethodReflection $methodReflection): bool
{
return in_array($methodReflection->getName(), ['make', 'makeWith', 'resolve'], true);
}
public function getTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope): Type
{
return $this->appMakeHelper->resolveTypeFromCall($methodCall, $scope);
}
}
Function Calls
| None |
Stats
| MD5 | 5f28322452ad133f19d2db5e470866ad |
| Eval Count | 0 |
| Decode Time | 81 ms |