GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 85c09f...3053fe )
by Samuel
02:57
created

DefaultRole::getDescription()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php declare (strict_types=1);
2
3
/**
4
 * This file is part of the Samshal\Acl library
5
 *
6
 * @license MIT
7
 * @copyright Copyright (c) 2016 Samshal http://samshal.github.com
8
 */
9
namespace Samshal\Acl\Role;
10
11
use Samshal\Acl\ObjectInterface as ObjectInterface;
12
13
/**
14
 * class DefaultRole.
15
 *
16
 * A base object for creating new Role objects
17
 *
18
 * @package samshal.acl.role
19
 * @author Samuel Adeshina <[email protected]>
20
 * @since 30/05/2016
21
 */
22
class DefaultRole implements RoleInterface, ObjectInterface
23
{
24
    /**
25
     * @var string
26
     */
27
    protected $roleName;
28
29
    /**
30
     * @var string
31
     */
32
    protected $roleDescription;
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    public function __construct(string $roleName, string $roleDescription="")
38
    {
39
        $this->roleName = $roleName;
40
        $this->roleDescription = $roleDescription;
41
    }
42
43
    /**
44
     * {@inheritdoc}
45
     */
46
    public function getName() : string
47
    {
48
        return $this->roleName;
49
    }
50
51
    /**
52
     * {@inheritdoc}
53
     */
54
    public function getDescription() : string
55
    {
56
        return $this->roleDescription;
57
    }
58
59
    /**
60
     * Returns the roleName when this class is treated as a string.
61
     */
62
    public function __toString() : string
63
    {
64
        return $this->getName();
65
    }
66
}
67