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

CacheEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 4
1
<?php
2
3
namespace PhpWinTools\WmiScripting\Support\Cache\Events;
4
5
use PhpWinTools\WmiScripting\Support\Events\Event;
6
use PhpWinTools\WmiScripting\Support\Events\Payload;
7
use PhpWinTools\WmiScripting\Support\Cache\CacheDriver;
8
9
class CacheEvent extends Event
10
{
11
    public function __construct(CacheDriver $driver, $key = null, $value = null, $ttl = null)
12
    {
13
        parent::__construct(
14
            (new Payload())->add('driver', $driver)->add('key', $key)->add('value', $value)->add('ttl', $ttl)
15
        );
16
    }
17
}
18