Passed
Push — drivers ( 5f8646...aadeb1 )
by Joe
01:53
created

Event::payload()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace PhpWinTools\WmiScripting\Support\Events;
4
5
class Event
6
{
7
    protected $payload;
8
9
    protected $called_class;
10
11
    public function __construct(Payload $payload)
12
    {
13
        $this->payload = $payload;
14
        $this->called_class = get_called_class();
15
    }
16
17
    public static function new(Payload $payload)
18
    {
19
        return new static($payload);
20
    }
21
22
    public function payload(): Payload
23
    {
24
        return $this->payload;
25
    }
26
27
    public function actual(): string
28
    {
29
        return $this->called_class;
30
    }
31
}
32