Completed
Push — develop ( 6a168f...92c47e )
by
unknown
12:16
created

UniqueId   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 19
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 8 1
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @license MIT
7
 * @copyright  2013 - 2015 Cross Solution <http://cross-solution.de>
8
 */
9
  
10
/** */
11
namespace Core\Log\Processor;
12
13
use Zend\Log\Processor\RequestId;
14
15
/**
16
 * ${CARET}
17
 * 
18
 * @author Mathias Gelhausen <[email protected]>
19
 * @todo write test 
20
 */
21
class UniqueId extends RequestId
22
{
23
24
    /**
25
     * Processes a log message before it is given to the writers
26
     *
27
     * @param  array $event
28
     *
29
     * @return array
30
     */
31
    public function process(array $event)
32
    {
33
        $event = parent::process($event);
34
35
        $event['uniqueId'] = substr($event['extra']['requestId'], 0, 7);
36
37
        return $event;
38
    }
39
}