SerializableArrayObjectAsset   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 32
c 0
b 0
f 0
wmc 3
lcom 0
cbo 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A serialize() 0 4 1
A unserialize() 0 4 1
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