Completed
Push — master ( e6cd79...15515b )
by Mike
02:12
created

Oauth2Token   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 20
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A data() 0 4 1
1
<?php
2
3
namespace SugarAPI\SDK\EntryPoint\POST;
4
5
use SugarAPI\SDK\EntryPoint\Abstracts\POST\JSONEntryPoint as POSTEntryPoint;
6
7
class Oauth2Token extends POSTEntryPoint {
8
9
    protected $_AUTH_REQUIRED = false;
10
    protected $_URL = 'oauth2/token';
11
    protected $_REQUIRED_DATA = array(
12
        'username',
13
        'password',
14
        'grant_type',
15
        'client_id',
16
        'client_secret',
17
        'platform'
18
    );
19
20
    public function data(array $data){
21
        $data['grant_type'] = 'password';
22
        return parent::data($data);
23
    }
24
25
26
}