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\Methods; use Larastan\Larast..

Decoded Output download

<?php

declare(strict_types=1);

namespace Larastan\Larastan\Methods;

use Larastan\Larastan\Reflection\DynamicWhereMethodReflection;
use PHPStan\Reflection;

use function str_starts_with;

class RedirectResponseMethodsClassReflectionExtension implements Reflection\MethodsClassReflectionExtension
{
    public function hasMethod(Reflection\ClassReflection $classReflection, string $methodName): bool
    {
        if ($classReflection->getName() !== 'Illuminate\Http\RedirectResponse') {
            return false;
        }

        // @phpcs:ignore
        if (! str_starts_with($methodName, 'with')) {
            return false;
        }

        return true;
    }

    public function getMethod(
        Reflection\ClassReflection $classReflection,
        string $methodName,
    ): Reflection\MethodReflection {
        return new DynamicWhereMethodReflection($classReflection, $methodName);
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

declare(strict_types=1);

namespace Larastan\Larastan\Methods;

use Larastan\Larastan\Reflection\DynamicWhereMethodReflection;
use PHPStan\Reflection;

use function str_starts_with;

class RedirectResponseMethodsClassReflectionExtension implements Reflection\MethodsClassReflectionExtension
{
    public function hasMethod(Reflection\ClassReflection $classReflection, string $methodName): bool
    {
        if ($classReflection->getName() !== 'Illuminate\Http\RedirectResponse') {
            return false;
        }

        // @phpcs:ignore
        if (! str_starts_with($methodName, 'with')) {
            return false;
        }

        return true;
    }

    public function getMethod(
        Reflection\ClassReflection $classReflection,
        string $methodName,
    ): Reflection\MethodReflection {
        return new DynamicWhereMethodReflection($classReflection, $methodName);
    }
}

Function Calls

None

Variables

None

Stats

MD5 7bdd2e0ab78cfd1d24c85e00e0d494c4
Eval Count 0
Decode Time 113 ms