Completed
Push — master ( 4f3de5...9b9e7a )
by Pavel
05:51
created

MailerServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 11 1
1
<?php
2
3
namespace App\Providers;
4
5
use Pimple\Container;
6
7
final class MailerServiceProvider extends BaseServiceProvider
8
{
9
    /**
10
     * Register mailer service provider.
11
     *
12
     * @param Container $container
13
     */
14
    public function register(Container $container)
15
    {
16
        $config = $container['settings'];
17
18
        $container['mailer'] = function (Container $c) use ($config) {
0 ignored issues
show
Unused Code introduced by
The parameter $c is not used and could be removed.

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

Loading history...
Comprehensibility introduced by
Avoid variables with short names like $c. Configured minimum length is 3.

Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.

Loading history...
19
            $transport = \Swift_MailTransport::newInstance();
20
            $mailer    = \Swift_Mailer::newInstance($transport);
21
22
            return $mailer;
23
        };
24
    }
25
}
26