Passed
Push — master ( 4ae7b3...54d2c2 )
by Jonathan
09:15
created
app/Support/Traits/UccelloModule.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,11 +28,11 @@  discard block
 block discarded – undo
28 28
         }
29 29
 
30 30
         // Create uuid after save
31
-        static::created(function ($model) {
31
+        static::created(function($model) {
32 32
             $module = Module::where('model_class', get_class($model))->first();
33 33
             if ($module) {
34 34
                 Entity::create([
35
-                    'id' => (string) Str::uuid(),
35
+                    'id' => (string)Str::uuid(),
36 36
                     'module_id' => $module->id,
37 37
                     'record_id' => $model->getKey(),
38 38
                 ]);
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         });
41 41
 
42 42
         // Delete uuid after forced delete
43
-        static::deleted(function ($model) {
43
+        static::deleted(function($model) {
44 44
             if (!empty($model->uuid) && (!method_exists($model, 'isForceDeleting') || $model->isForceDeleting() === true)) {
45 45
                 $entity = Entity::find($model->uuid);
46 46
                 if ($entity) {
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
     public function initializeUccelloModule()
54 54
     {
55
-        $this->appends = array_merge($this->appends, ['recordLabel','uuid']);
55
+        $this->appends = array_merge($this->appends, [ 'recordLabel', 'uuid' ]);
56 56
     }
57 57
 
58 58
     protected static function isFilteredByUser()
@@ -84,15 +84,15 @@  discard block
 block discarded – undo
84 84
 
85 85
     protected static function getModuleFromClass($className)
86 86
     {
87
-        $modules = Cache::rememberForever('modules_by_model_class', function () {
87
+        $modules = Cache::rememberForever('modules_by_model_class', function() {
88 88
             $modulesGroupedByModelClass = collect();
89
-            Module::all()->map(function ($item) use ($modulesGroupedByModelClass) {
90
-                $modulesGroupedByModelClass[$item->model_class] = $item;
89
+            Module::all()->map(function($item) use ($modulesGroupedByModelClass) {
90
+                $modulesGroupedByModelClass[ $item->model_class ] = $item;
91 91
                 return $modulesGroupedByModelClass;
92 92
             });
93 93
             return $modulesGroupedByModelClass;
94 94
         });
95
-        return $modules[(string) $className] ?? null;
95
+        return $modules[ (string)$className ] ?? null;
96 96
     }
97 97
 
98 98
     public function getUuidAttribute()
Please login to merge, or discard this patch.