| Total Complexity | 5 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 7 | class ModuleRepository |
||
| 8 | { |
||
| 9 | public static function createFromArray($array) |
||
| 10 | { |
||
| 11 | // updateOrCreate the module |
||
| 12 | $find = Module::where('slug', $array['slug'])->first(); |
||
| 13 | |||
| 14 | if($find == null) { |
||
| 15 | $result = Module::create($array); |
||
| 16 | } else { |
||
| 17 | $result = $find->update($array); |
||
| 18 | } |
||
| 19 | |||
| 20 | return $result; |
||
| 21 | } |
||
| 22 | |||
| 23 | public static function get() |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Return the settings array of the module |
||
| 30 | * |
||
| 31 | * @var Module $module |
||
| 32 | **/ |
||
| 33 | public function getSettings(Module $module) |
||
| 38 | } |