ProvisionAlertEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 1
dl 0
loc 28
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getLeftOver() 0 4 1
1
<?php
2
3
namespace Innmind\ProvisionerBundle\Event;
4
5
use Symfony\Component\Console\Input\InputInterface;
6
7
/**
8
 * Event fired when the provisioner end its job giving access
9
 * to how many processes couldn't be launched
10
 */
11
class ProvisionAlertEvent extends AbstractEvent
12
{
13
    protected $leftOver = 0;
14
15
    /**
16
     * Constructor
17
     *
18
     * @param string $name
19
     * @param InputInterface $input
20
     * @param int $leftOver
21
     */
22 21
    public function __construct($name, InputInterface $input, $leftOver)
23
    {
24 21
        parent::__construct($name, $input);
25
26 21
        $this->leftOver = (int) $leftOver;
27 21
    }
28
29
    /**
30
     * Return the number of processes that couldn't be launched
31
     *
32
     * @return int
33
     */
34 21
    public function getLeftOver()
35
    {
36 21
        return $this->leftOver;
37
    }
38
}
39