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

EnvironmentCollector::process()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 2
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