Completed
Push — ezp_31810 ( 8f2282 )
by
unknown
19:03
created

SerializerStub::supportsNormalization()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
5
 * @license For full copyright and license information view LICENSE file distributed with this source code.
6
 */
7
declare(strict_types=1);
8
9
namespace eZ\Publish\Core\MVC\Symfony\Component\Tests\Serializer\Stubs;
10
11
use eZ\Publish\API\Repository\Exceptions\NotImplementedException;
12
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
13
use Symfony\Component\Serializer\SerializerInterface;
14
15
final class SerializerStub implements SerializerInterface, NormalizerInterface
16
{
17
    public function serialize($data, $format, array $context = [])
18
    {
19
        throw new NotImplementedException(__METHOD__);
20
    }
21
22
    public function deserialize($data, $type, $format, array $context = [])
23
    {
24
        throw new NotImplementedException(__METHOD__);
25
    }
26
27
    public function normalize($object, $format = null, array $context = [])
28
    {
29
        return $object;
30
    }
31
32
    public function supportsNormalization($data, $format = null)
33
    {
34
        return true;
35
    }
36
}
37