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 Tests\Rules; use Larastan\Larastan\Rules\Model..

Decoded Output download

<?php

declare(strict_types=1);

namespace Tests\Rules;

use Larastan\Larastan\Rules\ModelAppendsRule;
use PHPStan\Rules\Rule;
use PHPStan\Testing\RuleTestCase;

/** @extends RuleTestCase<ModelAppendsRule> */
class ModelAppendsRuleTest extends RuleTestCase
{
    protected function getRule(): Rule
    {
        return self::getContainer()->getByType(ModelAppendsRule::class);
    }

    public function testRule(): void
    {
        $this->analyse([__DIR__ . '/data/ModelAppends.php'], [
            ["Property 'non_existent' does not exist in model.", 15],
            ["Property 'email' is not a computed property, remove from \$appends.", 16],
            ["Property 'name' is not a computed property, remove from \$appends.", 17],
        ]);
    }

    /** @return string[] */
    public static function getAdditionalConfigFiles(): array
    {
        return [__DIR__ . '/../phpstan-tests.neon'];
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

declare(strict_types=1);

namespace Tests\Rules;

use Larastan\Larastan\Rules\ModelAppendsRule;
use PHPStan\Rules\Rule;
use PHPStan\Testing\RuleTestCase;

/** @extends RuleTestCase<ModelAppendsRule> */
class ModelAppendsRuleTest extends RuleTestCase
{
    protected function getRule(): Rule
    {
        return self::getContainer()->getByType(ModelAppendsRule::class);
    }

    public function testRule(): void
    {
        $this->analyse([__DIR__ . '/data/ModelAppends.php'], [
            ["Property 'non_existent' does not exist in model.", 15],
            ["Property 'email' is not a computed property, remove from \$appends.", 16],
            ["Property 'name' is not a computed property, remove from \$appends.", 17],
        ]);
    }

    /** @return string[] */
    public static function getAdditionalConfigFiles(): array
    {
        return [__DIR__ . '/../phpstan-tests.neon'];
    }
}

Function Calls

None

Variables

None

Stats

MD5 da5122989b49c9d7c0404b1e511e91ce
Eval Count 0
Decode Time 109 ms