for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Stu\Orm\Repository;
use Doctrine\ORM\EntityRepository;
use Stu\Orm\Entity\PirateWrath;
use Stu\Orm\Entity\PirateWrathInterface;
/**
* @extends EntityRepository<PirateWrath>
*
* @method PirateWrathInterface[] findAll()
*/
final class PirateWrathRepository extends EntityRepository implements PirateWrathRepositoryInterface
{
public function save(PirateWrathInterface $wrath): void
$em = $this->getEntityManager();
$em->persist($wrath);
}
public function delete(PirateWrathInterface $wrath): void
$em->remove($wrath);
public function prototype(): PirateWrathInterface
return new PirateWrath();
public function truncateAllEntries(): void
$this->getEntityManager()->createQuery(
sprintf(
'DELETE FROM %s pw',
PirateWrath::class
)
)->execute();