Completed
Push — dev ( 1456c7...bf876d )
by James Ekow Abaka
01:52
created
src/DriverAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@
 block discarded – undo
139 139
     public function describe($model, $relationships)
140 140
     {
141 141
         return new ModelDescription(
142
-            $this->driver->describeTable($table)[$table], $relationships, function ($type) {
142
+            $this->driver->describeTable($table)[$table], $relationships, function($type) {
143 143
                 return $this->mapDataTypes($type);
144 144
             }
145 145
         );
Please login to merge, or discard this patch.
src/DataOperations.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -253,10 +253,10 @@
 block discarded – undo
253 253
             $mainValidatorErrors = $validator->getInvalidFields();
254 254
         }
255 255
 
256
-        if(!empty($this->wrapper->getValidationRules())) {
256
+        if (!empty($this->wrapper->getValidationRules())) {
257 257
             $modelValidator = new Validator();
258 258
             $modelValidator->setRules($this->wrapper->getValidationRules());
259
-            if(!$modelValidator->validate($data)) {
259
+            if (!$modelValidator->validate($data)) {
260 260
                 $modelValidatorErrors = $modelValidator->getInvalidFields();
261 261
             }
262 262
         }
Please login to merge, or discard this patch.
src/RecordWrapper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         $this->initialize();
212 212
 
213 213
         return $this->context->getCache()->read(
214
-            "{$this->className}::desc", function () {
214
+            "{$this->className}::desc", function() {
215 215
                 return $this->context->getModelDescription($this);
216 216
             }
217 217
         );
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
     {
444 444
         $data = $index ? $this->modelData[$index] : $this->modelData;
445 445
         $name = $relationship->getOptions()['name'];
446
-        if(isset($data[$name]))
446
+        if (isset($data[$name]))
447 447
         {
448 448
             return $data[$name];
449 449
         }
Please login to merge, or discard this patch.
src/relationships/HasManyRelationship.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,13 +39,13 @@  discard block
 block discarded – undo
39 39
     {
40 40
         // @todo throw an exception when the data doesn't have the local key
41 41
         $query = $this->getQuery();
42
-        if(!$this->queryPrepared) {
42
+        if (!$this->queryPrepared) {
43 43
             $query->setTable($this->getModelInstance()->getDBStoreInformation()['quoted_table'])
44 44
                 ->addFilter($this->options['foreign_key'], $data[$this->options['local_key']] ?? null);
45 45
             $this->queryPrepared = true;
46 46
             return $query;
47 47
         }
48
-        if(isset($data[$this->options['local_key']])) {
48
+        if (isset($data[$this->options['local_key']])) {
49 49
             $query->setBoundData($this->options['foreign_key'], $data[$this->options['local_key']]);
50 50
         }
51 51
         return $query;
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     public function postSave(&$wrapper)
71 71
     {
72 72
         $records = $this->tempData->getData();
73
-        foreach($records as $i => $relatedRecord) {
73
+        foreach ($records as $i => $relatedRecord) {
74 74
             $records[$i][$this->options['foreign_key']] = $wrapper[$this->options['local_key']];
75 75
         }
76 76
         $this->tempData->setData($records);
Please login to merge, or discard this patch.