Passed
Pull Request — master (#687)
by butschster
08:45
created

MailJobAdapter   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 17
ccs 0
cts 6
cp 0
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A handle() 0 3 1
A setLogger() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiral\SendIt\Jobs;
6
7
use Psr\Log\LoggerInterface;
8
use Spiral\Core\Container\SingletonInterface;
9
use Spiral\Jobs\HandlerInterface;
10
11
/**
12
 * @deprecated since 2.13. Will be removed since 3.0
13
 */
14
final class MailJobAdapter implements HandlerInterface, SingletonInterface
15
{
16
    private \Spiral\SendIt\MailJob $job;
17
18
    public function __construct(\Spiral\SendIt\MailJob $job)
19
    {
20
        $this->job = $job;
21
    }
22
23
    public function setLogger(LoggerInterface $logger): void
24
    {
25
        $this->job->setLogger($logger);
26
    }
27
28
    public function handle(string $name, string $id, $payload): void
29
    {
30
        $this->job->handle($name, $id, $payload);
31
    }
32
}
33