Oauth2ClientScope::getAppliedByDefault()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 2

Importance

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