ObjectEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 21
rs 10
c 1
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getAgent() 0 4 1
A getObject() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Psi\Component\ObjectAgent\Event;
6
7
use Psi\Component\ObjectAgent\AgentInterface;
8
use Symfony\Component\EventDispatcher\Event;
9
10
final class ObjectEvent extends Event
11
{
12
    private $agent;
13
    private $object;
14
15
    public function __construct(AgentInterface $agent, $object)
16
    {
17
        $this->object = $object;
18
        $this->agent = $agent;
19
    }
20
21
    public function getAgent()
22
    {
23
        return $this->agent;
24
    }
25
26
    public function getObject()
27
    {
28
        return $this->object;
29
    }
30
}
31