Completed
Push — master ( e51b65...b01527 )
by Mike
8s
created
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.