GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 578a26...0867d9 )
by Hong
02:10
created

CounterProcessor::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
/**
3
 * Phossa Project
4
 *
5
 * PHP version 5.4
6
 *
7
 * @category  Library
8
 * @package   Phossa2\Logger
9
 * @copyright Copyright (c) 2016 phossa.com
10
 * @license   http://mit-license.org/ MIT License
11
 * @link      http://www.phossa.com/
12
 */
13
/*# declare(strict_types=1); */
14
15
namespace Phossa2\Logger\Processor;
16
17
use Phossa2\Logger\Entry\LogEntryInterface;
18
19
/**
20
 * CounterProcessor
21
 *
22
 * Store a counter in context. Mostly for testing purpose.
23
 *
24
 * @package Phossa2\Logger
25
 * @author  Hong Zhang <[email protected]>
26
 * @see     ProcessorAbstract
27
 * @version 2.0.0
28
 * @since   2.0.0 added
29
 */
30
class CounterProcessor extends ProcessorAbstract
31
{
32
    /**
33
     * @var    int
34
     * @access protected
35
     */
36
    protected static $counter = 0;
37
38
    /**
39
     * {@inheritDoc}
40
     */
41
    public function __invoke(LogEntryInterface $logEntry)
42
    {
43
        $context = $logEntry->getContext();
44
        $context['counter'] = ++static::$counter;
45
        $logEntry->setContext($context);
46
    }
47
}
48