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

ResourceChangedEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 0
nc 1
nop 2
dl 0
loc 2
ccs 0
cts 1
cp 0
crap 2
rs 10
c 1
b 0
f 0
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