src/Lms/Modules/Materials/Application/Service/Quiz/QuizException.php line 7

Open in your IDE?
  1. <?php
  2. namespace CodersLab\Lms\Modules\Materials\Application\Service\Quiz;
  3. use Symfony\Component\HttpFoundation\Response;
  4. final class QuizException extends \Exception
  5. {
  6.     public static function apiError(array $response): QuizException
  7.     {
  8.         return new static('Api error:' json_encode($response), Response::HTTP_INTERNAL_SERVER_ERROR);
  9.     }
  10.     public static function missingProperty(string $property): QuizException
  11.     {
  12.         return new static(sprintf('Missing property "%s"'$property), Response::HTTP_INTERNAL_SERVER_ERROR);
  13.     }
  14. }