Passed
Push — master ( 94702c...0299cb )
by Oleg
04:57
created

ChangeConnectionEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
3
namespace Doctrs\StoredProcedureBundle\Event;
4
5
use PgFunc\Connection;
6
use Symfony\Component\EventDispatcher\Event;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\EventDispatcher\Event was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
8
class ChangeConnectionEvent extends Event
9
{
10
    /**
11
     * @var Connection
12
     */
13
    private $connection;
14
15
    /**
16
     * @var \PgFunc\Procedure
17
     */
18
    private $procedure;
19
20
    /**
21
     * ChangeConnectionNameEvent constructor.
22
     *
23
     * @param Connection $connection
24
     */
25
    public function __construct(Connection $connection, \PgFunc\Procedure $procedure)
26
    {
27
        $this->connection = $connection;
28
        $this->procedure = $procedure;
29
    }
30
31
    /**
32
     * @return Connection
33
     */
34
    public function getConnection(): Connection
35
    {
36
        return $this->connection;
37
    }
38
39
    /**
40
     * @param Connection $connection
41
     *
42
     * @return self
43
     */
44
    public function setConnection(Connection $connection)
45
    {
46
        $this->connection = $connection;
47
48
        return $this;
49
    }
50
51
    /**
52
     * @return \PgFunc\Procedure
53
     */
54
    public function getProcedure(): \PgFunc\Procedure
55
    {
56
        return $this->procedure;
57
    }
58
59
    /**
60
     * @param \PgFunc\Procedure $procedure
61
     *
62
     * @return self
63
     */
64
    public function setProcedure(\PgFunc\Procedure $procedure)
65
    {
66
        $this->procedure = $procedure;
67
68
        return $this;
69
    }
70
}
71