for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace ProjetNormandie\ComptaBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Type
*
* @ORM\Table(name="cpt_compta_source")
* @ORM\Entity
*/
class Source
{
* @var integer
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
private $id;
* @var string
* @Assert\Length(min="2", max="50")
* @ORM\Column(name="label", type="string", nullable=false)
private $label;
* Get id
* @return integer
public function getId()
return $this->id;
}
* Set id
* @param int $id
* @return $this
public function setId($id)
$this->id = $id;
return $this;
* @param string $label
public function setLabel($label)
$this->label = $label;
* @return string
public function getLabel()
return $this->label;
public function __toString()
return sprintf('%s [%d]', $this->getLabel(), $this->getId());