EndPointTransformerTrait   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 77
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 7
eloc 8
c 1
b 0
f 0
dl 0
loc 77
ccs 0
cts 14
cp 0
rs 10

7 Methods

Rating   Name   Duplication   Size   Complexity  
A onRevocation() 0 3 1
A onAuthorization() 0 3 1
A onEndPoint() 0 3 1
A onEndSession() 0 3 1
A onToken() 0 3 1
A onIntrospection() 0 3 1
A onUserinfo() 0 3 1
1
<?php
2
3
namespace Parroauth2\Client\EndPoint;
4
5
use Parroauth2\Client\EndPoint\Authorization\AuthorizationEndPoint;
6
use Parroauth2\Client\EndPoint\Introspection\IntrospectionEndPoint;
7
use Parroauth2\Client\EndPoint\Token\RevocationEndPoint;
8
use Parroauth2\Client\EndPoint\Token\TokenEndPoint;
9
use Parroauth2\Client\OpenID\EndPoint\EndSessionEndPoint;
10
use Parroauth2\Client\OpenID\EndPoint\Userinfo\UserinfoEndPoint;
11
12
/**
13
 * Add default methods implementations for EndPointTransformerInterface
14
 *
15
 * @psalm-require-implements EndPointTransformerInterface
16
 */
17
trait EndPointTransformerTrait
18
{
19
    /**
20
     * {@inheritdoc}
21
     *
22
     * @see EndPointTransformerInterface::onEndPoint()
23
     * @psalm-suppress ImplementedReturnTypeMismatch
24
     */
25
    public function onEndPoint(EndPointInterface $endPoint): EndPointInterface
26
    {
27
        return $endPoint;
28
    }
29
30
    /**
31
     * {@inheritdoc}
32
     *
33
     * @see EndPointTransformerInterface::onAuthorization()
34
     * @psalm-suppress ImplementedReturnTypeMismatch
35
     */
36
    public function onAuthorization(AuthorizationEndPoint $endPoint): AuthorizationEndPoint
37
    {
38
        return $endPoint;
39
    }
40
41
    /**
42
     * {@inheritdoc}
43
     *
44
     * @see EndPointTransformerInterface::onToken()
45
     * @psalm-suppress ImplementedReturnTypeMismatch
46
     */
47
    public function onToken(TokenEndPoint $endPoint): TokenEndPoint
48
    {
49
        return $endPoint;
50
    }
51
52
    /**
53
     * {@inheritdoc}
54
     *
55
     * @see EndPointTransformerInterface::onRevocation()
56
     * @psalm-suppress ImplementedReturnTypeMismatch
57
     */
58
    public function onRevocation(RevocationEndPoint $endPoint): RevocationEndPoint
59
    {
60
        return $endPoint;
61
    }
62
63
    /**
64
     * {@inheritdoc}
65
     *
66
     * @see EndPointTransformerInterface::onIntrospection()
67
     * @psalm-suppress ImplementedReturnTypeMismatch
68
     */
69
    public function onIntrospection(IntrospectionEndPoint $endPoint): IntrospectionEndPoint
70
    {
71
        return $endPoint;
72
    }
73
74
    /**
75
     * {@inheritdoc}
76
     *
77
     * @see EndPointTransformerInterface::onUserinfo()
78
     * @psalm-suppress ImplementedReturnTypeMismatch
79
     */
80
    public function onUserinfo(UserinfoEndPoint $endPoint): UserinfoEndPoint
81
    {
82
        return $endPoint;
83
    }
84
85
    /**
86
     * {@inheritdoc}
87
     *
88
     * @see EndPointTransformerInterface::onEndSession()
89
     * @psalm-suppress ImplementedReturnTypeMismatch
90
     */
91
    public function onEndSession(EndSessionEndPoint $endPoint): EndSessionEndPoint
92
    {
93
        return $endPoint;
94
    }
95
}
96