LogDependencyProvider::getLogHandlers()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * This file is part of the Spryker Commerce OS.
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
declare(strict_types = 1);
9
10
namespace Pyz\Yves\Log;
11
12
use Spryker\Yves\Customer\Plugin\Log\CurrentCustomerDataRequestProcessorPlugin;
13
use Spryker\Yves\Log\LogDependencyProvider as SprykerLogDependencyProvider;
14
use Spryker\Yves\Log\Plugin\Handler\StreamHandlerPlugin;
15
use Spryker\Yves\Log\Plugin\Log\AuditLogMetaDataProcessorPlugin;
16
use Spryker\Yves\Log\Plugin\Log\AuditLogRequestProcessorPlugin;
17
use Spryker\Yves\Log\Plugin\Log\AuditLogTagFilterBufferedStreamHandlerPlugin;
18
use Spryker\Yves\Log\Plugin\Processor\EnvironmentProcessorPlugin;
19
use Spryker\Yves\Log\Plugin\Processor\GuzzleBodyProcessorPlugin;
20
use Spryker\Yves\Log\Plugin\Processor\PsrLogMessageProcessorPlugin;
21
use Spryker\Yves\Log\Plugin\Processor\RequestProcessorPlugin;
22
use Spryker\Yves\Log\Plugin\Processor\ResponseProcessorPlugin;
23
use Spryker\Yves\Log\Plugin\Processor\ServerProcessorPlugin;
24
use SprykerShop\Yves\AgentPage\Plugin\Log\AgentCurrentRequestProcessorPlugin;
25
26
class LogDependencyProvider extends SprykerLogDependencyProvider
27
{
28
    /**
29
     * @return array<\Monolog\Handler\HandlerInterface>
30
     */
31
    protected function getLogHandlers(): array
32
    {
33
        return [
34
            new StreamHandlerPlugin(),
35
        ];
36
    }
37
38
    /**
39
     * @return list<\Spryker\Shared\Log\Dependency\Plugin\LogHandlerPluginInterface>
0 ignored issues
show
Bug introduced by
The type Pyz\Yves\Log\list 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...
40
     */
41
    protected function getYvesSecurityAuditLogHandlerPlugins(): array
42
    {
43
        return [
0 ignored issues
show
Bug Best Practice introduced by
The expression return array(new Spryker...dStreamHandlerPlugin()) returns the type array<integer,Spryker\Yv...redStreamHandlerPlugin> which is incompatible with the documented return type Pyz\Yves\Log\list.
Loading history...
44
            new AuditLogTagFilterBufferedStreamHandlerPlugin(),
45
        ];
46
    }
47
48
    /**
49
     * @return array<\Spryker\Shared\Log\Dependency\Plugin\LogProcessorPluginInterface>
50
     */
51
    protected function getProcessors(): array
52
    {
53
        return [
54
            new PsrLogMessageProcessorPlugin(),
55
            new EnvironmentProcessorPlugin(),
56
            new ServerProcessorPlugin(),
57
            new RequestProcessorPlugin(),
58
            new ResponseProcessorPlugin(),
59
            new GuzzleBodyProcessorPlugin(),
60
        ];
61
    }
62
63
    /**
64
     * @return list<\Spryker\Shared\Log\Dependency\Plugin\LogProcessorPluginInterface>
65
     */
66
    protected function getYvesSecurityAuditLogProcessorPlugins(): array
67
    {
68
        return [
69
            new PsrLogMessageProcessorPlugin(),
70
            new EnvironmentProcessorPlugin(),
71
            new ServerProcessorPlugin(),
72
            new AuditLogRequestProcessorPlugin(),
73
            new CurrentCustomerDataRequestProcessorPlugin(),
74
            new ResponseProcessorPlugin(),
75
            new AuditLogMetaDataProcessorPlugin(),
76
            new AgentCurrentRequestProcessorPlugin(),
77
        ];
78
    }
79
}
80