Reason::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 9.4285
c 1
b 0
f 1
cc 1
eloc 4
nc 1
nop 3
crap 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