| @@ -52,7 +52,7 @@ discard block | ||
| 52 | 52 | // We'll grab the primary key name of the related models since it could be set to | 
| 53 | 53 | // a non-standard name and not "id". We will then construct the constraint for | 
| 54 | 54 | // our eagerly loading query so it returns the proper models from execution. | 
| 55 | -        (new CompositeKeyScope(array_map(function ($keyName) { | |
| 55 | +        (new CompositeKeyScope(array_map(function($keyName) { | |
| 56 | 56 | return $this->related->getTable().'.'.$keyName; | 
| 57 | 57 | }, $ownerKeys), $this->getEagerModelKeys($models), false, method_exists($this->related, 'getBinaryColumns') ? $this->related->getBinaryColumns() : []))->apply($this->query); | 
| 58 | 58 | } | 
| @@ -139,7 +139,7 @@ discard block | ||
| 139 | 139 | $dictionary = []; | 
| 140 | 140 | |
| 141 | 141 |          foreach ($results as $result) { | 
| 142 | -            $dictionary[implode($this->magicKeyDelimiter, array_map(function ($owner) use ($result) { | |
| 142 | +            $dictionary[implode($this->magicKeyDelimiter, array_map(function($owner) use ($result) { | |
| 143 | 143 | return $result->getAttribute($owner); | 
| 144 | 144 | }, $ownerKeys))] = $result; | 
| 145 | 145 | } | 
| @@ -148,7 +148,7 @@ discard block | ||
| 148 | 148 | // and match back onto their children using these keys of the dictionary and | 
| 149 | 149 | // the primary key of the children to map them onto the correct instances. | 
| 150 | 150 |          foreach ($models as $model) { | 
| 151 | -            $foreignKey = implode($this->magicKeyDelimiter, array_map(function ($foreign) use ($model) { | |
| 151 | +            $foreignKey = implode($this->magicKeyDelimiter, array_map(function($foreign) use ($model) { | |
| 152 | 152 |                  return $model->{$foreign}; | 
| 153 | 153 | }, $foreignKeys)); | 
| 154 | 154 |              if (isset($dictionary[$foreignKey])) { | 
| @@ -35,7 +35,7 @@ | ||
| 35 | 35 | // foreign key name by using the name of the relationship function, which | 
| 36 | 36 | // when combined with an "_id" should conventionally match the columns. | 
| 37 | 37 |          if (is_null($foreignKey)) { | 
| 38 | -            $foreignKey = is_array($instance->getKeyName()) ? array_map(function ($key) use ($relation) { | |
| 38 | +            $foreignKey = is_array($instance->getKeyName()) ? array_map(function($key) use ($relation) { | |
| 39 | 39 | return Str::snake($relation).'_'.$key; | 
| 40 | 40 | }, $instance->getKeyName()) : Str::snake($relation).'_'.$instance->getKeyName(); | 
| 41 | 41 | } |