Completed
Push — master ( 832a22...d853d3 )
by Bruno
6s
created

Reason::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 0
loc 6
rs 9.4285
c 1
b 0
f 1
cc 1
eloc 4
nc 1
nop 3
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
    public function __construct(string $group, array $has, array $needs)
27
    {
28
        $this->group = $group;
29
        $this->has = $has;
30
        $this->needs = $needs;
31
    }
32
}
33