Completed
Push — v2.0.x ( 2b2b8e...21aa40 )
by Florent
03:32
created

SignerFactory::createSigner()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 1
Metric Value
c 3
b 0
f 1
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
/*
4
 * The MIT License (MIT)
5
 *
6
 * Copyright (c) 2014-2016 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
use Jose\Signer;
15
16
final class SignerFactory
17
{
18
    /**
19
     * @param string[] $algorithms
20
     *
21
     * @return \Jose\SignerInterface
22
     */
23
    public static function createSigner(array $algorithms)
24
    {
25
        $algorithm_manager = AlgorithmManagerFactory::createAlgorithmManager($algorithms);
26
27
        return new Signer($algorithm_manager);
28
    }
29
}
30