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

ProcessId::process()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 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