Passed
Push — master ( 514780...9bef13 )
by butschster
16:53 queued 12s
created

MailJobAdapter   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 5
c 2
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
use Spiral\SendIt\MailJob;
11
12
/**
13
 * @deprecated since 2.13. Will be removed since 3.0
14
 */
15
final class MailJobAdapter implements HandlerInterface, SingletonInterface
16
{
17
    private MailJob $job;
18
19
    public function __construct(MailJob $job)
20
    {
21
        $this->job = $job;
22
    }
23
24
    public function setLogger(LoggerInterface $logger): void
25
    {
26
        $this->job->setLogger($logger);
27
    }
28
29
    public function handle(string $jobType, string $jobID, $payload): void
30
    {
31
        $this->job->handle($jobType, $jobID, $payload);
32
    }
33
}
34