Completed
Push — master ( 6db6da...5370d9 )
by Angel
03:42
created

ProfileView   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 19
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A init() 0 3 1
A run() 0 4 1
1
<?php
2
3
namespace roaresearch\yii2\roa\actions;
4
5
use Yii;
6
7
class ProfileView extends \yii\rest\Action
8
{
9
    /**
10
     * @inheritdoc
11
     */
12
    public function init()
13
    {
14
    }
15
16
    /**
17
     * Shows the information of the logged user.
18
     *
19
     * @return yii\web\IdentityInterface
20
     */
21
    public function run()
22
    {
23
        return Yii::$app->user->identity;
24
    }
25
}
26