| @@ 19-27 (lines=9) @@ | ||
| 16 | * @return Collection |
|
| 17 | * @throws Exception |
|
| 18 | */ |
|
| 19 | protected function verifyActive(Collection $moduleNames) |
|
| 20 | { |
|
| 21 | $modules = $this->verifyModules($moduleNames, true); |
|
| 22 | if ($modules->count() != $moduleNames->count()) { |
|
| 23 | throw new Exception('There were errors. You need to pass only valid active module names'); |
|
| 24 | } |
|
| 25 | ||
| 26 | return $modules; |
|
| 27 | } |
|
| 28 | ||
| 29 | /** |
|
| 30 | * Verify whether given modules exist |
|
| @@ 37-45 (lines=9) @@ | ||
| 34 | * @return Collection |
|
| 35 | * @throws Exception |
|
| 36 | */ |
|
| 37 | protected function verifyExisting(Collection $moduleNames) |
|
| 38 | { |
|
| 39 | $modules = $this->verifyModules($moduleNames, false); |
|
| 40 | if ($modules->count() != $moduleNames->count()) { |
|
| 41 | throw new Exception('There were errors. You need to pass only valid module names'); |
|
| 42 | } |
|
| 43 | ||
| 44 | return $modules; |
|
| 45 | } |
|
| 46 | ||
| 47 | /** |
|
| 48 | * Verifies whether given modules exist and whether they are active |
|