Passed
Pull Request — main (#155)
by Daniel
05:12
created

ResourceChangedEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 14
ccs 0
cts 5
cp 0
rs 10
c 1
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 0 3 1
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, string $type)
0 ignored issues
show
Unused Code introduced by
The parameter $type is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

23
    public function __construct(private readonly object $resource, /** @scrutinizer ignore-unused */ string $type)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
24
    {
25
    }
26
27
    public function getResource(): object
28
    {
29
        return $this->resource;
30
    }
31
32
    public function getType(): string
33
    {
34
        return $this->getType();
35
    }
36
}
37