ProvisionEvent   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 getCount() 0 4 1
1
<?php
2
3
namespace Innmind\ProvisionerBundle\Event;
4
5
use Symfony\Component\Console\Input\InputInterface;
6
7
/**
8
 * Event fired to instruct to run the given number of processes
9
 */
10
class ProvisionEvent extends AbstractEvent
11
{
12
    protected $count = 0;
13
14
    /**
15
     * Constructor
16
     *
17
     * @param string $name
18
     * @param InputInterface $input
19
     * @param int $count
20
     */
21 3
    public function __construct($name, InputInterface $input, $count)
22
    {
23 3
        parent::__construct($name, $input);
24
25 3
        $this->count = (int) $count;
26 3
    }
27
28
    /**
29
     * Return the number of processes to start
30
     *
31
     * @return int
32
     */
33 3
    public function getCount()
34
    {
35 3
        return $this->count;
36
    }
37
}
38