Skip to content

Commit

Permalink
replaces another assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
schmittjoh committed Nov 1, 2018
1 parent ba6fb37 commit 7cbb84c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Entity/Repository/JobManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ public function findJobForRelatedEntity($command, $relatedEntity, array $states

private function getRelatedEntityIdentifier($entity)
{
assert('is_object($entity)');
if ( ! is_object($entity)) {
throw new \RuntimeException('$entity must be an object.');
}

if ($entity instanceof \Doctrine\Common\Persistence\Proxy) {
$entity->__load();
Expand Down

0 comments on commit 7cbb84c

Please sign in to comment.