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 Intervention\Image\Tests\Unit\Geometry\Factorie..

Decoded Output download

<?php

declare(strict_types=1);

namespace Intervention\Image\Tests\Unit\Geometry\Factories;

use Intervention\Image\Geometry\Ellipse;
use Intervention\Image\Geometry\Factories\EllipseFactory;
use Intervention\Image\Geometry\Point;
use Intervention\Image\Tests\BaseTestCase;

final class EllipseFactoryTest extends BaseTestCase
{
    public function testFactoryCallback(): void
    {
        $factory = new EllipseFactory(new Point(1, 2), function ($ellipse) {
            $ellipse->background('fff');
            $ellipse->border('ccc', 10);
            $ellipse->width(100);
            $ellipse->height(200);
            $ellipse->size(1000, 2000);
        });

        $ellipse = $factory();
        $this->assertInstanceOf(Ellipse::class, $ellipse);
        $this->assertTrue($ellipse->hasBackgroundColor());
        $this->assertEquals('fff', $ellipse->backgroundColor());
        $this->assertEquals('ccc', $ellipse->borderColor());
        $this->assertEquals(10, $ellipse->borderSize());
        $this->assertEquals(1000, $ellipse->width());
        $this->assertEquals(2000, $ellipse->height());
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

declare(strict_types=1);

namespace Intervention\Image\Tests\Unit\Geometry\Factories;

use Intervention\Image\Geometry\Ellipse;
use Intervention\Image\Geometry\Factories\EllipseFactory;
use Intervention\Image\Geometry\Point;
use Intervention\Image\Tests\BaseTestCase;

final class EllipseFactoryTest extends BaseTestCase
{
    public function testFactoryCallback(): void
    {
        $factory = new EllipseFactory(new Point(1, 2), function ($ellipse) {
            $ellipse->background('fff');
            $ellipse->border('ccc', 10);
            $ellipse->width(100);
            $ellipse->height(200);
            $ellipse->size(1000, 2000);
        });

        $ellipse = $factory();
        $this->assertInstanceOf(Ellipse::class, $ellipse);
        $this->assertTrue($ellipse->hasBackgroundColor());
        $this->assertEquals('fff', $ellipse->backgroundColor());
        $this->assertEquals('ccc', $ellipse->borderColor());
        $this->assertEquals(10, $ellipse->borderSize());
        $this->assertEquals(1000, $ellipse->width());
        $this->assertEquals(2000, $ellipse->height());
    }
}

Function Calls

None

Variables

None

Stats

MD5 54498dc703e00080056dd3fbe663e550
Eval Count 0
Decode Time 87 ms