SSOController::customerProfile()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 7
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 10
rs 10
1
<?php
2
3
namespace bSecure;
4
5
use bSecure\Helpers\Constant;
6
7
abstract class SSOController
8
{
9
    /**
10
     * Returns your customer's profile object on successfull authorization request and
11
     * fetch the record from bSecure.
12
     *
13
     * @param array $params
14
     *
15
     * @throws \bSecure\ApiResponse if the request fails
16
     *
17
     * @return \bSecure\ApiResponse  Returns Profile object containing your customer profile
18
     */
19
    public static function customerProfile($param)
20
    {
21
        $requestor = new ApiRequest();
22
        $response = $requestor->request(
23
          'post',
24
          Constant::API_ENDPOINTS['customer_profile'],
25
          $param,
26
          Constant::YES
27
        );
28
        return $response[0];
29
    }
30
}