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 (#158)
by Bernardo Vieira da
12:24
created

AbstractGearmanClientTaskEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
/**
4
 * Gearman Bundle for Symfony2
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 *
9
 * Feel free to edit as you please, and have fun.
10
 *
11
 * @author Marc Morera <[email protected]>
12
 */
13
14
namespace Mmoreram\GearmanBundle\Event\Abstracts;
15
16
use GearmanTask;
17
use Symfony\Component\EventDispatcher\Event;
18
19
/**
20
 * AbstractGearmanClientTaskEvent
21
 */
22
abstract class AbstractGearmanClientTaskEvent extends Event
23
{
24
    /**
25
     * @var GearmanTask
26
     *
27
     * Gearman task object
28
     */
29
    protected $gearmanTask;
30
31
    /**
32
     * @var mixed
33
     *
34
     * Context that can be set in the addTask method
35
     */
36
    protected $context;
37
38
    /**
39
     * Construct method
40
     *
41
     * @param GearmanTask $gearmanTask Gearman Task
42
     */
43
    public function __construct(GearmanTask $gearmanTask)
44
    {
45
        $this->gearmanTask = $gearmanTask;
46
    }
47
48
    /**
49
     * Get Gearman Task
50
     *
51
     * @return GearmanTask Gearman Task
52
     */
53
    public function getGearmanTask()
54
    {
55
        return $this->gearmanTask;
56
    }
57
58
    /**
59
     * @param mixed $context Context that can be set in the addTask method
60
     */
61
    public function setContext($context)
62
    {
63
        $this->context = &$context['context'];
64
    }
65
66
    /**
67
     * @return mixed Context that can be set in the addTask method
68
     */
69
    public function &getContext()
70
    {
71
        return $this->context;
72
    }
73
}
74