ruudboon / phpstorm-phalcon-4-autocomplete

Autocomplete Phalcon v4 plugin for PhpStorm based on the Phalcon/ide-stubs
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

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

Open s-ohnishi opened 4 years ago

s-ohnishi commented 4 years ago
     * @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