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 TestApp\Model\Entity; use Cake\Datasource\Entit..

Decoded Output download

<?php
declare(strict_types=1);

namespace TestApp\Model\Entity;

use Cake\Datasource\EntityInterface;
use Cake\Datasource\EntityTrait;

/**
 * Tests entity class used for asserting correct loading
 */
class NonExtending implements EntityInterface
{
    use EntityTrait;

    public function __construct(array $properties = [], array $options = [])
    {
        $options += [
            'useSetters' => true,
            'markClean' => false,
            'markNew' => null,
            'guard' => false,
            'source' => null,
        ];

        if ($properties) {
            $this->set($properties, [
                'setter' => $options['useSetters'],
                'guard' => $options['guard'],
            ]);
        }

        if ($options['markClean']) {
            $this->clean();
        }

        if ($options['markNew'] !== null) {
            $this->isNew($options['markNew']);
        }

        if (!empty($options['source'])) {
            $this->source($options['source']);
        }
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php
declare(strict_types=1);

namespace TestApp\Model\Entity;

use Cake\Datasource\EntityInterface;
use Cake\Datasource\EntityTrait;

/**
 * Tests entity class used for asserting correct loading
 */
class NonExtending implements EntityInterface
{
    use EntityTrait;

    public function __construct(array $properties = [], array $options = [])
    {
        $options += [
            'useSetters' => true,
            'markClean' => false,
            'markNew' => null,
            'guard' => false,
            'source' => null,
        ];

        if ($properties) {
            $this->set($properties, [
                'setter' => $options['useSetters'],
                'guard' => $options['guard'],
            ]);
        }

        if ($options['markClean']) {
            $this->clean();
        }

        if ($options['markNew'] !== null) {
            $this->isNew($options['markNew']);
        }

        if (!empty($options['source'])) {
            $this->source($options['source']);
        }
    }
}

Function Calls

None

Variables

None

Stats

MD5 600eab4c5c60c019419bc18aeceb2247
Eval Count 0
Decode Time 83 ms