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

MailJobAdapter::setLogger()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
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