Completed
Push — issue/127 ( 820451...719f45 )
by Alex
03:15
created

DefaultCallback   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 21
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A process() 0 4 1
1
<?php declare(strict_types=1);
2
/*
3
 * This file is part of the feed-io package.
4
 *
5
 * (c) Alexandre Debril <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace FeedIo\Async;
12
13
use FeedIo\Reader\Result;
14
use \Psr\Log\LoggerInterface;
15
16
class DefaultCallback implements CallbackInterface
17
{
18
19
    /**
20
     * @var \Psr\Log\LoggerInterface
21
     */
22
    protected $logger;
23
24
    public function __construct(LoggerInterface $logger)
25
    {
26
        $this->logger = $logger;
27
    }
28
29
    /**
30
     * @inheritDoc
31
     */
32
    public function process(Result $result): void
33
    {
34
        $this->logger->info("feed processed : {$result->getUrl()}");
35
    }
36
}
37