Oauth2ClientCredentialsGrantFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getGrantType() 0 5 1
1
<?php
2
3
namespace rhertogh\Yii2Oauth2Server\components\factories\grants;
4
5
use rhertogh\Yii2Oauth2Server\interfaces\components\factories\grants\Oauth2ClientCredentialsGrantFactoryInterface;
6
use rhertogh\Yii2Oauth2Server\interfaces\components\server\grants\Oauth2ClientCredentialsGrantInterface;
7
use Yii;
8
9
class Oauth2ClientCredentialsGrantFactory extends base\Oauth2BaseGrantTypeFactory implements
10
    Oauth2ClientCredentialsGrantFactoryInterface
11
{
12
    /**
13
     * @inheritDoc
14
     * @return Oauth2ClientCredentialsGrantInterface
15
     */
16 5
    public function getGrantType()
17
    {
18 5
        return Yii::createObject([
19 5
            'class' => Oauth2ClientCredentialsGrantInterface::class,
20 5
            'module' => $this->module,
21 5
        ]);
22
    }
23
}
24