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

SerializerFactory::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 9
rs 9.6666
ccs 5
cts 5
cp 1
cc 1
eloc 5
nc 1
nop 0
crap 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