Code Duplication    Length = 3-3 lines in 2 locations

src/Controllers/MetadataControllerTrait.php 2 locations

@@ 41-43 (lines=3) @@
38
            throw new \Exception('Metadata mapping for model '.$modelName.' not defined');
39
        }
40
41
        if (!in_array(strtolower($crudVerb), $this->crudVerbs)) {
42
            throw new \Exception('CRUD verb '.$crudVerb.' not defined');
43
        }
44
45
        $lookup = $this->mapping[$modelName];
46
        if (!is_array($lookup)) {
@@ 84-86 (lines=3) @@
81
                throw new \Exception('Metadata mapping for model '.$key.' not an array');
82
            }
83
            foreach ($map as $verb => $method) {
84
                if (!in_array(strtolower($verb), $this->crudVerbs)) {
85
                    throw new \Exception('CRUD verb '.$verb.' not defined');
86
                }
87
                if (!isset($method)) {
88
                    throw new \Exception('Metadata mapping for CRUD verb '. $verb.' on model '.$key.' null');
89
                }