public static createForInvalidFakerFormatter ( string $formatter ) : InvalidArgumentException | ||
$formatter | string | |
return | InvalidArgumentException |
public static function createForInvalidFakerFormatter(string $formatter) : \InvalidArgumentException
{
return new \InvalidArgumentException(sprintf('Invalid faker formatter "%s" found.', $formatter));
}
private function getGenerator(GeneratorFactory $factory, string $formatter) { $explodedFormatter = explode(':', $formatter); $size = count($explodedFormatter); if (1 === $size) { return [$factory->getSeedGenerator(), $explodedFormatter[0]]; } if (2 === $size) { return [$factory->createOrReturnExistingInstance($explodedFormatter[0]), $explodedFormatter[1]]; } throw InvalidArgumentExceptionFactory::createForInvalidFakerFormatter($formatter); }