Passed
Branch main (0cd36c)
by Tom
03:14 queued 39s
created

Metadata::eventName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ApiSkeletons\Doctrine\ORM\GraphQL\Event;
6
7
use ArrayObject;
8
use League\Event\HasEventName;
9
10
/**
11
 * This event is fired when the metadta is created
12
 */
13
class Metadata implements
14
    HasEventName
15
{
16
    public function __construct(
17
        protected ArrayObject $metadata,
18
        protected string $eventName,
19
    ) {
20
    }
21
22
    public function eventName(): string
23
    {
24
        return $this->eventName;
25
    }
26
27
    public function getMetadata(): ArrayObject
28
    {
29
        return $this->metadata;
30
    }
31
}
32