X-Git-Url: http://git.datanom.net/omvzfs.git/blobdiff_plain/b76f4e1734bec3862fa9326982e50386e7a6b6c1..da22577f5417be015c11b6325bfa69997d6417d4:/src/Vdev.php?ds=sidebyside diff --git a/src/Vdev.php b/src/Vdev.php index b9183d8..2c5f999 100644 --- a/src/Vdev.php +++ b/src/Vdev.php @@ -29,7 +29,7 @@ class OMVModuleZFSVdev { private $pool; /** - * Array holding disks + * This vdev type * * @var OMVModuleZFSVdevType $type Vdev type * @access private @@ -45,7 +45,7 @@ class OMVModuleZFSVdev { * @throws OMVModuleZFSException */ - public function __construct($pool, OMVModuleZFSVdevType $type, array $disks) { + public function __construct($pool, $type, array $disks) { switch ($type) { case OMVModuleZFSVdevType::OMVMODULEZFSPLAIN: break; @@ -65,6 +65,8 @@ class OMVModuleZFSVdev { if (count($disks) < 5) throw new OMVModuleZFSException("A Raidz3 must contain at least 5 disks"); break; + default: + throw new OMVModuleZFSException("$type: Unknown zpool type"); } $this->pool = $pool; $this->disks = $disks;