PasswordGrantRegenerateStrategy::getCredentials()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
ccs 0
cts 3
cp 0
rs 10
cc 1
eloc 1
nc 1
nop 2
crap 2
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