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 use Spatie\MediaLibrary\Conversions\ImageGenerators\Avif; it('can convert a avif',..

Decoded Output download

<?php

use Spatie\MediaLibrary\Conversions\ImageGenerators\Avif;

it('can convert a avif', function () {
    $imageGenerator = new Avif;

    if (! $imageGenerator->requirementsAreInstalled()) {
        $this->markTestSkipped('Skipping avif test because requirements to run it are not met');
    }

    $media = $this->testModelWithoutMediaConversions->addMedia($this->getTestAvif())->toMediaCollection();

    expect($imageGenerator->canConvert($media))->toBeTrue();

    $imageFile = $imageGenerator->convert($media->getPath());

    expect(mime_content_type($imageFile))->toEqual('image/png');
});
 ?>

Did this file decode correctly?

Original Code

<?php

use Spatie\MediaLibrary\Conversions\ImageGenerators\Avif;

it('can convert a avif', function () {
    $imageGenerator = new Avif;

    if (! $imageGenerator->requirementsAreInstalled()) {
        $this->markTestSkipped('Skipping avif test because requirements to run it are not met');
    }

    $media = $this->testModelWithoutMediaConversions->addMedia($this->getTestAvif())->toMediaCollection();

    expect($imageGenerator->canConvert($media))->toBeTrue();

    $imageFile = $imageGenerator->convert($media->getPath());

    expect(mime_content_type($imageFile))->toEqual('image/png');
});

Function Calls

None

Variables

None

Stats

MD5 dddff74e669dfbf5dce073ae2b885ca1
Eval Count 0
Decode Time 77 ms