Oauth2CertificatesController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A actions() 0 4 1
A behaviors() 0 7 1
1
<?php
2
3
namespace rhertogh\Yii2Oauth2Server\controllers\web;
4
5
use rhertogh\Yii2Oauth2Server\controllers\web\base\Oauth2BaseApiController;
6
use rhertogh\Yii2Oauth2Server\interfaces\controllers\web\certificates\Oauth2JwksActionInterface;
7
use rhertogh\Yii2Oauth2Server\interfaces\controllers\web\Oauth2CertificatesControllerInterface;
8
use yii\filters\VerbFilter;
9
use yii\helpers\ArrayHelper;
10
11
class Oauth2CertificatesController extends Oauth2BaseApiController implements Oauth2CertificatesControllerInterface
12
{
13
    /**
14
     * @inheritDoc
15
     */
16 5
    public function behaviors()
17
    {
18 5
        return ArrayHelper::merge(parent::behaviors(), [
19 5
            'verbFilter' => [
20 5
                'class' => VerbFilter::class,
21 5
                'actions' => [
22 5
                    static::ACTION_NAME_JWKS => ['GET'],
23 5
                ],
24 5
            ],
25 5
        ]);
26
    }
27
28
    /**
29
     * @inheritDoc
30
     */
31 5
    public function actions()
32
    {
33 5
        return [
34 5
            static::ACTION_NAME_JWKS => Oauth2JwksActionInterface::class,
35 5
        ];
36
    }
37
}
38