diff --git a/src/ORM/Marshaller.php b/src/ORM/Marshaller.php index eda302e8611..17d874a5292 100644 --- a/src/ORM/Marshaller.php +++ b/src/ORM/Marshaller.php @@ -237,7 +237,7 @@ protected function _loadBelongsToMany($assoc, $ids) { $target = $assoc->target(); $primaryKey = (array)$target->primaryKey(); $multi = count($primaryKey) > 1; - $primaryKey = array_map(function($key) use ($target) { + $primaryKey = array_map(function ($key) use ($target) { return $target->alias() . '.' . $key; }, $primaryKey); diff --git a/tests/TestCase/ORM/MarshallerTest.php b/tests/TestCase/ORM/MarshallerTest.php index 5ae4d910ab5..a4d87e92a20 100644 --- a/tests/TestCase/ORM/MarshallerTest.php +++ b/tests/TestCase/ORM/MarshallerTest.php @@ -874,7 +874,7 @@ public function testMergeFromIdsWithAutoAssociation() { $entity->accessible('*', true); // Adding a forced join to have another table with the same column names - $this->articles->Tags->eventManager()->attach(function($e, $query) { + $this->articles->Tags->eventManager()->attach(function ($e, $query) { $left = new IdentifierExpression('Tags.id'); $right = new IdentifierExpression('a.id'); $query->leftJoin(['a' => 'tags'], $query->newExpr()->eq($left, $right));