PasswordGrantRegenerateStrategy   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 3
dl 0
loc 16
c 0
b 0
f 0
ccs 0
cts 7
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getCredentials() 0 3 1
A supports() 0 3 1
1
<?php
2
3
namespace Xsolve\SalesforceClient\Security\Authentication\Strategy;
4
5
use Xsolve\SalesforceClient\Security\Authentication\Credentials;
6
use Xsolve\SalesforceClient\Security\Token\TokenInterface;
7
8
class PasswordGrantRegenerateStrategy implements RegenerateStrategyInterface
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function getCredentials(Credentials $credentials, TokenInterface $token): Credentials
14
    {
15
        return $credentials;
16
    }
17
18
    /**
19
     * {@inheritdoc}
20
     */
21
    public function supports(Credentials $credentials, TokenInterface $token): bool
22
    {
23
        return 'password' === $credentials->getGrantType();
24
    }
25
}
26