Completed
Push — master ( 2b6d49...c13cc5 )
by Florent
02:37
created

LoaderFactory::createLoader()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4286
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
/*
4
 * The MIT License (MIT)
5
 *
6
 * Copyright (c) 2014-2015 Spomky-Labs
7
 *
8
 * This software may be modified and distributed under the terms
9
 * of the MIT license.  See the LICENSE file for details.
10
 */
11
12
namespace Jose\Factory;
13
14
15
use Jose\Loader;
16
17
final class LoaderFactory
18
{
19
    /**
20
     * @param \Jose\Payload\PayloadConverterInterface[] $payload_converters
21
     *
22
     * @return \Jose\LoaderInterface
23
     */
24
    public static function createLoader(array $payload_converters = [])
25
    {
26
        $payload_converter_manager = PayloadConverterFactory::createPayloadConverter($payload_converters);
27
28
        return new Loader($payload_converter_manager);
29
    }
30
}
31