Passed
Push — v3.0 ( e8e1a7...ebb9a5 )
by Raza
01:55
created

Identity::getClientToken()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Srmklive\PayPal\Traits\PayPalAPI;
4
5
trait Identity
6
{
7
    /**
8
     * Get user profile information.
9
     *
10
     * @throws \Throwable
11
     *
12
     * @return array|\Psr\Http\Message\StreamInterface|string
13
     *
14
     * @see https://developer.paypal.com/docs/api/identity/v1/#userinfo_get
15
     */
16
    public function showProfileInfo()
17
    {
18
        $this->apiEndPoint = 'v1/identity/openidconnect/userinfo?schema=openid';
19
20
        $this->setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
0 ignored issues
show
Bug introduced by
It seems like setRequestHeader() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

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

20
        $this->/** @scrutinizer ignore-call */ 
21
               setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
Loading history...
21
22
        $this->verb = 'get';
23
24
        return $this->doPayPalRequest();
25
    }
26
}
27