GithubRepoPermissions   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 47
wmc 4
lcom 0
cbo 0
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A isAdmin() 0 4 1
A isPushAllowed() 0 4 1
A isReadAllowed() 0 4 1
1
<?php
2
3
namespace DevBoardLib\GithubCore\Repo;
4
5
/**
6
 * Class GithubRepoPermissions.
7
 */
8
class GithubRepoPermissions implements GithubRepoPermissonsInterface
9
{
10
    /** @var bool */
11
    private $admin;
12
    /** @var bool */
13
    private $push;
14
    /** @var bool */
15
    private $read;
16
17
    /**
18
     * GithubRepoPermissions constructor.
19
     *
20
     * @param bool $admin
21
     * @param bool $push
22
     * @param bool $read
23
     */
24
    public function __construct(bool $admin, bool $push, bool $read)
25
    {
26
        $this->admin = $admin;
27
        $this->push  = $push;
28
        $this->read  = $read;
29
    }
30
31
    /**
32
     * @return bool
33
     */
34
    public function isAdmin() : bool
35
    {
36
        return $this->admin;
37
    }
38
39
    /**
40
     * @return bool
41
     */
42
    public function isPushAllowed() : bool
43
    {
44
        return $this->push;
45
    }
46
47
    /**
48
     * @return bool
49
     */
50
    public function isReadAllowed() : bool
51
    {
52
        return $this->read;
53
    }
54
}
55