Skip to content

Phalcon\Mvc\Model::findFirst() Incorrect annotation return type #2

@s-ohnishi

Description

@s-ohnishi
     * @return bool|\Phalcon\Mvc\ModelInterface
     */
    public static function findFirst($parameters = null)
    {
    }

I think it should be this.

     * @return null|\Phalcon\Mvc\ModelInterface
     */
    public static function findFirst($parameters = null)
    {
    }

because

public static function findFirst(
    mixed $parameters = null
): ModelInterface | null

and

NOTE: findFirst() no longer returns false if records were not found.

https://docs.phalcon.io/4.0/en/db-models

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions