I created a project with webtools enabled. And I made a model with webtools, but I think the return value of the findFirst () annotation is incorrect. This is what webtools generated.
class Users extends \Phalcon\Mvc\Model
{
(omitted)
/**
* Allows to query the first record that match the specified conditions
*
* @param mixed $parameters
* @return Users|\Phalcon\Mvc\Model\ResultInterface
*/
public static function findFirst($parameters = null)
{
return parent::findFirst($parameters);
}
}
But I think it should be this.
* @return Users|null
because
public static function findFirst(
mixed $parameters = null
): ModelInterface | null
https://docs.phalcon.io/4.0/en/db-models
Phalcon DevTools 4.0.3 Phalcon 4.0.6 AdminLTE 2.3.6