Completed
Push — master ( 90c568...bbe31f )
by Mike
02:09
created
src/EntryPoint/RefreshToken.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
         'platform'
18 18
     );
19 19
 
20
-    public function data(array $data){
20
+    public function data(array $data) {
21 21
         $data['grant_type'] = 'password';
22 22
         return parent::data($data);
23 23
     }
Please login to merge, or discard this patch.
examples/FavoriteRecord.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once __DIR__ . '/../vendor/autoload.php';
3
+require_once __DIR__.'/../vendor/autoload.php';
4 4
 
5 5
 $record_id = 'a887c75b-b89a-852e-8e67-56f1ccdee355';
6 6
 
7
-try{
8
-    $SugarAPI = new \SugarAPI\SDK\SugarAPI('localhost/ent77',array('username' => 'admin','password'=>'admin123'));
7
+try {
8
+    $SugarAPI = new \SugarAPI\SDK\SugarAPI('localhost/ent77', array('username' => 'admin', 'password'=>'admin123'));
9 9
     $SugarAPI->login();
10
-    $EP = $SugarAPI->favorite('Accounts',$record_id);
10
+    $EP = $SugarAPI->favorite('Accounts', $record_id);
11 11
     $response = $EP->execute()->getResponse()->getBody();
12 12
 
13 13
     print_r($response);
14 14
 
15
-}catch(\SugarAPI\SDK\Exception\AuthenticationError $ex){
15
+}catch (\SugarAPI\SDK\Exception\AuthenticationError $ex) {
16 16
     print $ex->getMessage();
17 17
 }
18 18
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     ))->execute()->getResponse()->getBody();
16 16
     echo "Updated Record: ".$record->id;
17 17
 
18
-}catch(\SugarAPI\SDK\Exception\AuthenticationError $ex){
18
+} catch(\SugarAPI\SDK\Exception\AuthenticationError $ex){
19 19
     print $ex->getMessage();
20 20
 }
21 21
 
Please login to merge, or discard this patch.
src/Response/Abstracts/AbstractResponse.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -4,30 +4,30 @@
 block discarded – undo
4 4
 
5 5
 use SugarAPI\SDK\Response\Interfaces\ResponseInterface;
6 6
 
7
-abstract class AbstractResponse implements ResponseInterface{
7
+abstract class AbstractResponse implements ResponseInterface {
8 8
 
9 9
     protected $headers;
10 10
     protected $body;
11 11
     protected $status;
12 12
 
13
-    public function __construct($curlResponse,$curlRequest){
14
-        $header_size = curl_getinfo($curlRequest,CURLINFO_HEADER_SIZE);
13
+    public function __construct($curlResponse, $curlRequest) {
14
+        $header_size = curl_getinfo($curlRequest, CURLINFO_HEADER_SIZE);
15 15
         $this->headers = substr($curlResponse, 0, $header_size);
16 16
         $this->body = json_decode(substr($curlResponse, $header_size));
17
-        $this->status = curl_getinfo($curlRequest,CURLINFO_HTTP_CODE);
17
+        $this->status = curl_getinfo($curlRequest, CURLINFO_HTTP_CODE);
18 18
     }
19 19
 
20 20
     /**
21 21
      * @inheritdoc
22 22
      */
23
-    public function json(){
23
+    public function json() {
24 24
         return json_encode($this->body);
25 25
     }
26 26
 
27 27
     /**
28 28
      * @inheritdoc
29 29
      */
30
-    public function getStatus(){
30
+    public function getStatus() {
31 31
         return $this->status;
32 32
     }
33 33
 
Please login to merge, or discard this patch.