Completed
Push — master ( 9882f6...0bdd02 )
by Andrew
9s
created

ScopeTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 17
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A jsonSerialize() 0 4 1
getIdentifier() 0 1 ?
1
<?php
2
/**
3
 * @author    Andrew Millington <[email protected]>
4
 * @copyright Copyright (c) Andrew Millington
5
 * @license   http://mit-license.org
6
 *
7
 * @link      https://github.com/thephpleague/oauth2-server
8
 */
9
10
namespace League\OAuth2\Server\Entities\Traits;
11
12
trait ScopeTrait
13
{
14
    /**
15
     * Serialize the object to the scopes string identifier when using json_encode().
16
     *
17
     * @return string
18
     */
19
    public function jsonSerialize()
20
    {
21
        return $this->getIdentifier();
22
    }
23
24
    /**
25
     * @return string
26
     */
27
    abstract public function getIdentifier();
28
}
29