Skip to content

Commit

Permalink
Update StatementInterface.
Browse files Browse the repository at this point in the history
Fix errors reported by static analysis
  • Loading branch information
ADmad committed Apr 7, 2024
1 parent a5f17eb commit 2d1d1af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Database/StatementInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
namespace Cake\Database;

use PDO;
use Traversable;

interface StatementInterface
interface StatementInterface extends Traversable

Check failure on line 22 in src/Database/StatementInterface.php

View workflow job for this annotation

GitHub Actions / Coding Standard & Static Analysis

MissingTemplateParam

src/Database/StatementInterface.php:22:38: MissingTemplateParam: Cake\Database\StatementInterface has missing template params when extending Traversable, expecting 2 (see https://psalm.dev/182)
{
/**
* Maps to PDO::FETCH_NUM.
Expand Down
4 changes: 2 additions & 2 deletions src/ORM/EagerLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -609,10 +609,10 @@ protected function _resolveJoins(array $associations, array $matching = []): arr
* @param \Cake\ORM\Query\SelectQuery $query The query for which to eager load external.
* associations.
* @param iterable $results Results.
* @return array
* @return iterable
* @throws \RuntimeException
*/
public function loadExternal(SelectQuery $query, iterable $results): array
public function loadExternal(SelectQuery $query, iterable $results): iterable
{
if (!$results) {
return $results;
Expand Down

0 comments on commit 2d1d1af

Please sign in to comment.