Closed mringler closed 1 year ago
Base: 87.64% // Head: 87.62% // Decreases project coverage by -0.01%
:warning:
Coverage data is based on head (
5e40c21
) compared to base (f9b9e12
). Patch coverage: 97.05% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Docbloc is now generated like this (for BookReaderQuery from the test suite):
/**
* Base class that represents a query for the book_reader table.
*
* @method ChildBookReaderQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildBookReaderQuery orderByName($order = Criteria::ASC) Order by the name column
*
* @method ChildBookReaderQuery groupById() Group by the id column';
* @method ChildBookReaderQuery groupByName() Group by the name column';
*
* @method ChildBookReaderQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method ChildBookReaderQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method ChildBookReaderQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method ChildBookReaderQuery leftJoinWith($relation) Adds a LEFT JOIN clause and with to the query
* @method ChildBookReaderQuery rightJoinWith($relation) Adds a RIGHT JOIN clause and with to the query
* @method ChildBookReaderQuery innerJoinWith($relation) Adds a INNER JOIN clause and with to the query
*
* @method ChildBookReaderQuery leftJoinBookOpinion($relationAlias = null) Adds a LEFT JOIN clause to the query using the BookOpinion relation
* @method ChildBookReaderQuery rightJoinBookOpinion($relationAlias = null) Adds a RIGHT JOIN clause to the query using the BookOpinion relation
* @method ChildBookReaderQuery innerJoinBookOpinion($relationAlias = null) Adds a INNER JOIN clause to the query using the BookOpinion relation
*
* @method ChildBookReaderQuery joinWithBookOpinion($joinType = Criteria::INNER_JOIN) Adds a join clause and with to the query using the ' . $relationName . " relation
*
* @method ChildBookReaderQuery leftJoinWithBookOpinion() Adds a LEFT JOIN clause and with to the query using the BookOpinion relation
* @method ChildBookReaderQuery rightJoinWithBookOpinion() Adds a RIGHT JOIN clause and with to the query using the BookOpinion relation
* @method ChildBookReaderQuery innerJoinWithBookOpinion() Adds a INNER JOIN clause and with to the query using the BookOpinion relation
*
* @method ChildBookReaderQuery leftJoinReaderFavorite($relationAlias = null) Adds a LEFT JOIN clause to the query using the ReaderFavorite relation
* @method ChildBookReaderQuery rightJoinReaderFavorite($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ReaderFavorite relation
* @method ChildBookReaderQuery innerJoinReaderFavorite($relationAlias = null) Adds a INNER JOIN clause to the query using the ReaderFavorite relation
*
* @method ChildBookReaderQuery joinWithReaderFavorite($joinType = Criteria::INNER_JOIN) Adds a join clause and with to the query using the ' . $relationName . " relation
*
* @method ChildBookReaderQuery leftJoinWithReaderFavorite() Adds a LEFT JOIN clause and with to the query using the ReaderFavorite relation
* @method ChildBookReaderQuery rightJoinWithReaderFavorite() Adds a RIGHT JOIN clause and with to the query using the ReaderFavorite relation
* @method ChildBookReaderQuery innerJoinWithReaderFavorite() Adds a INNER JOIN clause and with to the query using the ReaderFavorite relation
*
* @method \Propel\Tests\Bookstore\BookOpinionQuery|\Propel\Tests\Bookstore\ReaderFavoriteQuery endUse() Finalizes a secondary criteria and merges it with its primary Criteria
*
* @method ChildBookReader|null findOne(?ConnectionInterface $con = null) Return the first ChildBookReader matching the query
* @method ChildBookReader findOneOrCreate(?ConnectionInterface $con = null) Return the first ChildBookReader matching the query, or a new ChildBookReader object populated from the query conditions when no match is found
*
* @method ChildBookReader|null findOneById(int $id) Return the first ChildBookReader filtered by the id column
* @method ChildBookReader|null findOneByName(string $name) Return the first ChildBookReader filtered by the name column
*
* @method ChildBookReader requirePk($key, ?ConnectionInterface $con = null) Return the ChildBookReader by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
* @method ChildBookReader requireOne(?ConnectionInterface $con = null) Return the first ChildBookReader matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
*
* @method ChildBookReader requireOneById(int $id) Return the first ChildBookReader filtered by the $name column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
* @method ChildBookReader requireOneByName(string $name) Return the first ChildBookReader filtered by the $name column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
*
* @method ChildBookReader[]|Collection find(?ConnectionInterface $con = null) Return ChildBookReader objects based on current ModelCriteria
* @psalm-method Collection&\Traversable<ChildBookReader> find(?ConnectionInterface $con = null) Return ChildBookReader objects based on current ModelCriteria
*
* @method ChildBookReader[]|Collection findById(int|array<int> $id) Return ChildBookReader objects filtered by the id column
* @psalm-method Collection&\Traversable<ChildBookReader> findById(int|array<int> $id) Return ChildBookReader objects filtered by the id column
* @method ChildBookReader[]|Collection findByName(string|array<string> $name) Return ChildBookReader objects filtered by the name column
* @psalm-method Collection&\Traversable<ChildBookReader> findByName(string|array<string> $name) Return ChildBookReader objects filtered by the name column
*
* @method ChildBookReader[]|\Propel\Runtime\Util\PropelModelPager paginate($page = 1, $maxPerPage = 10, ?ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
* @psalm-method \Propel\Runtime\Util\PropelModelPager&\Traversable<ChildBookReader> paginate($page = 1, $maxPerPage = 10, ?ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
*/
abstract class BookReaderQuery extends ModelCriteria
{
Currently type hints for the
findBy*($value)
methods of query classes have the input type set to the column type. So if an id column uses integers, the findById method is said to expect an int as input:However, the findBy methods also deal with arrays, you can do
BookQuery::create()->findById([1,2,3])
, which will correctly generate an IN query (i.e.SELECT * from Book where id IN (1,2,3)
). This is quite useful.So I think the input type should be
T|array<T>
in@method
and@psalm-method
:I also moved the docblock into its own template file.