for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace AppBundle\Repository;
use Doctrine\ORM\EntityRepository;
use Domain\Unit\Enitity\UnitInterface;
use Domain\Unit\Repository\UnitRepositoryInterface;
/**
* UnitRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class UnitRepository extends EntityRepository implements UnitRepositoryInterface
{
* @param UnitInterface $unit
* @return void
public function add(UnitInterface $unit)
$this->_em->persist($unit);
$this->_em->flush();
}
* @param integer $id
* @return UnitInterface|null
public function findById($id)
return $this->findOneBy(['id' => $id]);
public function update(UnitInterface $unit)