Issues (31)

_legacy/LegacyMessageMethods.php (2 issues)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Nip\Mail;
6
7
trait LegacyMessageMethods
8
{
9
    /**
10
     * @param $from
11
     *
12
     * @deprecated use addFrom() instead
13
     *
14
     * @return $this
15
     */
16
    public function setFrom($from): self
17
    {
18
        return $this->addFrom($from);
0 ignored issues
show
It seems like addFrom() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

18
        return $this->/** @scrutinizer ignore-call */ addFrom($from);
Loading history...
19
    }
20
21
    /**
22
     * @param $subject
23
     *
24
     * @deprecated use subject() instead
25
     *
26
     * @return $this
27
     */
28
    public function setSubject($subject): self
29
    {
30
        return $this->subject($subject);
0 ignored issues
show
It seems like subject() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

30
        return $this->/** @scrutinizer ignore-call */ subject($subject);
Loading history...
31
    }
32
}
33