MailerServiceProvider::register()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 1
dl 0
loc 11
rs 9.4285
c 0
b 0
f 0
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() use ($config) {
19
            $transport = \Swift_MailTransport::newInstance();
20
            $mailer    = \Swift_Mailer::newInstance($transport);
21
22
            return $mailer;
23
        };
24
    }
25
}
26