Completed
Push — master ( f8d4b2...9b5d9d )
by Márk
10s
created

EnvironmentCollector   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 9 1
1
<?php
2
3
namespace Nofw\Emperror\Processor;
4
5
use Nofw\Emperror\Processor;
6
use Nofw\Error\Context;
7
8
/**
9
 * Collects environment variables.
10
 *
11
 * @author Márk Sági-Kazár <[email protected]>
12
 */
13
final class EnvironmentCollector implements Processor
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function process(\Throwable $t, array $context): array
19
    {
20
        return array_replace_recursive(
21
            [
22
                Context::ENVIRONMENT => $_SERVER,
23
            ],
24
            $context
25
        );
26
    }
27
}
28