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

VerifierFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 4
Bugs 1 Features 1
Metric Value
wmc 1
c 4
b 1
f 1
lcom 0
cbo 3
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A createVerifier() 0 7 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\Verifier;
15
16
final class VerifierFactory
17
{
18
    /**
19
     * @param string[]                         $algorithms
20
     * @param \Jose\Checker\CheckerInterface[] $checker_managers
21
     *
22
     * @return \Jose\VerifierInterface
23
     */
24
    public static function createVerifier(array $algorithms, array $checker_managers = [])
25
    {
26
        $algorithm_manager = AlgorithmManagerFactory::createAlgorithmManager($algorithms);
27
        $checker_manager = CheckerManagerFactory::createCheckerManager($checker_managers);
28
29
        return new Verifier($algorithm_manager, $checker_manager);
30
    }
31
}
32