Inheritance: extends InvalidArgumentException
コード例 #1
0
ファイル: Type.php プロジェクト: dumplie/dumplie
 /**
  * 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;
 }