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 namespace Illuminate\Tests\View\Blade; class BladeInjectTest extends AbstractBlade..

Decoded Output download

<?php

namespace Illuminate\Tests\View\Blade;

class BladeInjectTest extends AbstractBladeTestCase
{
    public function testDependenciesInjectedAsStringsAreCompiled()
    {
        $string = "Foo @inject('baz', 'SomeNamespace\SomeClass') bar";
        $expected = "Foo <?php \$baz = app('SomeNamespace\SomeClass'); ?> bar";
        $this->assertEquals($expected, $this->compiler->compileString($string));
    }

    public function testDependenciesInjectedAsStringsAreCompiledWhenInjectedWithDoubleQuotes()
    {
        $string = 'Foo @inject("baz", "SomeNamespace\SomeClass") bar';
        $expected = 'Foo <?php $baz = app("SomeNamespace\SomeClass"); ?> bar';
        $this->assertEquals($expected, $this->compiler->compileString($string));
    }

    public function testDependenciesAreCompiled()
    {
        $string = "Foo @inject('baz', SomeNamespace\SomeClass::class) bar";
        $expected = "Foo <?php \$baz = app(SomeNamespace\SomeClass::class); ?> bar";
        $this->assertEquals($expected, $this->compiler->compileString($string));
    }

    public function testDependenciesAreCompiledWithDoubleQuotes()
    {
        $string = 'Foo @inject("baz", SomeNamespace\SomeClass::class) bar';
        $expected = "Foo <?php \$baz = app(SomeNamespace\SomeClass::class); ?> bar";
        $this->assertEquals($expected, $this->compiler->compileString($string));
    }
}

Did this file decode correctly?

Original Code

<?php

namespace Illuminate\Tests\View\Blade;

class BladeInjectTest extends AbstractBladeTestCase
{
    public function testDependenciesInjectedAsStringsAreCompiled()
    {
        $string = "Foo @inject('baz', 'SomeNamespace\SomeClass') bar";
        $expected = "Foo <?php \$baz = app('SomeNamespace\SomeClass'); ?> bar";
        $this->assertEquals($expected, $this->compiler->compileString($string));
    }

    public function testDependenciesInjectedAsStringsAreCompiledWhenInjectedWithDoubleQuotes()
    {
        $string = 'Foo @inject("baz", "SomeNamespace\SomeClass") bar';
        $expected = 'Foo <?php $baz = app("SomeNamespace\SomeClass"); ?> bar';
        $this->assertEquals($expected, $this->compiler->compileString($string));
    }

    public function testDependenciesAreCompiled()
    {
        $string = "Foo @inject('baz', SomeNamespace\SomeClass::class) bar";
        $expected = "Foo <?php \$baz = app(SomeNamespace\SomeClass::class); ?> bar";
        $this->assertEquals($expected, $this->compiler->compileString($string));
    }

    public function testDependenciesAreCompiledWithDoubleQuotes()
    {
        $string = 'Foo @inject("baz", SomeNamespace\SomeClass::class) bar';
        $expected = "Foo <?php \$baz = app(SomeNamespace\SomeClass::class); ?> bar";
        $this->assertEquals($expected, $this->compiler->compileString($string));
    }
}

Function Calls

None

Variables

None

Stats

MD5 a9de3183764b1f0b190d926069ed3e58
Eval Count 0
Decode Time 111 ms