Passed
Push — master ( db4743...506f67 )
by Zbigniew
15:12
created

SerializerFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 15
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 9 1
1
<?php
2
3
/*
4
 * This file is part of the zibios/wrike-php-jmsserializer package.
5
 *
6
 * (c) Zbigniew Ślązak
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Zibios\WrikePhpJmsserializer;
13
14
use Doctrine\Common\Annotations\AnnotationRegistry;
15
use JMS\Serializer\SerializerBuilder;
16
use JMS\Serializer\SerializerInterface;
17
18
/**
19
 * Serializer Factory.
20
 */
21
class SerializerFactory
22
{
23
    /**
24
     * @return SerializerInterface
25
     */
26 47
    public static function create()
27
    {
28 47
        AnnotationRegistry::registerAutoloadNamespace(
29 47
            'JMS\Serializer\Annotation',
30 47
            __DIR__.'/../vendor/jms/serializer/src'
31
        );
32
33 47
        return SerializerBuilder::create()->build();
34
    }
35
}
36