Passed
Pull Request — master (#407)
by Ilya
04:29
created

getMerchantPortalSecurityAuditLogProcessorPlugins()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 10
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
namespace Pyz\Zed\Log;
9
10
use Spryker\Zed\Log\Communication\Plugin\Handler\ExceptionStreamHandlerPlugin;
11
use Spryker\Zed\Log\Communication\Plugin\Handler\StreamHandlerPlugin;
12
use Spryker\Zed\Log\Communication\Plugin\Log\AuditLogMetaDataProcessorPlugin;
13
use Spryker\Zed\Log\Communication\Plugin\Log\AuditLogRequestProcessorPlugin;
14
use Spryker\Zed\Log\Communication\Plugin\Log\AuditLogTagFilterBufferedStreamHandlerPlugin;
15
use Spryker\Zed\Log\Communication\Plugin\Processor\EnvironmentProcessorPlugin;
16
use Spryker\Zed\Log\Communication\Plugin\Processor\GuzzleBodyProcessorPlugin;
17
use Spryker\Zed\Log\Communication\Plugin\Processor\PsrLogMessageProcessorPlugin;
18
use Spryker\Zed\Log\Communication\Plugin\Processor\RequestProcessorPlugin;
19
use Spryker\Zed\Log\Communication\Plugin\Processor\ResponseProcessorPlugin;
20
use Spryker\Zed\Log\Communication\Plugin\Processor\ServerProcessorPlugin;
21
use Spryker\Zed\Log\LogDependencyProvider as SprykerLogDependencyProvider;
22
use Spryker\Zed\Propel\Communication\Plugin\Log\EntityProcessorPlugin;
23
use Spryker\Zed\User\Communication\Plugin\Log\CurrentUserDataRequestProcessorPlugin;
24
25
class LogDependencyProvider extends SprykerLogDependencyProvider
26
{
27
    /**
28
     * @return array<\Spryker\Shared\Log\Dependency\Plugin\LogHandlerPluginInterface>
29
     */
30
    protected function getLogHandlers(): array
31
    {
32
        return [
33
            new StreamHandlerPlugin(),
34
            new ExceptionStreamHandlerPlugin(),
35
        ];
36
    }
37
38
    /**
39
     * @return list<\Spryker\Shared\Log\Dependency\Plugin\LogHandlerPluginInterface>
40
     */
41
    protected function getZedSecurityAuditLogHandlerPlugins(): 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\Ze...redStreamHandlerPlugin> which is incompatible with the documented return type Pyz\Zed\Log\list.
Loading history...
44
            new AuditLogTagFilterBufferedStreamHandlerPlugin(),
45
        ];
46
    }
47
48
    /**
49
     * @return list<\Spryker\Shared\Log\Dependency\Plugin\LogHandlerPluginInterface>
50
     */
51
    protected function getMerchantPortalSecurityAuditLogHandlerPlugins(): array
52
    {
53
        return [
0 ignored issues
show
Bug Best Practice introduced by
The expression return array(new Spryker...dStreamHandlerPlugin()) returns the type array<integer,Spryker\Ze...redStreamHandlerPlugin> which is incompatible with the documented return type Pyz\Zed\Log\list.
Loading history...
54
            new AuditLogTagFilterBufferedStreamHandlerPlugin(),
55
        ];
56
    }
57
58
    /**
59
     * @return array<\Spryker\Shared\Log\Dependency\Plugin\LogProcessorPluginInterface>
60
     */
61
    protected function getLogProcessors(): array
62
    {
63
        return [
64
            new PsrLogMessageProcessorPlugin(),
65
            new EntityProcessorPlugin(),
66
            new EnvironmentProcessorPlugin(),
67
            new ServerProcessorPlugin(),
68
            new RequestProcessorPlugin(),
69
            new ResponseProcessorPlugin(),
70
            new GuzzleBodyProcessorPlugin(),
71
        ];
72
    }
73
74
    /**
75
     * @return list<\Spryker\Shared\Log\Dependency\Plugin\LogProcessorPluginInterface>
76
     */
77
    protected function getZedSecurityAuditLogProcessorPlugins(): array
78
    {
79
        return [
80
            new PsrLogMessageProcessorPlugin(),
81
            new EnvironmentProcessorPlugin(),
82
            new ServerProcessorPlugin(),
83
            new AuditLogRequestProcessorPlugin(),
84
            new CurrentUserDataRequestProcessorPlugin(),
85
            new ResponseProcessorPlugin(),
86
            new AuditLogMetaDataProcessorPlugin(),
87
        ];
88
    }
89
90
    /**
91
     * @return list<\Spryker\Shared\Log\Dependency\Plugin\LogProcessorPluginInterface>
92
     */
93
    protected function getMerchantPortalSecurityAuditLogProcessorPlugins(): array
94
    {
95
        return [
96
            new PsrLogMessageProcessorPlugin(),
97
            new EnvironmentProcessorPlugin(),
98
            new ServerProcessorPlugin(),
99
            new AuditLogRequestProcessorPlugin(),
100
            new CurrentUserDataRequestProcessorPlugin(),
101
            new ResponseProcessorPlugin(),
102
            new AuditLogMetaDataProcessorPlugin(),
103
        ];
104
    }
105
}
106