Passed
Pull Request — main (#39)
by Tom
02:17
created

Metadata   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A eventName() 0 3 1
A getMetadata() 0 3 1
A __construct() 0 4 1
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