Skip to content

Commit ea47351

Browse files
author
full
committed
force EntityRepository
1 parent c4a4e2a commit ea47351

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Entity/TokenManager.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ public function deleteExpired()
9090
*/
9191
protected function getRepository(): EntityRepository
9292
{
93-
return $this->em->getRepository($this->class);
93+
$repository = $this->em->getRepository($this->class);
94+
if(!($repository instanceof EntityRepository)){
95+
throw new \RuntimeException('EntityRepository needed');
96+
}
97+
98+
return $repository;
9499
}
95100
}

0 commit comments

Comments
 (0)