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

UserAccountCheckerManager   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 25
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A add() 0 4 1
A check() 0 6 2
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