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 Sabre\CardDAV; use PHPUnit\Framework\TestCase;..

Decoded Output download

<?php

declare(strict_types=1);

namespace Sabre\CardDAV;

use PHPUnit\Framework\TestCase;
use Sabre\CardDAV\Backend\Mock;
use Sabre\DAV\Server;
use Sabre\DAVACL;
use Sabre\HTTP;

abstract class AbstractPluginTestCase extends TestCase
{
    /**
     * @var Plugin
     */
    protected $plugin;
    /**
     * @var Server
     */
    protected $server;
    /**
     * @var Mock;
     */
    protected $backend;

    public function setup(): void
    {
        $this->backend = new Backend\Mock();
        $principalBackend = new DAVACL\PrincipalBackend\Mock();

        $tree = [
            new AddressBookRoot($principalBackend, $this->backend),
            new DAVACL\PrincipalCollection($principalBackend),
        ];

        $this->plugin = new Plugin();
        $this->plugin->directories = ['directory'];
        $this->server = new Server($tree);
        $this->server->sapi = new HTTP\SapiMock();
        $this->server->addPlugin($this->plugin);
        $this->server->debugExceptions = true;
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

declare(strict_types=1);

namespace Sabre\CardDAV;

use PHPUnit\Framework\TestCase;
use Sabre\CardDAV\Backend\Mock;
use Sabre\DAV\Server;
use Sabre\DAVACL;
use Sabre\HTTP;

abstract class AbstractPluginTestCase extends TestCase
{
    /**
     * @var Plugin
     */
    protected $plugin;
    /**
     * @var Server
     */
    protected $server;
    /**
     * @var Mock;
     */
    protected $backend;

    public function setup(): void
    {
        $this->backend = new Backend\Mock();
        $principalBackend = new DAVACL\PrincipalBackend\Mock();

        $tree = [
            new AddressBookRoot($principalBackend, $this->backend),
            new DAVACL\PrincipalCollection($principalBackend),
        ];

        $this->plugin = new Plugin();
        $this->plugin->directories = ['directory'];
        $this->server = new Server($tree);
        $this->server->sapi = new HTTP\SapiMock();
        $this->server->addPlugin($this->plugin);
        $this->server->debugExceptions = true;
    }
}

Function Calls

None

Variables

None

Stats

MD5 ba7a5d7ec9018eb84a53ea040a5ef9d4
Eval Count 0
Decode Time 101 ms