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\Co..
Decoded Output download
<?php
declare(strict_types=1);
namespace Doctrine\Tests\Models\GH10334;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\Id;
use Doctrine\ORM\Mapping\OneToMany;
#[Entity]
class GH10334ProductType
{
#[Id]
#[Column(type: 'string', enumType: 'Doctrine\Tests\Models\GH10334\GH10334ProductTypeId', length: 255)]
protected GH10334ProductTypeId $id;
#[Column(type: 'float')]
private float $value;
#[OneToMany(targetEntity: 'GH10334Product', mappedBy: 'productType', cascade: ['persist', 'remove'])]
private Collection $products;
public function __construct(GH10334ProductTypeId $id, float $value)
{
$this->id = $id;
$this->value = $value;
$this->products = new ArrayCollection();
}
public function getId(): GH10334ProductTypeId
{
return $this->id;
}
public function addProduct(GH10334Product $product): void
{
$product->setProductType($this);
$this->products->add($product);
}
}
?>
Did this file decode correctly?
Original Code
<?php
declare(strict_types=1);
namespace Doctrine\Tests\Models\GH10334;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\Id;
use Doctrine\ORM\Mapping\OneToMany;
#[Entity]
class GH10334ProductType
{
#[Id]
#[Column(type: 'string', enumType: 'Doctrine\Tests\Models\GH10334\GH10334ProductTypeId', length: 255)]
protected GH10334ProductTypeId $id;
#[Column(type: 'float')]
private float $value;
#[OneToMany(targetEntity: 'GH10334Product', mappedBy: 'productType', cascade: ['persist', 'remove'])]
private Collection $products;
public function __construct(GH10334ProductTypeId $id, float $value)
{
$this->id = $id;
$this->value = $value;
$this->products = new ArrayCollection();
}
public function getId(): GH10334ProductTypeId
{
return $this->id;
}
public function addProduct(GH10334Product $product): void
{
$product->setProductType($this);
$this->products->add($product);
}
}
Function Calls
None |
Stats
MD5 | d64d566186f211f722d0251c972f1174 |
Eval Count | 0 |
Decode Time | 103 ms |