Conditions | 3 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | public function generatePersonalAccessToken($clientIdentifier, $scope = null, $clientSecret = true) |
||
13 | { |
||
14 | if (property_exists(static::class, 'oauth2ModuleName')) { |
||
15 | $oauth2ModuleName = static::$oauth2ModuleName; |
||
16 | } |
||
17 | |||
18 | /** @var Oauth2Module $module */ |
||
19 | $module = empty($oauth2ModuleName) |
||
20 | ? Oauth2Module::getInstance() |
||
21 | : Yii::$app->getModule($oauth2ModuleName); |
||
22 | |||
23 | return $module->generatePersonalAccessToken( |
||
24 | $clientIdentifier, |
||
25 | $this->id, |
||
26 | $scope, |
||
27 | $clientSecret |
||
28 | ); |
||
31 |