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 Doctrine\Performance\Mock; use Doctrine\ORM\Ma..

Decoded Output download

<?php

declare(strict_types=1);

namespace Doctrine\Performance\Mock;

use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\ORM\Persisters\Entity\BasicEntityPersister;

/**
 * A persister that doesn't actually load given objects
 */
class NonLoadingPersister extends BasicEntityPersister
{
    public function __construct(
        ClassMetadata $class,
    ) {
        $this->class = $class;
    }

    public function loadById(array $identifier, object|null $entity = null): object|null
    {
        return $entity ?? new ($this->class->name)();
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

declare(strict_types=1);

namespace Doctrine\Performance\Mock;

use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\ORM\Persisters\Entity\BasicEntityPersister;

/**
 * A persister that doesn't actually load given objects
 */
class NonLoadingPersister extends BasicEntityPersister
{
    public function __construct(
        ClassMetadata $class,
    ) {
        $this->class = $class;
    }

    public function loadById(array $identifier, object|null $entity = null): object|null
    {
        return $entity ?? new ($this->class->name)();
    }
}

Function Calls

None

Variables

None

Stats

MD5 d345ad7d91ad6a88907d470b76ae8b01
Eval Count 0
Decode Time 127 ms