Passed
Push — master ( 18af30...0e6a78 )
by Mathias
45:31 queued 28:39
created

ProcessId   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 3
dl 0
loc 14
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 5 1
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @license MIT
7
 * @copyright  2013 - 2016 Cross Solution <http://cross-solution.de>
8
 */
9
  
10
/** */
11
namespace Core\Log\Processor;
12
13
use Zend\Log\Processor\ProcessorInterface;
14
15
/**
16
 * Adds the process id to the event array in the key 'pid'.
17
 *
18
 * @author Mathias Gelhausen <[email protected]>
19
 */
20
class ProcessId implements ProcessorInterface
21
{
22
    /**
23
     * Adds process id to the event array.
24
     *
25
     * @param  array $event
26
     *
27
     * @return array
28
     */
29 1
    public function process(array $event)
30
    {
31 1
        $event['pid'] = getmypid();
32
33 1
        return $event;
34
    }
35
}
36