Passed
Pull Request — master (#43)
by
unknown
26:55 queued 23:25
created

ProcessingChainFactory::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
dl 0
loc 4
rs 10
c 1
b 0
f 0
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 readonly Configuration $casconfig;
21
22
    public function __construct(
23
        Configuration $casconfig,
24
    ) {
25
        $this->casconfig = $casconfig;
0 ignored issues
show
Bug introduced by
The property casconfig is declared read-only in SimpleSAML\Module\casser...\ProcessingChainFactory.
Loading history...
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