ScopeEntity   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 24
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A jsonSerialize() 0 4 1
1
<?php
2
3
namespace AdvancedLearning\Oauth2Server\Entities;
4
5
use League\OAuth2\Server\Entities\ScopeEntityInterface;
6
use League\OAuth2\Server\Entities\Traits\EntityTrait;
7
8
class ScopeEntity implements ScopeEntityInterface
9
{
10
    use EntityTrait;
11
12
    /**
13
     * ScopeEntity constructor.
14
     *
15
     * @param string $name The name of the scope.
16
     */
17
    public function __construct(string $name)
18
    {
19
        $this->setIdentifier($name);
20
    }
21
22
    /**
23
     * Get the scope in a format suitable for json.
24
     *
25
     * @return mixed
26
     */
27
    public function jsonSerialize()
28
    {
29
        return $this->getIdentifier();
30
    }
31
}
32