Failed Conditions
Push — ng ( a2b1ac...8ea883 )
by Florent
04:25
created

UserAccountCheckerManager::check()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 3
nc 2
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * The MIT License (MIT)
7
 *
8
 * Copyright (c) 2014-2018 Spomky-Labs
9
 *
10
 * This software may be modified and distributed under the terms
11
 * of the MIT license.  See the LICENSE file for details.
12
 */
13
14
namespace OAuth2Framework\Component\AuthorizationEndpoint\UserAccount;
15
16
use OAuth2Framework\Component\AuthorizationEndpoint\Authorization;
17
18
class UserAccountCheckerManager
19
{
20
    /**
21
     * @var UserAccountChecker[]
22
     */
23
    private $checkers = [];
24
25
    /**
26
     * @param UserAccountChecker $checker
27
     */
28
    public function add(UserAccountChecker $checker)
29
    {
30
        $this->checkers[] = $checker;
31
    }
32
33
    /**
34
     * @param Authorization $authorization
35
     */
36
    public function check(Authorization $authorization)
37
    {
38
        foreach ($this->checkers as $checker) {
39
            $checker->check($authorization);
40
        }
41
    }
42
}
43