Completed
Push — dev ( 33641b...44dc2b )
by Matej
05:52
created

SyncEvent::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2.1481

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
ccs 4
cts 6
cp 0.6667
rs 9.4286
cc 2
eloc 4
nc 2
nop 1
crap 2.1481
1
<?php
2
3
namespace Velikonja\LabbyBundle\Event;
4
5
use Symfony\Component\Console\Output\NullOutput;
6
use Symfony\Component\Console\Output\OutputInterface;
7
use Symfony\Component\EventDispatcher\Event;
8
9
class SyncEvent extends Event
10
{
11
    /**
12
     * @var OutputInterface
13
     */
14
    private $output;
15
16
    /**
17
     * @param null|OutputInterface $output
18
     */
19 4
    public function __construct(OutputInterface $output = null)
20
    {
21 4
        if (! $output) {
22
            $output = new NullOutput();
23
        }
24
25 4
        $this->output = $output;
26 4
    }
27
28 4
    public function getOutput()
29
    {
30 4
        return $this->output;
31
    }
32
}
33