Reason   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 28
ccs 5
cts 5
cp 1
rs 10
c 1
b 0
f 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
3
namespace SitePoint\Rauth\Exception;
4
5
class Reason
6
{
7
    /** @var string */
8
    public $group;
9
10
    /** @var array */
11
    public $has;
12
13
    /** @var array */
14
    public $needs;
15
16
    /**
17
     * Reason constructor.
18
     *
19
     * Note that the word "group" below does not mean a group the user belongs
20
     * to, for example, but a group of attributes required / applied
21
     *
22
     * @param string $group "Auth-" group that caused the problem
23
     * @param array $has Existing attributes in that group
24
     * @param array $needs Needed / forbidden attributes in that group
25
     */
26 43
    public function __construct(string $group, array $has, array $needs)
27
    {
28 43
        $this->group = $group;
29 43
        $this->has = $has;
30 43
        $this->needs = $needs;
31 43
    }
32
}
33