Test Failed
Pull Request — main (#152)
by Daniel
03:53
created

ResourceChangedEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 9
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getResource() 0 3 1
A __construct() 0 2 1
1
<?php
2
3
/*
4
 * This file is part of the Silverback API Components Bundle Project
5
 *
6
 * (c) Daniel West <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Silverback\ApiComponentsBundle\Event;
15
16
use Symfony\Contracts\EventDispatcher\Event;
17
18
/**
19
 * @author Daniel West <[email protected]>
20
 */
21
class ResourceChangedEvent extends Event
22
{
23
    public function __construct(private readonly object $resource)
24
    {
25
    }
26
27
    public function getResource(): object
28
    {
29
        return $this->resource;
30
    }
31
}
32