SimpleSerializableAsset   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 BadMethodCallException;
6
use Serializable;
7
8
/**
9
 * Base serializable test asset
10
 */
11
class SimpleSerializableAsset implements Serializable
12
{
13
    /**
14
     * Constructor - should not be called
15
     *
16
     * @throws BadMethodCallException
17
     */
18
    public function __construct()
19
    {
20
        throw new BadMethodCallException('Not supposed to be called!');
21
    }
22
23
    /**
24
     * {@inheritDoc}
25
     */
26
    public function serialize()
27
    {
28
        return '';
29
    }
30
31
    /**
32
     * {@inheritDoc}
33
     *
34
     * Should not be called
35
     *
36
     * @throws BadMethodCallException
37
     */
38
    public function unserialize($serialized)
39
    {
40
        throw new BadMethodCallException('Not supposed to be called!');
41
    }
42
}
43