|
|
@@ -110,7 +110,7 @@ class LazyEagerLoader
|
|
|
* in the top level entities.
|
|
|
*
|
|
|
* @param \Cake\ORM\Table $source The table having the top level associations
|
|
|
- * @param array $associations The name of the top level associations
|
|
|
+ * @param string[] $associations The name of the top level associations
|
|
|
* @return array
|
|
|
*/
|
|
|
protected function _getPropertyMap($source, $associations)
|
|
|
@@ -128,9 +128,9 @@ class LazyEagerLoader
|
|
|
* Injects the results of the eager loader query into the original list of
|
|
|
* entities.
|
|
|
*
|
|
|
- * @param array|\Traversable $objects The original list of entities
|
|
|
+ * @param \Cake\Datasource\EntityInterface[]|\Traversable $objects The original list of entities
|
|
|
* @param \Cake\Collection\CollectionInterface|\Cake\Database\Query $results The loaded results
|
|
|
- * @param array $associations The top level associations that were loaded
|
|
|
+ * @param string[] $associations The top level associations that were loaded
|
|
|
* @param \Cake\ORM\Table $source The table where the entities came from
|
|
|
* @return array
|
|
|
*/
|
|
|
@@ -141,6 +141,7 @@ class LazyEagerLoader
|
|
|
$primaryKey = (array)$source->getPrimaryKey();
|
|
|
$results = $results
|
|
|
->indexBy(function ($e) use ($primaryKey) {
|
|
|
+ /** @var \Cake\Datasource\EntityInterface $e */
|
|
|
return implode(';', $e->extract($primaryKey));
|
|
|
})
|
|
|
->toArray();
|
|
|
@@ -152,6 +153,7 @@ class LazyEagerLoader
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
+ /** @var \Cake\Datasource\EntityInterface $loaded */
|
|
|
$loaded = $results[$key];
|
|
|
foreach ($associations as $assoc) {
|
|
|
$property = $properties[$assoc];
|