SerializableArrayObjectAsset::unserialize()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace DoctrineTest\InstantiatorTestAsset;
4
5
use ArrayObject;
6
use BadMethodCallException;
7
use Serializable;
8
9
/**
10
 * Serializable test asset that also extends an internal class
11
 */
12
class SerializableArrayObjectAsset extends ArrayObject implements Serializable
13
{
14
    /**
15
     * Constructor - should not be called
16
     *
17
     * @throws BadMethodCallException
18
     */
19
    public function __construct()
20
    {
21
        throw new BadMethodCallException('Not supposed to be called!');
22
    }
23
24
    /**
25
     * {@inheritDoc}
26
     */
27
    public function serialize()
28
    {
29
        return '';
30
    }
31
32
    /**
33
     * {@inheritDoc}
34
     *
35
     * Should not be called
36
     *
37
     * @throws BadMethodCallException
38
     */
39
    public function unserialize($serialized)
40
    {
41
        throw new BadMethodCallException('Not supposed to be called!');
42
    }
43
}
44