ProvisionEvent::getCount()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 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