Oauth2ClientScope   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 4
c 1
b 0
f 0
dl 0
loc 17
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getAppliedByDefault() 0 4 2
A getRequiredOnAuthorization() 0 3 2
1
<?php
2
3
namespace rhertogh\Yii2Oauth2Server\models;
4
5
use rhertogh\Yii2Oauth2Server\interfaces\models\Oauth2ClientScopeInterface;
6
7
class Oauth2ClientScope extends base\Oauth2ClientScope implements Oauth2ClientScopeInterface
8
{
9
    /**
10
     * @inheritDoc
11
     */
12 3
    public function getAppliedByDefault()
13
    {
14 3
        $appliedByDefault = $this->applied_by_default;
15 3
        return $appliedByDefault !== null ? (int)$appliedByDefault : null;
0 ignored issues
show
introduced by
The condition $appliedByDefault !== null is always true.
Loading history...
16
    }
17
18
    /**
19
     * @inheritDoc
20
     */
21 3
    public function getRequiredOnAuthorization()
22
    {
23 3
        return $this->required_on_authorization === null ? null : (bool)$this->required_on_authorization;
24
    }
25
}
26