Completed
Push — master ( a293a3...292fca )
by X
02:23
created

NullHandler::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * handler for PHP null value
4
 */
5
namespace xKerman\Restricted;
6
7
/**
8
 * Handler to parse PHP serialized null value
9
 */
10
class NullHandler implements HandlerInterface
11
{
12
    /**
13
     * parse given `$source` as PHP serialized null value
14
     *
15
     * @param Source $source parser input
16
     * @param null   $args   null
17
     * @return array parse result
18
     * @throws UnserializeFailedException
19
     */
20 4
    public function handle(Source $source, $args)
21
    {
22 4
        return array($args, $source);
23
    }
24
}
25