Passed
Branch master (28f4e3)
by Daniel
05:04
created
src/AbstractEloquentRepository.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -249,8 +249,9 @@  discard block
 block discarded – undo
249 249
     public function makeModel() {
250 250
         $model = app()->make($this->model());
251 251
 
252
-        if (!$model instanceof Model)
253
-            throw new RepositoryException("Class {$this->model()} must be an instance of Illuminate\\Database\\Eloquent\\Model");
252
+        if (!$model instanceof Model) {
253
+                    throw new RepositoryException("Class {$this->model()} must be an instance of Illuminate\\Database\\Eloquent\\Model");
254
+        }
254 255
 
255 256
         $this->modelInstance = $model;
256 257
 
@@ -303,12 +304,14 @@  discard block
 block discarded – undo
303 304
      * @return $this
304 305
      */
305 306
     public function  applyCriteria() {
306
-        if($this->skipCriteria === true)
307
-            return $this;
307
+        if($this->skipCriteria === true) {
308
+                    return $this;
309
+        }
308 310
 
309 311
         foreach($this->getCriteria() as $criteria) {
310
-            if($criteria instanceof Criteria)
311
-                $this->model = $criteria->apply($this->model, $this);
312
+            if($criteria instanceof Criteria) {
313
+                            $this->model = $criteria->apply($this->model, $this);
314
+            }
312 315
         }
313 316
 
314 317
         return $this;
Please login to merge, or discard this patch.