AbstractSaver   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 8
c 1
b 0
f 0
dl 0
loc 41
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A logHeader() 0 3 1
1
<?php
2
3
/**
4
 * MIT License
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\Computop\Business\RiskCheck\Saver;
9
10
use Generated\Shared\Transfer\ComputopApiResponseHeaderTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...iResponseHeaderTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
11
use Orm\Zed\Computop\Persistence\SpyPaymentComputopApiLog;
0 ignored issues
show
Bug introduced by
The type Orm\Zed\Computop\Persist...pyPaymentComputopApiLog was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
12
use SprykerEco\Zed\Computop\Business\Logger\LoggerInterface;
13
use SprykerEco\Zed\Computop\ComputopConfig;
14
use SprykerEco\Zed\Computop\Persistence\ComputopQueryContainerInterface;
15
16
abstract class AbstractSaver implements RiskCheckSaverInterface
17
{
18
    /**
19
     * @var \SprykerEco\Zed\Computop\Business\Logger\LoggerInterface
20
     */
21
    protected $logger;
22
23
    /**
24
     * @var \SprykerEco\Zed\Computop\Persistence\ComputopQueryContainerInterface $queryContainer
25
     */
26
    protected $queryContainer;
27
28
    /**
29
     * @var \SprykerEco\Zed\Computop\ComputopConfig
30
     */
31
    protected $config;
32
33
    /**
34
     * @param \SprykerEco\Zed\Computop\Persistence\ComputopQueryContainerInterface $queryContainer
35
     * @param \SprykerEco\Zed\Computop\Business\Logger\LoggerInterface $logger
36
     * @param \SprykerEco\Zed\Computop\ComputopConfig $config
37
     */
38
    public function __construct(
39
        ComputopQueryContainerInterface $queryContainer,
40
        LoggerInterface $logger,
41
        ComputopConfig $config
42
    ) {
43
        $this->queryContainer = $queryContainer;
44
        $this->logger = $logger;
45
        $this->config = $config;
46
    }
47
48
    /**
49
     * @param \Generated\Shared\Transfer\ComputopApiResponseHeaderTransfer $headerTransfer
50
     * @param string $method
51
     *
52
     * @return \Orm\Zed\Computop\Persistence\SpyPaymentComputopApiLog
53
     */
54
    protected function logHeader(ComputopApiResponseHeaderTransfer $headerTransfer, $method): SpyPaymentComputopApiLog
55
    {
56
        return $this->logger->log($headerTransfer, $method);
57
    }
58
}
59