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.

FormatterAwareTrait::setFormatter()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
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\Formatter;
16
17
/**
18
 * FormatterAwareTrait
19
 *
20
 * @package Phossa2\Logger
21
 * @author  Hong Zhang <[email protected]>
22
 * @see     FormatterAwareInterface
23
 * @version 2.0.0
24
 * @since   2.0.0 added
25
 */
26
trait FormatterAwareTrait
27
{
28
    /**
29
     * formatter
30
     *
31
     * @var    callable
32
     * @access protected
33
     */
34
    protected $formatter;
35
36
    /**
37
     * {@inheritDoc}
38
     */
39
    public function setFormatter(callable $formatter = null)
40
    {
41
        $this->formatter = $formatter;
42
    }
43
44
    /**
45
     * {@inheritDoc}
46
     */
47
    public function getFormatter()/*# : callable */
48
    {
49
        if (is_null($this->formatter)) {
50
            $this->formatter = new DefaultFormatter();
51
        }
52
        return $this->formatter;
53
    }
54
}
55