Completed
Push — dev ( 088902...57261c )
by Matej
04:35
created

SyncEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 85.71%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getOutput() 0 4 1
A __construct() 0 8 2
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