Cancelled
Push — master ( cecdf8...dd4d66 )
by Alexander
98:11 queued 98:11
created

getZedSecurityAuditLogHandlerPlugins()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
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
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>
0 ignored issues
show
Bug introduced by
The type Pyz\Zed\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 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 array<\Spryker\Shared\Log\Dependency\Plugin\LogProcessorPluginInterface>
50
     */
51
    protected function getLogProcessors(): array
52
    {
53
        return [
54
            new PsrLogMessageProcessorPlugin(),
55
            new EntityProcessorPlugin(),
56
            new EnvironmentProcessorPlugin(),
57
            new ServerProcessorPlugin(),
58
            new RequestProcessorPlugin(),
59
            new ResponseProcessorPlugin(),
60
            new GuzzleBodyProcessorPlugin(),
61
        ];
62
    }
63
64
    /**
65
     * @return list<\Spryker\Shared\Log\Dependency\Plugin\LogProcessorPluginInterface>
66
     */
67
    protected function getZedSecurityAuditLogProcessorPlugins(): array
68
    {
69
        return [
70
            new PsrLogMessageProcessorPlugin(),
71
            new EnvironmentProcessorPlugin(),
72
            new ServerProcessorPlugin(),
73
            new AuditLogRequestProcessorPlugin(),
74
            new CurrentUserDataRequestProcessorPlugin(),
75
            new ResponseProcessorPlugin(),
76
            new AuditLogMetaDataProcessorPlugin(),
77
        ];
78
    }
79
}
80