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
Pull Request — master (#224)
by
unknown
02:04
created

ProcedureFactory::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 7
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 4
crap 2
1
<?php
2
3
/*
4
 * This file is part of the php-phantomjs.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace JonnyW\PhantomJs\Procedure;
11
12
use JonnyW\PhantomJs\Engine;
13
use JonnyW\PhantomJs\Cache\CacheInterface;
14
use JonnyW\PhantomJs\Parser\ParserInterface;
15
use JonnyW\PhantomJs\Template\TemplateRendererInterface;
16
17
/**
18
 * PHP PhantomJs
19
 *
20
 * @author Jon Wenmoth <[email protected]>
21
 */
22
class ProcedureFactory implements ProcedureFactoryInterface
23
{
24
    /**
25
     * PhantomJS engine
26
     *
27
     * @var \JonnyW\PhantomJs\Engine
28
     * @access protected
29
     */
30
    protected $engine;
31
32
    /**
33
     * Parser.
34
     *
35
     * @var \JonnyW\PhantomJs\Parser\ParserInterface
36
     * @access protected
37
     */
38
    protected $parser;
39
40
    /**
41
     * Cache handler.
42
     *
43
     * @var \JonnyW\PhantomJs\Cache\CacheInterface
44
     * @access protected
45
     */
46
    protected $cacheHandler;
47
48
    /**
49
     * Template renderer.
50
     *
51
     * @var \JonnyW\PhantomJs\Template\TemplateRendererInterface
52
     * @access protected
53
     */
54
    protected $renderer;
55
56
    /**
57
     * Internal constructor.
58
     *
59
     * @access public
60
     * @param \JonnyW\PhantomJs\Engine                             $engine
61
     * @param \JonnyW\PhantomJs\Parser\ParserInterface             $parser
62
     * @param \JonnyW\PhantomJs\Cache\CacheInterface               $cacheHandler
63
     * @param \JonnyW\PhantomJs\Template\TemplateRendererInterface $renderer
64
     */
65
    public function __construct(Engine $engine, ParserInterface $parser, CacheInterface $cacheHandler, TemplateRendererInterface $renderer)
66
    {
67
        $this->engine       = $engine;
68
        $this->parser       = $parser;
69
        $this->cacheHandler = $cacheHandler;
70
        $this->renderer     = $renderer;
71
    }
72
73
    /**
74
     * Create new procedure instance.
75
     *
76
     * @access public
77
     * @return \JonnyW\PhantomJs\Procedure\Procedure
78
     */
79
    public function createProcedure()
80
    {
81
        $procedure = new Procedure(
82
            $this->engine,
83
            $this->parser,
84
            $this->cacheHandler,
85
            $this->renderer
86
        );
87
88
        return $procedure;
89
    }
90
}
91