Completed
Push — dev ( f292cf...1456c7 )
by James Ekow Abaka
01:41
created
src/RecordWrapper.php 2 patches
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
      * Callback for when a new record has been created.
498 498
      * This callback can be most useful for obtaining the primary key of a newly created record.
499 499
      *
500
-     * @param $id
500
+     * @param string $id
501 501
      */
502 502
     public function postCreateCallback($id)
503 503
     {
@@ -538,6 +538,10 @@  discard block
 block discarded – undo
538 538
         return $this->adapter;
539 539
     }
540 540
 
541
+    /**
542
+     * @param Relationship[] $relationships
543
+     * @param integer $depth
544
+     */
541 545
     private function expandArrayValue($array, $relationships, $depth, $expandableModels = [], $index = null)
542 546
     {
543 547
         $expandableModels = empty($expandableModels) ? array_keys($relationships) : $expandableModels;
Please login to merge, or discard this 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   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
 
69 69
     public function postSave(&$wrapper)
70 70
     {
71
-        foreach($this->tempData as $relatedRecord) {
71
+        foreach ($this->tempData as $relatedRecord) {
72 72
             $relatedRecord[$this->options['foreign_key']] = $wrapper[$this->options['local_key']];
73 73
             if (!$relatedRecord->save()) {
74 74
                 var_dump($relatedRecord->getInvalidFields());
Please login to merge, or discard this patch.