Passed
Push — master ( f52d5c...0b49e9 )
by Rutger
03:13
created

Oauth2ViewClientAction::run()   F

Complexity

Conditions 11
Paths 768

Size

Total Lines 43
Code Lines 31

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 132

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 31
c 1
b 0
f 0
dl 0
loc 43
ccs 0
cts 34
cp 0
rs 3.4722
cc 11
nc 768
nop 1
crap 132

How to fix   Complexity   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
namespace rhertogh\Yii2Oauth2Server\controllers\console\client;
4
5
use rhertogh\Yii2Oauth2Server\controllers\console\client\base\Oauth2BaseClientAction;
6
use rhertogh\Yii2Oauth2Server\controllers\console\Oauth2ClientController;
7
use rhertogh\Yii2Oauth2Server\interfaces\models\Oauth2ClientInterface;
8
use rhertogh\Yii2Oauth2Server\Oauth2Module;
9
use yii\console\ExitCode;
10
use yii\console\widgets\Table;
11
12
/**
13
 * @property Oauth2ClientController $controller
14
 */
15
class Oauth2ViewClientAction extends Oauth2BaseClientAction
16
{
17
    public function run($id)
18
    {
19
        $module = $this->controller->module;
20
        $client = $this->findByIdOrIdentifier($id);
21
22
        $clientInfo = [
23
            'ID' => $client->getPrimaryKey(),
24
            'Identifier' => $client->getIdentifier(),
0 ignored issues
show
Bug introduced by
The method getIdentifier() does not exist on rhertogh\Yii2Oauth2Serve...h2ActiveRecordInterface. It seems like you code against a sub-type of said class. However, the method does not exist in rhertogh\Yii2Oauth2Serve...2AuthCodeScopeInterface or rhertogh\Yii2Oauth2Serve...se\Oauth2TokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...cessTokenScopeInterface or rhertogh\Yii2Oauth2Serve...\Oauth2EnabledInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface or rhertogh\Yii2Oauth2Serve...th2ClientScopeInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

24
            'Identifier' => $client->/** @scrutinizer ignore-call */ getIdentifier(),
Loading history...
25
            'Name' => $client->getName(),
0 ignored issues
show
Bug introduced by
The method getName() does not exist on rhertogh\Yii2Oauth2Serve...h2ActiveRecordInterface. It seems like you code against a sub-type of said class. However, the method does not exist in rhertogh\Yii2Oauth2Serve...2AuthCodeScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...se\Oauth2TokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...cessTokenScopeInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...\Oauth2EnabledInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface or rhertogh\Yii2Oauth2Serve...th2ClientScopeInterface or rhertogh\Yii2Oauth2Serve...ls\Oauth2ScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

25
            'Name' => $client->/** @scrutinizer ignore-call */ getName(),
Loading history...
26
            'Type' => $client->isConfidential() ? 'Confidential' : 'Public',
0 ignored issues
show
Bug introduced by
The method isConfidential() does not exist on rhertogh\Yii2Oauth2Serve...h2ActiveRecordInterface. It seems like you code against a sub-type of said class. However, the method does not exist in rhertogh\Yii2Oauth2Serve...2AuthCodeScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...se\Oauth2TokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...cessTokenScopeInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...\Oauth2EnabledInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface or rhertogh\Yii2Oauth2Serve...th2ClientScopeInterface or rhertogh\Yii2Oauth2Serve...ls\Oauth2ScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

26
            'Type' => $client->/** @scrutinizer ignore-call */ isConfidential() ? 'Confidential' : 'Public',
Loading history...
27
            'Redirect URIs' => implode(', ', $client->getRedirectUri()),
0 ignored issues
show
Bug introduced by
The method getRedirectUri() does not exist on rhertogh\Yii2Oauth2Serve...h2ActiveRecordInterface. It seems like you code against a sub-type of said class. However, the method does not exist in rhertogh\Yii2Oauth2Serve...2AuthCodeScopeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...se\Oauth2TokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...cessTokenScopeInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...\Oauth2EnabledInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface or rhertogh\Yii2Oauth2Serve...th2ClientScopeInterface or rhertogh\Yii2Oauth2Serve...ls\Oauth2ScopeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

27
            'Redirect URIs' => implode(', ', $client->/** @scrutinizer ignore-call */ getRedirectUri()),
Loading history...
28
            'Allow Variable URI Query' => $client->isVariableRedirectUriQueryAllowed() ? 'Yes' : 'No',
0 ignored issues
show
Bug introduced by
The method isVariableRedirectUriQueryAllowed() does not exist on rhertogh\Yii2Oauth2Serve...h2ActiveRecordInterface. It seems like you code against a sub-type of said class. However, the method does not exist in rhertogh\Yii2Oauth2Serve...2AuthCodeScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...se\Oauth2TokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...cessTokenScopeInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...\Oauth2EnabledInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface or rhertogh\Yii2Oauth2Serve...th2ClientScopeInterface or rhertogh\Yii2Oauth2Serve...ls\Oauth2ScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

28
            'Allow Variable URI Query' => $client->/** @scrutinizer ignore-call */ isVariableRedirectUriQueryAllowed() ? 'Yes' : 'No',
Loading history...
29
            'Grant Types' => implode(',', Oauth2Module::getGrantTypeIdentifiers($client->getGrantTypes())),
0 ignored issues
show
Bug introduced by
The method getGrantTypes() does not exist on rhertogh\Yii2Oauth2Serve...h2ActiveRecordInterface. It seems like you code against a sub-type of said class. However, the method does not exist in rhertogh\Yii2Oauth2Serve...2AuthCodeScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...se\Oauth2TokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...cessTokenScopeInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...\Oauth2EnabledInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface or rhertogh\Yii2Oauth2Serve...th2ClientScopeInterface or rhertogh\Yii2Oauth2Serve...ls\Oauth2ScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

29
            'Grant Types' => implode(',', Oauth2Module::getGrantTypeIdentifiers($client->/** @scrutinizer ignore-call */ getGrantTypes())),
Loading history...
30
            'Scope Access' => Oauth2ClientInterface::SCOPE_ACCESSES_LABELS[$client->getScopeAccess()],
0 ignored issues
show
Bug introduced by
The method getScopeAccess() does not exist on rhertogh\Yii2Oauth2Serve...h2ActiveRecordInterface. It seems like you code against a sub-type of said class. However, the method does not exist in rhertogh\Yii2Oauth2Serve...2AuthCodeScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...se\Oauth2TokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...cessTokenScopeInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...\Oauth2EnabledInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface or rhertogh\Yii2Oauth2Serve...th2ClientScopeInterface or rhertogh\Yii2Oauth2Serve...ls\Oauth2ScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

30
            'Scope Access' => Oauth2ClientInterface::SCOPE_ACCESSES_LABELS[$client->/** @scrutinizer ignore-call */ getScopeAccess()],
Loading history...
31
            'End Users may authorize client' => $client->endUsersMayAuthorizeClient() ? 'Yes' : 'No',
0 ignored issues
show
Bug introduced by
The method endUsersMayAuthorizeClient() does not exist on rhertogh\Yii2Oauth2Serve...h2ActiveRecordInterface. It seems like you code against a sub-type of said class. However, the method does not exist in rhertogh\Yii2Oauth2Serve...2AuthCodeScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...se\Oauth2TokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...cessTokenScopeInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...\Oauth2EnabledInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface or rhertogh\Yii2Oauth2Serve...th2ClientScopeInterface or rhertogh\Yii2Oauth2Serve...ls\Oauth2ScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

31
            'End Users may authorize client' => $client->/** @scrutinizer ignore-call */ endUsersMayAuthorizeClient() ? 'Yes' : 'No',
Loading history...
32
            'User Account Selection' => $client->getUserAccountSelection()
0 ignored issues
show
Bug introduced by
The method getUserAccountSelection() does not exist on rhertogh\Yii2Oauth2Serve...h2ActiveRecordInterface. It seems like you code against a sub-type of said class. However, the method does not exist in rhertogh\Yii2Oauth2Serve...2AuthCodeScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...se\Oauth2TokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...cessTokenScopeInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...\Oauth2EnabledInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface or rhertogh\Yii2Oauth2Serve...th2ClientScopeInterface or rhertogh\Yii2Oauth2Serve...ls\Oauth2ScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

32
            'User Account Selection' => $client->/** @scrutinizer ignore-call */ getUserAccountSelection()
Loading history...
33
                ? Oauth2Module::USER_ACCOUNT_SELECTION_NAMES[$client->getUserAccountSelection()]
34
                : '[Using default: '
35
                    . Oauth2Module::USER_ACCOUNT_SELECTION_NAMES[$module->defaultUserAccountSelection]
36
                    . ']',
37
            'Is Auth Code without PKCE allowed' => $client->isAuthCodeWithoutPkceAllowed()  ? 'Yes' : 'No',
0 ignored issues
show
Bug introduced by
The method isAuthCodeWithoutPkceAllowed() does not exist on rhertogh\Yii2Oauth2Serve...h2ActiveRecordInterface. It seems like you code against a sub-type of said class. However, the method does not exist in rhertogh\Yii2Oauth2Serve...2AuthCodeScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...se\Oauth2TokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...cessTokenScopeInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...\Oauth2EnabledInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface or rhertogh\Yii2Oauth2Serve...th2ClientScopeInterface or rhertogh\Yii2Oauth2Serve...ls\Oauth2ScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

37
            'Is Auth Code without PKCE allowed' => $client->/** @scrutinizer ignore-call */ isAuthCodeWithoutPkceAllowed()  ? 'Yes' : 'No',
Loading history...
38
            'Skip authorization if scope is allowed' => $client->skipAuthorizationIfScopeIsAllowed()  ? 'Yes' : 'No',
0 ignored issues
show
Bug introduced by
The method skipAuthorizationIfScopeIsAllowed() does not exist on rhertogh\Yii2Oauth2Serve...h2ActiveRecordInterface. It seems like you code against a sub-type of said class. However, the method does not exist in rhertogh\Yii2Oauth2Serve...2AuthCodeScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...se\Oauth2TokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...cessTokenScopeInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...\Oauth2EnabledInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface or rhertogh\Yii2Oauth2Serve...th2ClientScopeInterface or rhertogh\Yii2Oauth2Serve...ls\Oauth2ScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

38
            'Skip authorization if scope is allowed' => $client->/** @scrutinizer ignore-call */ skipAuthorizationIfScopeIsAllowed()  ? 'Yes' : 'No',
Loading history...
39
            'Logo URI' => $client->getLogoUri(),
0 ignored issues
show
Bug introduced by
The method getLogoUri() does not exist on rhertogh\Yii2Oauth2Serve...h2ActiveRecordInterface. It seems like you code against a sub-type of said class. However, the method does not exist in rhertogh\Yii2Oauth2Serve...2AuthCodeScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...se\Oauth2TokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...cessTokenScopeInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...\Oauth2EnabledInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface or rhertogh\Yii2Oauth2Serve...th2ClientScopeInterface or rhertogh\Yii2Oauth2Serve...ls\Oauth2ScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

39
            'Logo URI' => $client->/** @scrutinizer ignore-call */ getLogoUri(),
Loading history...
40
            'Terms of Service URI' => $client->getTermsOfServiceUri(),
0 ignored issues
show
Bug introduced by
The method getTermsOfServiceUri() does not exist on rhertogh\Yii2Oauth2Serve...h2ActiveRecordInterface. It seems like you code against a sub-type of said class. However, the method does not exist in rhertogh\Yii2Oauth2Serve...2AuthCodeScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...se\Oauth2TokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...cessTokenScopeInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...\Oauth2EnabledInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface or rhertogh\Yii2Oauth2Serve...th2ClientScopeInterface or rhertogh\Yii2Oauth2Serve...ls\Oauth2ScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

40
            'Terms of Service URI' => $client->/** @scrutinizer ignore-call */ getTermsOfServiceUri(),
Loading history...
41
            'Contacts' => $client->getContacts(),
0 ignored issues
show
Bug introduced by
The method getContacts() does not exist on rhertogh\Yii2Oauth2Serve...h2ActiveRecordInterface. It seems like you code against a sub-type of said class. However, the method does not exist in rhertogh\Yii2Oauth2Serve...2AuthCodeScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...se\Oauth2TokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...cessTokenScopeInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...\Oauth2EnabledInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface or rhertogh\Yii2Oauth2Serve...th2ClientScopeInterface or rhertogh\Yii2Oauth2Serve...ls\Oauth2ScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

41
            'Contacts' => $client->/** @scrutinizer ignore-call */ getContacts(),
Loading history...
42
        ];
43
44
        if ($client->validateGrantType(Oauth2Module::GRANT_TYPE_IDENTIFIER_CLIENT_CREDENTIALS)) {
0 ignored issues
show
Bug introduced by
The method validateGrantType() does not exist on rhertogh\Yii2Oauth2Serve...h2ActiveRecordInterface. It seems like you code against a sub-type of said class. However, the method does not exist in rhertogh\Yii2Oauth2Serve...2AuthCodeScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...se\Oauth2TokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...cessTokenScopeInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...\Oauth2EnabledInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface or rhertogh\Yii2Oauth2Serve...th2ClientScopeInterface or rhertogh\Yii2Oauth2Serve...ls\Oauth2ScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

44
        if ($client->/** @scrutinizer ignore-call */ validateGrantType(Oauth2Module::GRANT_TYPE_IDENTIFIER_CLIENT_CREDENTIALS)) {
Loading history...
45
            $clientInfo['Client Credentials Grant User'] = $client->getClientCredentialsGrantUserId();
0 ignored issues
show
Bug introduced by
The method getClientCredentialsGrantUserId() does not exist on rhertogh\Yii2Oauth2Serve...h2ActiveRecordInterface. It seems like you code against a sub-type of said class. However, the method does not exist in rhertogh\Yii2Oauth2Serve...2AuthCodeScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...se\Oauth2TokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...cessTokenScopeInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...\Oauth2EnabledInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface or rhertogh\Yii2Oauth2Serve...th2ClientScopeInterface or rhertogh\Yii2Oauth2Serve...ls\Oauth2ScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

45
            /** @scrutinizer ignore-call */ 
46
            $clientInfo['Client Credentials Grant User'] = $client->getClientCredentialsGrantUserId();
Loading history...
46
        }
47
48
        if ($module->enableOpenIdConnect) {
49
            $clientInfo['OIDC allow offline access without consent'] =
50
                $client->getOpenIdConnectAllowOfflineAccessWithoutConsent()  ? 'Yes' : 'No';
0 ignored issues
show
Bug introduced by
The method getOpenIdConnectAllowOfflineAccessWithoutConsent() does not exist on rhertogh\Yii2Oauth2Serve...h2ActiveRecordInterface. It seems like you code against a sub-type of said class. However, the method does not exist in rhertogh\Yii2Oauth2Serve...2AuthCodeScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...se\Oauth2TokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...cessTokenScopeInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...\Oauth2EnabledInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface or rhertogh\Yii2Oauth2Serve...th2ClientScopeInterface or rhertogh\Yii2Oauth2Serve...ls\Oauth2ScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...uth2UserClientInterface or rhertogh\Yii2Oauth2Serve...serClientScopeInterface. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

50
                $client->/** @scrutinizer ignore-call */ 
51
                         getOpenIdConnectAllowOfflineAccessWithoutConsent()  ? 'Yes' : 'No';
Loading history...
51
        }
52
53
        $clientInfo['Enabled'] = $client->isEnabled()  ? 'Yes' : 'No';
0 ignored issues
show
Bug introduced by
The method isEnabled() does not exist on rhertogh\Yii2Oauth2Serve...h2ActiveRecordInterface. It seems like you code against a sub-type of said class. However, the method does not exist in rhertogh\Yii2Oauth2Serve...2AuthCodeScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...se\Oauth2TokenInterface or rhertogh\Yii2Oauth2Serve...cessTokenScopeInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface or rhertogh\Yii2Oauth2Serve...th2ClientScopeInterface or rhertogh\Yii2Oauth2Serve...ls\Oauth2ScopeInterface or rhertogh\Yii2Oauth2Serve...Oauth2AuthCodeInterface or rhertogh\Yii2Oauth2Serve...h2RefreshTokenInterface or rhertogh\Yii2Oauth2Serve...th2AccessTokenInterface. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

53
        $clientInfo['Enabled'] = $client->/** @scrutinizer ignore-call */ isEnabled()  ? 'Yes' : 'No';
Loading history...
54
55
        $this->controller->stdout(Table::widget([
56
            'rows' => array_map(fn($property) => [$property, $clientInfo[$property]], array_keys($clientInfo)),
57
        ]));
58
59
        return ExitCode::OK;
60
    }
61
}
62