From c757ee1f4fdaf11ec5a40b405d038dc2f8582198 Mon Sep 17 00:00:00 2001 From: ADmad Date: Mon, 21 Aug 2017 04:06:45 +0530 Subject: [PATCH] Fix errors reported by phpstan in ORM package --- phpstan.neon | 1 + src/ORM/Association/BelongsToMany.php | 2 +- src/ORM/EagerLoader.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index 4f6b049cbf1..fc6cdc9af19 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -22,6 +22,7 @@ parameters: - '#Access to an undefined property Psr\\Http\\Message\\UriInterface::\$webroot#' - '#Access to an undefined property Psr\\Http\\Message\\UriInterface::\$base#' - '#Call to an undefined method Cake\\Collection\\Iterator\\ZipIterator::getInnerIterator\(\)#' + - '#Call to an undefined method Cake\\ORM\\ResultSet::getInnerIterator\(\)#' - '#Result of method Cake\\Http\\Response::send\(\) \(void\) is used#' - '#Method Cake\\View\\Form\\ContextInterface::val\(\) invoked with 2 parameters, 1 required#' - '#Access to an undefined property Exception::\$queryString#' diff --git a/src/ORM/Association/BelongsToMany.php b/src/ORM/Association/BelongsToMany.php index b514d2d15fe..1ca474a7bf8 100644 --- a/src/ORM/Association/BelongsToMany.php +++ b/src/ORM/Association/BelongsToMany.php @@ -510,7 +510,7 @@ protected function _appendNotMatching($query, $options) $subquery = $this->_appendJunctionJoin($subquery, $conditions); $query - ->andWhere(function ($exp) use ($subquery, $conds) { + ->where(function ($exp) use ($subquery, $conds) { $identifiers = []; foreach (array_keys($conds) as $field) { $identifiers = new IdentifierExpression($field); diff --git a/src/ORM/EagerLoader.php b/src/ORM/EagerLoader.php index 38330b40e11..37bf9fd566e 100644 --- a/src/ORM/EagerLoader.php +++ b/src/ORM/EagerLoader.php @@ -813,7 +813,7 @@ protected function _collectKeys($external, $query, $statement) * Helper function used to iterate a statement and extract the columns * defined in $collectKeys * - * @param \Cake\Database\BufferedStatement $statement The statement to read from. + * @param \Cake\Database\Statement\BufferedStatement $statement The statement to read from. * @param array $collectKeys The keys to collect * @return array */