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

ScopeTrait::jsonSerialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
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