public static function create(string $id, string $className) : ObjectNotFoundException { return new ObjectNotFoundException(sprintf('Could not find the object "%s" of the class "%s".', $id, $className)); }
/** * @param FixtureIdInterface $fixture * * @throws ObjectNotFoundException * * @return ObjectInterface */ public function get(FixtureIdInterface $fixture) : ObjectInterface { if ($this->has($fixture)) { return $this->objects[$fixture->getId()]; } throw ObjectNotFoundExceptionFactory::create($fixture->getId(), $fixture instanceof FixtureInterface ? $fixture->getClassName() : 'no class given'); }