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

GearmanWorkExecutedEvent   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 67
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 45.45%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 67
ccs 5
cts 11
cp 0.4545
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getJobs() 0 4 1
A getIterationsRemaining() 0 4 1
A getReturnCode() 0 4 1
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;
15
16
use Symfony\Component\EventDispatcher\Event;
17
18
/**
19
 * GearmanWorkExecutedEvent
20
 *
21
 * @author Dominic Grostate <[email protected]>
22
 *
23
 * @since 2.4.2
24
 */
25
class GearmanWorkExecutedEvent extends Event
26
{
27
    /**
28
     * @var array
29
     *
30
     * Gearman jobs running
31
     */
32
    protected $jobs;
33
34
    /**
35
     * @var int
36
     *
37
     * Remaining iterations on work
38
     */
39
    protected $iterationsRemaining;
40
41
    /**
42
     * @var int
43
     *
44
     * Return code from last ran job
45
     */
46
    protected $returnCode;
47
48
    /**
49
     * Construct method
50
     *
51
     * @param array $jobs                Jobs
52
     * @param int   $iterationsRemaining Iterations Remaining
53
     * @param int   $returnCode          Return code
54
     */
55 1
    public function __construct(array $jobs, $iterationsRemaining, $returnCode)
56
    {
57 1
        $this->jobs = $jobs;
58 1
        $this->iterationsRemaining = $iterationsRemaining;
59 1
        $this->returnCode = $returnCode;
60 1
    }
61
62
    /**
63
     * Get Gearman Work subscribed jobs
64
     *
65
     * @return array Subscribed jobs
66
     */
67
    public function getJobs()
68
    {
69
        return $this->jobs;
70
    }
71
72
    /**
73
     * Get Gearman Work remaining iteration length
74
     *
75
     * @return int Remaining iterations
76
     */
77
    public function getIterationsRemaining()
78
    {
79
        return $this->iterationsRemaining;
80
    }
81
82
    /**
83
     * Get Gearman Job return code
84
     *
85
     * @return int Last return code
86
     */
87
    public function getReturnCode()
88
    {
89
        return $this->returnCode;
90
    }
91
}
92