Completed
Branch master (a57439)
by Ronan
02:44
created
src/Features/Relationship/HasMany.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         $finder = Orm::finder($modelClass);
41 41
 
42 42
         return $finder->select()
43
-                      ->where($foreignAttribute, $this->getAttribute($attribute))
44
-                      ->execute();
43
+                        ->where($foreignAttribute, $this->getAttribute($attribute))
44
+                        ->execute();
45 45
     }
46 46
 }
Please login to merge, or discard this patch.
src/Features/Relationship/BelongsTo.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         $finder = Orm::finder($modelClass);
41 41
 
42 42
         return $finder->select()
43
-                      ->where($foreignAttribute, $this->getAttribute($attribute))
44
-                      ->one();
43
+                        ->where($foreignAttribute, $this->getAttribute($attribute))
44
+                        ->one();
45 45
     }
46 46
 }
Please login to merge, or discard this patch.
src/Features/Relationship/HasOne.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         $finder = Orm::finder($modelClass);
41 41
 
42 42
         return $finder->select()
43
-                      ->where($foreignAttribute, $this->getAttribute($attribute))
44
-                      ->one();
43
+                        ->where($foreignAttribute, $this->getAttribute($attribute))
44
+                        ->one();
45 45
     }
46 46
 }
Please login to merge, or discard this patch.
src/Model.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
             return false;
313 313
         }
314 314
         if (true === $this->isLoaded()) {
315
-            if (false === $this->beforeUpdate()){
315
+            if (false === $this->beforeUpdate()) {
316 316
                 return false;
317 317
             }
318 318
             if ($this->useTimestamps()) {
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
      */
458 458
     protected function getQueryBuilderInstance()
459 459
     {
460
-        $connection   = Orm::getConnection();
460
+        $connection = Orm::getConnection();
461 461
 
462 462
         return new QueryBuilder(
463 463
             $connection,
Please login to merge, or discard this patch.
src/Orm.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
      */
60 60
     static public function getEmitter()
61 61
     {
62
-        if (! static::$emitter instanceof EventEmitter) {
62
+        if (!static::$emitter instanceof EventEmitter) {
63 63
             static::$emitter = new EventEmitter();
64 64
         }
65 65
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,8 +86,7 @@
 block discarded – undo
86 86
             }
87 87
 
88 88
             return $result;
89
-        }
90
-        catch (Exception $ex) {
89
+        } catch (Exception $ex) {
91 90
             $connection->rollback();
92 91
             throw $ex;
93 92
         }
Please login to merge, or discard this patch.
src/QueryBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     public function query($sql, $params = [], $page = null, $perPage = 20)
131 131
     {
132 132
         if (!is_null($page)) {
133
-            $page   = (int) $page;
133
+            $page = (int) $page;
134 134
             if ($page < 1) {
135 135
                 $page = 1;
136 136
             }
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
      */
219 219
     protected function generateCallback()
220 220
     {
221
-        return function ($query, $sql, $params) {
221
+        return function($query, $sql, $params) {
222 222
             $sql = trim($sql);
223 223
             Orm::getEmitter()->emit('query.init', [
224 224
                 $sql,
Please login to merge, or discard this patch.
src/Traits/HasValidationTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@
 block discarded – undo
167 167
             return false;
168 168
         }
169 169
         if (true === $this->isLoaded()) {
170
-            if (false === $this->beforeUpdate()){
170
+            if (false === $this->beforeUpdate()) {
171 171
                 return false;
172 172
             }
173 173
             if ($this->useTimestamps()) {
Please login to merge, or discard this patch.
src/Model/Hydrator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      */
30 30
     public function hydrate(array $array, Model $model)
31 31
     {
32
-        $closure = function ($data) {
32
+        $closure = function($data) {
33 33
             $this->data = $data;
34 34
             $this->afterLoad();
35 35
         };
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public function dehydrate(Model $model)
48 48
     {
49
-        $closure = function () {
49
+        $closure = function() {
50 50
             return $this->data;
51 51
         };
52 52
         $dehydrator = $closure->bindTo($model, $model);
Please login to merge, or discard this patch.