@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | protected static $_DEFAULT_OPTIONS = array( |
| 24 | 24 | CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_0, |
| 25 | - CURLOPT_HEADER => true, |
|
| 25 | + CURLOPT_HEADER => TRUE, |
|
| 26 | 26 | CURLOPT_SSL_VERIFYPEER => 0, |
| 27 | 27 | CURLOPT_RETURNTRANSFER => 1, |
| 28 | 28 | CURLOPT_FOLLOWLOCATION => 0 |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | /** |
| 68 | 68 | * @var null |
| 69 | 69 | */ |
| 70 | - protected $status = null; |
|
| 70 | + protected $status = NULL; |
|
| 71 | 71 | |
| 72 | 72 | /** |
| 73 | 73 | * The Request Type |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | protected $type; |
| 77 | 77 | |
| 78 | - public function __construct($url = null){ |
|
| 78 | + public function __construct($url = NULL){ |
|
| 79 | 79 | $this->start(); |
| 80 | 80 | if (!empty($url)){ |
| 81 | 81 | $this->setURL($url); |
@@ -70,9 +70,9 @@ |
||
| 70 | 70 | protected function checkErrors($curlRequest){ |
| 71 | 71 | if (curl_errno($curlRequest) !== CURLE_OK) { |
| 72 | 72 | $this->error = curl_error($curlRequest); |
| 73 | - return false; |
|
| 73 | + return FALSE; |
|
| 74 | 74 | } |
| 75 | - return true; |
|
| 75 | + return TRUE; |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | */ |
| 19 | 19 | protected $destinationPath; |
| 20 | 20 | |
| 21 | - public function __construct($curlResponse, $curlRequest,$destination = null) { |
|
| 21 | + public function __construct($curlResponse, $curlRequest,$destination = NULL) { |
|
| 22 | 22 | parent::__construct($curlResponse, $curlRequest); |
| 23 | 23 | $this->extractFileName(); |
| 24 | 24 | if (!empty($destination)) { |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | * Configure the Destination path to store the File response |
| 32 | 32 | * @param null $destination |
| 33 | 33 | */ |
| 34 | - protected function setupDestination($destination = null){ |
|
| 34 | + protected function setupDestination($destination = NULL){ |
|
| 35 | 35 | if (empty($destination)){ |
| 36 | 36 | $destination = sys_get_temp_dir().'/SugarAPI'; |
| 37 | 37 | if (!file_exists($destination)){ |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | * Whether or not Authentication is Required |
| 15 | 15 | * @var bool |
| 16 | 16 | */ |
| 17 | - protected $_AUTH_REQUIRED = true; |
|
| 17 | + protected $_AUTH_REQUIRED = TRUE; |
|
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * The default Module for the EntryPoint |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | throw new EntryPointException('EntryPoint URL ('.$this->_URL.') requires more parameters than passed.'); |
| 264 | 264 | } |
| 265 | 265 | }else{ |
| 266 | - return true; |
|
| 266 | + return TRUE; |
|
| 267 | 267 | } |
| 268 | 268 | } |
| 269 | 269 | |
@@ -274,11 +274,11 @@ discard block |
||
| 274 | 274 | */ |
| 275 | 275 | protected function validateData(){ |
| 276 | 276 | if (empty($this->_REQUIRED_DATA)||count($this->_REQUIRED_DATA)==0){ |
| 277 | - return true; |
|
| 277 | + return TRUE; |
|
| 278 | 278 | }else{ |
| 279 | 279 | $errors = array(); |
| 280 | 280 | foreach($this->_REQUIRED_DATA as $property){ |
| 281 | - if (isset($this->Data[$property]) || $this->Data[$property]!==null){ |
|
| 281 | + if (isset($this->Data[$property]) || $this->Data[$property]!==NULL){ |
|
| 282 | 282 | continue; |
| 283 | 283 | }else{ |
| 284 | 284 | $errors[] = $property; |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | if (count($errors)>0){ |
| 288 | 288 | throw new EntryPointException('EntryPoint requires specific properties in Request data. Missing the following '.implode($errors,",")); |
| 289 | 289 | }else{ |
| 290 | - return true; |
|
| 290 | + return TRUE; |
|
| 291 | 291 | } |
| 292 | 292 | } |
| 293 | 293 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * The directory in which to download the File |
| 13 | 13 | * @var string |
| 14 | 14 | */ |
| 15 | - protected $downloadDir = null; |
|
| 15 | + protected $downloadDir = NULL; |
|
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * @inheritdoc |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | |
| 7 | 7 | class Oauth2Token extends POSTEntryPoint { |
| 8 | 8 | |
| 9 | - protected $_AUTH_REQUIRED = false; |
|
| 9 | + protected $_AUTH_REQUIRED = FALSE; |
|
| 10 | 10 | protected $_URL = 'oauth2/token'; |
| 11 | 11 | protected $_REQUIRED_DATA = array( |
| 12 | 12 | 'username', |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | if ($response->getStatus()=='200'){ |
| 12 | 12 | $recordList = $response->getBody(); |
| 13 | 13 | $max=count($recordList->records); |
| 14 | - echo "Found $max records from Filter Records request. <br>"; |
|
| 14 | + echo "found $max records from Filter Records request. <br>"; |
|
| 15 | 15 | $number = rand(0,$max); |
| 16 | 16 | $randomRecord = $recordList->records[$number]; |
| 17 | 17 | echo "Choose random record #$number, with ID: ".$randomRecord->id." <br>"; |