Mail   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 3
c 2
b 0
f 0
dl 0
loc 22
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A mailer() 0 3 1
A transport() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Nip\Mail\Utility;
5
6
use Nip\Container\Utility\Container;
7
use Nip\Mail\Transport\TransportFactory;
8
9
/**
10
 *
11
 */
12
class Mail
13
{
14
    /**
15
     * @param $mailer
16
     * @return mixed|null
17
     */
18
    public static function mailer($mailer = null)
19
    {
20
        return $mailer;
21
    }
22
23
    /**
24
     * @param $transport
25
     *
26
     * @return mixed
27
     *
28
     * @throws \Psr\Container\ContainerExceptionInterface
29
     * @throws \Psr\Container\NotFoundExceptionInterface
30
     */
31
    public static function transport($transport = null)
32
    {
33
        return Container::container()->get(TransportFactory::class)->get($transport);
34
    }
35
}
36