Annotation in mailer

I have custom mailer function

/**
 * User mailer.
 */
class UserMailer extends Mailer
{
    /**
     * userPassword method
     *
     * @param object $data User data
     */
    public function userPassword(object $data): \Cake\View\ViewBuilder
    {

How do I please define an annotation for the table = $data so that it can tell me which column I can choose?

In view is:

 * @var \App\Model\Entity\User[]|\Cake\Collection\CollectionInterface $data

Thank you

why not try

    /**
     * userPassword method
     *
     * @param \App\Model\Entity\User[] $data User data
     */
    public function userPassword(array $data): \Cake\View\ViewBuilder
    {
1 Like

Its doesnt work…

Argument type does not match the declared

It is works:

    /**
     * userPassword method
     *
     * @param \App\Model\Entity\User $data User data
     * @return \Cake\View\ViewBuilder
     */
    public function userPassword(\App\Model\Entity\User $data): \Cake\View\ViewBuilder
    {