Inheritance: extends InvalidArgumentException
Exemplo n.º 1
0
 /**
  * Type constructor.
  *
  * @param string $type
  *
  * @throws InvalidTypeException
  */
 public function __construct(string $type)
 {
     if (!in_array($type, $this->allowed, true)) {
         throw InvalidTypeException::invalidType($type, $this->allowed);
     }
     $this->type = $type;
 }