Total Complexity | 4 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 88.24% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class MailServiceProvider extends AbstractSignatureServiceProvider |
||
12 | { |
||
13 | public const NAME = 'mail'; |
||
14 | |||
15 | /** |
||
16 | 1 | * {@inheritdoc} |
|
17 | */ |
||
18 | 1 | public function register() |
|
22 | 1 | } |
|
23 | |||
24 | protected function registerTransportManager() |
||
27 | 1 | } |
|
28 | 1 | ||
29 | protected function registerMailer() |
||
30 | 1 | { |
|
31 | $this->getContainer()->share('mailer', function () { |
||
32 | $transportManager = $this->getContainer()->get(TransportFactory::class); |
||
33 | 1 | $mailer = new MailerManager($transportManager); |
|
|
|||
34 | 1 | ||
35 | 1 | return $mailer; |
|
36 | 1 | }); |
|
37 | 1 | } |
|
38 | |||
39 | /** |
||
40 | * {@inheritdoc} |
||
41 | */ |
||
42 | public function provides() |
||
48 | ]; |
||
49 | } |
||
51 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.