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

Event   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 9
c 0
b 0
f 0
dl 0
loc 25
rs 10

4 Methods

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