Skip to content

Function call with compact() returns unused parameters error #120

@cinamo

Description

@cinamo

Analysing this code will make phpstan tell you that it has unused parameters.

    /**
     * SmtpAdapter constructor.
     *
     * @param \Swift_Mailer $mailer
     * @param string        $from
     * @param string        $to
     * @param string        $subject
     * @param string        $message
     */
    public function __construct(\Swift_Mailer $mailer, $from, $to, $subject, $message)
    {
        $this->mailer = $mailer;

        $this->options = compact('from', 'to', 'subject', 'message');
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions