FailedObjectConstructor   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 1
c 2
b 0
f 1
lcom 0
cbo 0
dl 0
loc 19
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A construct() 0 4 1
1
<?php
2
namespace Tpg\ExtjsBundle\Component;
3
4
use JMS\Serializer\Construction\ObjectConstructorInterface;
5
use JMS\Serializer\Metadata\ClassMetadata;
6
use JMS\Serializer\VisitorInterface;
7
8
class FailedObjectConstructor implements ObjectConstructorInterface {
9
    /**
10
     * Constructs a new object.
11
     *
12
     * Implementations could for example create a new object calling "new", use
13
     * "unserialize" techniques, reflection, or other means.
14
     *
15
     * @param VisitorInterface $visitor
16
     * @param ClassMetadata    $metadata
17
     * @param mixed            $data
18
     * @param array            $type ["name" => string, "params" => array]
19
     *
20
     * @return object
21
     */
22
    public function construct(VisitorInterface $visitor, ClassMetadata $metadata, $data, array $type)
23
    {
24
        throw new \Exception('Fail to construct the object');
25
    }
26
}