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

ProcessingChainFactory::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 6
rs 10
cc 1
nc 1
nop 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