Skip to content

Commit

Permalink
Narrow allowed types for ids passed to find() and `addIdentifiersTo…
Browse files Browse the repository at this point in the history
…Query()` in `ModelManagerInterface` (#6462)
  • Loading branch information
phansys authored Oct 18, 2020
1 parent bb7b9ae commit cb2739b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Model/ModelManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public function findBy($class, array $criteria = []);
public function findOneBy($class, array $criteria = []);

/**
* @param string $class
* @param mixed $id
* @param string $class
* @param int|string $id
*
* @return object|null the object with id or null if not found
*
Expand Down Expand Up @@ -149,7 +149,7 @@ public function getModelIdentifier($class);
*
* @param object $model
*
* @return string[] list of all identifiers of this model
* @return array<int|string> list of all identifiers of this model
*/
public function getIdentifierValues($model);

Expand Down Expand Up @@ -338,7 +338,8 @@ public function getExportFields($class);
public function getPaginationParameters(DatagridInterface $datagrid, $page);

/**
* @param string $class
* @param string $class
* @param array<int, int|string> $idx
*
* @phpstan-param class-string $class
*/
Expand Down

0 comments on commit cb2739b

Please sign in to comment.