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 /** * This file is part of the Cloudinary PHP package. * * (c) Cloudinary * * F..

Decoded Output download

<?php
/**
 * This file is part of the Cloudinary PHP package.
 *
 * (c) Cloudinary
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Cloudinary\Test\Unit\Asset;

use Cloudinary\Asset\Video;
use Cloudinary\Transformation\AspectRatio;
use Cloudinary\Transformation\Qualifier\Dimensions\Width;
use Cloudinary\Transformation\Scale;

/**
 * Class VideoTest
 */
final class VideoTest extends AssetTestCase
{
    public function testVideo()
    {
        $v = new Video(self::VIDEO_NAME);

        $v->resize(Scale::scale(new Width(100), 200)->aspectRatio(AspectRatio::ignoreInitialAspectRatio()));

        $t_expected = 'c_scale,fl_ignore_aspect_ratio,h_200,w_100';

        self::assertEquals(
            $t_expected,
            (string)$v->getTransformation()
        );

        self::assertVideoUrl(
            "{$t_expected}/" . self::VIDEO_NAME,
            (string)$v
        );
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php
/**
 * This file is part of the Cloudinary PHP package.
 *
 * (c) Cloudinary
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Cloudinary\Test\Unit\Asset;

use Cloudinary\Asset\Video;
use Cloudinary\Transformation\AspectRatio;
use Cloudinary\Transformation\Qualifier\Dimensions\Width;
use Cloudinary\Transformation\Scale;

/**
 * Class VideoTest
 */
final class VideoTest extends AssetTestCase
{
    public function testVideo()
    {
        $v = new Video(self::VIDEO_NAME);

        $v->resize(Scale::scale(new Width(100), 200)->aspectRatio(AspectRatio::ignoreInitialAspectRatio()));

        $t_expected = 'c_scale,fl_ignore_aspect_ratio,h_200,w_100';

        self::assertEquals(
            $t_expected,
            (string)$v->getTransformation()
        );

        self::assertVideoUrl(
            "{$t_expected}/" . self::VIDEO_NAME,
            (string)$v
        );
    }
}

Function Calls

None

Variables

None

Stats

MD5 9ab7a63f4c505440c26404d16fe9991c
Eval Count 0
Decode Time 76 ms