Failed Conditions
Pull Request — master (#54)
by Rafael
14:04 queued 06:57
created

library/Traits/EmailTrait.php (5 issues)

1
<?php
2
3
declare(strict_types=1);
4
5
namespace Gewaer\Traits;
6
7
use Gewaer\Models\Users;
8
use Phalcon\Di;
9
10
/**
11
 * Trait EmailTrait
12
 *
13
 * @package Gewaer\Traits
14
 *
15
 * @property Users $user
16
 * @property AppsPlans $appPlan
17
 * @property CompanyBranches $branches
18
 * @property Companies $company
19
 * @property UserCompanyApps $app
20
 * @property \Phalcon\Di $di
21
 *
22
 */
23
trait EmailTrait
24
{
25
    /**
26
     * Send webhook related emails to user
27
     * @param Users $user
28
     * @param array $payload
29
     * @return void
30
     */
31
    public static function sendWebhookEmail(Users $user, array $payload): void
0 ignored issues
show
The parameter $user is not used and could be removed. ( Ignorable by Annotation )

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

31
    public static function sendWebhookEmail(/** @scrutinizer ignore-unused */ Users $user, array $payload): void

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $payload is not used and could be removed. ( Ignorable by Annotation )

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

31
    public static function sendWebhookEmail(Users $user, /** @scrutinizer ignore-unused */ array $payload): void

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
32
    {
33
        Di::getDefault()->getMail()
34
            ->to($email)
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $email seems to be never defined.
Loading history...
35
            ->subject($subject)
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $subject seems to be never defined.
Loading history...
36
            ->content($content)
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $content seems to be never defined.
Loading history...
37
            ->sendNow();
38
    }
39
}
40