Completed
Push — master ( 876046...6e04bc )
by Joao
02:55
created
src/blogServiceProvider.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -79,11 +79,13 @@  discard block
 block discarded – undo
79 79
             $users = array_get($baseConfig, 'models.User');
80 80
             $categories = array_get($config, 'models.BlogCategory');
81 81
 
82
-            if (class_exists($model) && method_exists($model, 'setUsersModel'))
83
-                forward_static_call_array([$model, 'setUsersModel'], [$users]);
82
+            if (class_exists($model) && method_exists($model, 'setUsersModel')) {
83
+                            forward_static_call_array([$model, 'setUsersModel'], [$users]);
84
+            }
84 85
 
85
-            if (class_exists($model) && method_exists($model, 'setCategoriesModel'))
86
-                forward_static_call_array([$model, 'setCategoriesModel'], [$categories]);
86
+            if (class_exists($model) && method_exists($model, 'setCategoriesModel')) {
87
+                            forward_static_call_array([$model, 'setCategoriesModel'], [$categories]);
88
+            }
87 89
 
88 90
             return new BlogPostRepository($model);
89 91
         });
@@ -102,8 +104,9 @@  discard block
 block discarded – undo
102 104
             $model = array_get($config, 'models.BlogCategory');
103 105
             $posts = array_get($config, 'models.BlogPost');
104 106
 
105
-            if (class_exists($model) && method_exists($model, 'setPostsModel'))
106
-                forward_static_call_array([$model, 'setPostsModel'], [$posts]);
107
+            if (class_exists($model) && method_exists($model, 'setPostsModel')) {
108
+                            forward_static_call_array([$model, 'setPostsModel'], [$posts]);
109
+            }
107 110
 
108 111
             return new BlogCategoryRepository($model);
109 112
         });
Please login to merge, or discard this patch.
src/Repositories/BlogPostRepository.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,9 @@
 block discarded – undo
20 20
      */
21 21
     public function __construct($model = null)
22 22
     {
23
-        if (isset($model))
24
-            $this->model = $model;
23
+        if (isset($model)) {
24
+                    $this->model = $model;
25
+        }
25 26
     }
26 27
 
27 28
     /**
Please login to merge, or discard this patch.
src/Repositories/BlogCategoryRepository.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,9 @@
 block discarded – undo
20 20
      */
21 21
     public function __construct($model = null)
22 22
     {
23
-        if (isset($model))
24
-            $this->model = $model;
23
+        if (isset($model)) {
24
+                    $this->model = $model;
25
+        }
25 26
     }
26 27
 
27 28
     /**
Please login to merge, or discard this patch.
src/Controllers/BlogController.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -92,9 +92,10 @@
 block discarded – undo
92 92
 
93 93
     public function applySearch($repo, $terms, $fields)
94 94
     {
95
-        foreach($terms as $term)
96
-            foreach($fields as $field)
97
-                $repo = $repo->orWhere($field, 'LIKE', '%' . $term . '%');
95
+        foreach($terms as $term) {
96
+                    foreach($fields as $field)
97
+                $repo = $repo->orWhere($field, 'LIKE', '%' . $term . '%');
98
+        }
98 99
 
99 100
         foreach($repo as $data)
100 101
         {
Please login to merge, or discard this patch.