propelorm / Propel2

Propel2 is an open-source high-performance Object-Relational Mapping (ORM) for modern PHP
http://propelorm.org/
MIT License
1.26k stars 399 forks source link

docblock query class fixes #1913

Closed mringler closed 2 years ago

mringler commented 2 years ago

Dang it, I missed a few places when moving the query class docblock into the template. Here is the fix. Sorry.

dereuromark commented 2 years ago

Happens It is super hard to read this template code

mringler commented 2 years ago

Totally, the template file is better than the inline version from before, but it is really not great either.

But I think we got it now, here is a diff old vs new:

 /**
- * Base class that represents a query for the 'referrer' table.
- *
- *
+ * Base class that represents a query for the `referrer` table.
  *
  * @method     ChildReferrerQuery orderById($order = Criteria::ASC) Order by the id column
  * @method     ChildReferrerQuery orderByReferrer($order = Criteria::ASC) Order by the referrer column
@@ -65,8 +63,8 @@ use Propel\Runtime\Exception\PropelException;
  *
  * @method     ChildReferrer|null findOneById(int $id) Return the first ChildReferrer filtered by the id column
  * @method     ChildReferrer|null findOneByReferrer(string $referrer) Return the first ChildReferrer filtered by the referrer column
- * @method     ChildReferrer|null findOneByComment(string $comment) Return the first ChildReferrer filtered by the comment column *
-
+ * @method     ChildReferrer|null findOneByComment(string $comment) Return the first ChildReferrer filtered by the comment column
+ *
  * @method     ChildReferrer requirePk($key, ?ConnectionInterface $con = null) Return the ChildReferrer by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
  * @method     ChildReferrer requireOne(?ConnectionInterface $con = null) Return the first ChildReferrer matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
  *
@@ -76,15 +74,16 @@ use Propel\Runtime\Exception\PropelException;
  *
  * @method     ChildReferrer[]|Collection find(?ConnectionInterface $con = null) Return ChildReferrer objects based on current ModelCriteria
  * @psalm-method Collection&\Traversable<ChildReferrer> find(?ConnectionInterface $con = null) Return ChildReferrer objects based on current ModelCriteria
- * @method     ChildReferrer[]|Collection findById(int $id) Return ChildReferrer objects filtered by the id column
- * @psalm-method Collection&\Traversable<ChildReferrer> findById(int $id) Return ChildReferrer objects filtered by the id column
- * @method     ChildReferrer[]|Collection findByReferrer(string $referrer) Return ChildReferrer objects filtered by the referrer column
- * @psalm-method Collection&\Traversable<ChildReferrer> findByReferrer(string $referrer) Return ChildReferrer objects filtered by the referrer column
- * @method     ChildReferrer[]|Collection findByComment(string $comment) Return ChildReferrer objects filtered by the comment column
- * @psalm-method Collection&\Traversable<ChildReferrer> findByComment(string $comment) Return ChildReferrer objects filtered by the comment column
+ *
+ * @method     ChildReferrer[]|Collection findById(int|array<int> $id) Return ChildReferrer objects filtered by the id column
+ * @psalm-method Collection&\Traversable<ChildReferrer> findById(int|array<int> $id) Return ChildReferrer objects filtered by the id column
+ * @method     ChildReferrer[]|Collection findByReferrer(string|array<string> $referrer) Return ChildReferrer objects filtered by the referrer column
+ * @psalm-method Collection&\Traversable<ChildReferrer> findByReferrer(string|array<string> $referrer) Return ChildReferrer objects filtered by the referrer column
+ * @method     ChildReferrer[]|Collection findByComment(string|array<string> $comment) Return ChildReferrer objects filtered by the comment column
+ * @psalm-method Collection&\Traversable<ChildReferrer> findByComment(string|array<string> $comment) Return ChildReferrer objects filtered by the comment column
+ *
  * @method     ChildReferrer[]|\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<ChildReferrer> 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 ReferrerQuery extends ModelCriteria
 {