Completed
Push — master ( f59019...093bae )
by Guillaume
04:06
created

CircuitEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the circuit-breaker package
5
 *
6
 * Copyright (c) 2016 Guillaume Cavana
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 *
11
 * Feel free to edit as you please, and have fun.
12
 *
13
 * @author Guillaume Cavana <[email protected]>
14
 */
15
16
namespace Eljam\CircuitBreaker\Event;
17
18
use Eljam\CircuitBreaker\Circuit;
19
use Symfony\Component\EventDispatcher\Event;
20
21
/**
22
 * Class CircuitEvent.
23
 */
24
class CircuitEvent extends Event
25
{
26
    protected $circuit;
27
28
    /**
29
     * Constructor.
30
     *
31
     * @param Circuit $circuit
32
     */
33
    public function __construct(Circuit $circuit)
34
    {
35
        $this->circuit = $circuit;
36
    }
37
38
    /**
39
     * getCircuit.
40
     *
41
     * @return Circuit
42
     */
43
    public function getCircuit()
44
    {
45
        return $this->circuit;
46
    }
47
}
48