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\Drivers\Imagick; ..
Decoded Output download
<?php
declare(strict_types=1);
namespace Intervention\Image\Tests\Unit\Drivers\Imagick;
use ImagickPixel;
use Intervention\Image\Colors\Rgb\Color;
use Intervention\Image\Colors\Rgb\Colorspace;
use Intervention\Image\Drivers\Imagick\ColorProcessor;
use Intervention\Image\Tests\BaseTestCase;
final class ColorProcessorTest extends BaseTestCase
{
public function testColorToNative(): void
{
$processor = new ColorProcessor(new Colorspace());
$result = $processor->colorToNative(new Color(255, 55, 0, 255));
$this->assertInstanceOf(ImagickPixel::class, $result);
}
public function testNativeToColor(): void
{
$processor = new ColorProcessor(new Colorspace());
$processor->nativeToColor(new ImagickPixel('rgb(255, 55, 0)'));
}
}
?>
Did this file decode correctly?
Original Code
<?php
declare(strict_types=1);
namespace Intervention\Image\Tests\Unit\Drivers\Imagick;
use ImagickPixel;
use Intervention\Image\Colors\Rgb\Color;
use Intervention\Image\Colors\Rgb\Colorspace;
use Intervention\Image\Drivers\Imagick\ColorProcessor;
use Intervention\Image\Tests\BaseTestCase;
final class ColorProcessorTest extends BaseTestCase
{
public function testColorToNative(): void
{
$processor = new ColorProcessor(new Colorspace());
$result = $processor->colorToNative(new Color(255, 55, 0, 255));
$this->assertInstanceOf(ImagickPixel::class, $result);
}
public function testNativeToColor(): void
{
$processor = new ColorProcessor(new Colorspace());
$processor->nativeToColor(new ImagickPixel('rgb(255, 55, 0)'));
}
}
Function Calls
None |
Stats
MD5 | 6f2d75854343cb3ce1450a7e02b5e2a8 |
Eval Count | 0 |
Decode Time | 116 ms |