Passed
Pull Request — master (#45)
by X
02:29
created

xKerman_Restricted_NullHandler::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * Handler to parse PHP serialized null value
5
 */
6
class xKerman_Restricted_NullHandler implements xKerman_Restricted_HandlerInterface
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
7
{
8
    /**
9
     * parse given `$source` as PHP serialized null value
10
     *
11
     * @param Source $source parser input
0 ignored issues
show
Documentation introduced by
Should the type for parameter $source not be xKerman_Restricted_Source?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
12
     * @param null   $args   null
13
     * @return array parse result
14
     * @throws UnserializeFailedException
15
     */
16
    public function handle(xKerman_Restricted_Source $source, $args)
17
    {
18
        return array($args, $source);
19
    }
20
}