Completed
Push — 2.0 ( 14c778...b5ef61 )
by Marco
11:18
created

JobEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 29
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getEvent() 0 5 1
A getJob() 0 5 1
1
<?php namespace Comodojo\Extender\Events;
2
3
use \Comodojo\Extender\Jobs\Job;
4
5
/**
6
 * @package     Comodojo Dispatcher
7
 * @author      Marco Giovinazzi <[email protected]>
8
 * @author      Marco Castiello <[email protected]>
9
 * @license     GPL-3.0+
10
 *
11
 * LICENSE:
12
 *
13
 * This program is free software: you can redistribute it and/or modify
14
 * it under the terms of the GNU Affero General Public License as
15
 * published by the Free Software Foundation, either version 3 of the
16
 * License, or (at your option) any later version.
17
 *
18
 * This program is distributed in the hope that it will be useful,
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 * GNU Affero General Public License for more details.
22
 *
23
 * You should have received a copy of the GNU Affero General Public License
24
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
25
 */
26
27
class JobEvent extends AbstractEvent {
28
29
    private $event;
30
31
    private $job;
32
33
    public function __construct($event, Job $job) {
34
35
        parent::__construct("extender.job.$event");
36
37
        $this->event = $event;
38
39
        $this->job = $job;
40
41
    }
42
43
    public function getEvent() {
44
45
        return $this->event;
46
47
    }
48
49
    public function getJob() {
50
51
        return $this->job;
52
53
    }
54
55
}