FailedObjectConstructor::construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 4
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
}