Passed
Push — master ( f872b6...81b6b5 )
by
unknown
04:25 queued 38s
created

ProcessingChainFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 7
c 1
b 0
f 0
dl 0
loc 21
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A build() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the simplesamlphp-module-casserver.
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 SimpleSAML\Module\casserver\Cas\Factories;
13
14
use SimpleSAML\Auth\ProcessingChain;
15
use SimpleSAML\Configuration;
16
17
class ProcessingChainFactory
18
{
19
    /** @var Configuration */
20
    private Configuration $casconfig;
21
22
    public function __construct(
23
        Configuration $casconfig,
24
    ) {
25
        $this->casconfig = $casconfig;
26
    }
27
28
    /**
29
     * @codeCoverageIgnore
30
     * @throws \Exception
31
     */
32
    public function build(array $state): ProcessingChain
33
    {
34
        return new ProcessingChain(
35
            $state['Source'],
36
            $state['Destination'],
37
            'casserver',
38
        );
39
    }
40
}
41