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\Tests\Models\GH10334; use Doctrine\OR..

Decoded Output download

<?php

declare(strict_types=1);

namespace Doctrine\Tests\Models\GH10334;

use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\GeneratedValue;
use Doctrine\ORM\Mapping\Id;
use Doctrine\ORM\Mapping\JoinColumn;
use Doctrine\ORM\Mapping\ManyToOne;

#[Entity]
class GH10334Product
{
    #[Id]
    #[Column(name: 'product_id', type: 'integer')]
    #[GeneratedValue]
    protected int $id;

    #[Column(name: 'name', type: 'string')]
    private string $name;

    #[ManyToOne(targetEntity: 'GH10334ProductType', inversedBy: 'products')]
    #[JoinColumn(name: 'product_type_id', referencedColumnName: 'id', nullable: false)]
    private GH10334ProductType $productType;

    public function __construct(string $name, GH10334ProductType $productType)
    {
        $this->name        = $name;
        $this->productType = $productType;
    }

    public function getProductType(): GH10334ProductType
    {
        return $this->productType;
    }

    public function setProductType(GH10334ProductType $productType): void
    {
        $this->productType = $productType;
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

declare(strict_types=1);

namespace Doctrine\Tests\Models\GH10334;

use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\GeneratedValue;
use Doctrine\ORM\Mapping\Id;
use Doctrine\ORM\Mapping\JoinColumn;
use Doctrine\ORM\Mapping\ManyToOne;

#[Entity]
class GH10334Product
{
    #[Id]
    #[Column(name: 'product_id', type: 'integer')]
    #[GeneratedValue]
    protected int $id;

    #[Column(name: 'name', type: 'string')]
    private string $name;

    #[ManyToOne(targetEntity: 'GH10334ProductType', inversedBy: 'products')]
    #[JoinColumn(name: 'product_type_id', referencedColumnName: 'id', nullable: false)]
    private GH10334ProductType $productType;

    public function __construct(string $name, GH10334ProductType $productType)
    {
        $this->name        = $name;
        $this->productType = $productType;
    }

    public function getProductType(): GH10334ProductType
    {
        return $this->productType;
    }

    public function setProductType(GH10334ProductType $productType): void
    {
        $this->productType = $productType;
    }
}

Function Calls

None

Variables

None

Stats

MD5 eebaf1aea93557b818ef7273a863da9c
Eval Count 0
Decode Time 99 ms