@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * @param string|Requests_Cookie $cookie |
36 | 36 | * @return Requests_Cookie |
37 | 37 | */ |
38 | - public function normalize_cookie($cookie, $key = null) { |
|
38 | + public function normalize_cookie($cookie, $key = NULL) { |
|
39 | 39 | if ($cookie instanceof Requests_Cookie) { |
40 | 40 | return $cookie; |
41 | 41 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * @deprecated Use {@see Requests_Cookie_Jar::normalize_cookie} |
51 | 51 | * @return Requests_Cookie |
52 | 52 | */ |
53 | - public function normalizeCookie($cookie, $key = null) { |
|
53 | + public function normalizeCookie($cookie, $key = NULL) { |
|
54 | 54 | return $this->normalize_cookie($cookie, $key); |
55 | 55 | } |
56 | 56 | |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | public function offsetGet($key) { |
74 | 74 | if (!isset($this->cookies[$key])) { |
75 | - return null; |
|
75 | + return NULL; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | return $this->cookies[$key]; |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | * @param string $value Item value |
88 | 88 | */ |
89 | 89 | public function offsetSet($key, $value) { |
90 | - if ($key === null) { |
|
90 | + if ($key === NULL) { |
|
91 | 91 | throw new Requests_Exception('Object is a dictionary, not a list', 'invalidset'); |
92 | 92 | } |
93 | 93 |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | * @throws Requests_Exception On incorrect number of arguments (`authbasicbadargs`) |
55 | 55 | * @param array|null $args Array of user and password. Must have exactly two elements |
56 | 56 | */ |
57 | - public function __construct($args = null) { |
|
57 | + public function __construct($args = NULL) { |
|
58 | 58 | if (is_string($args)) { |
59 | 59 | $this->proxy = $args; |
60 | 60 | } |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | } |
65 | 65 | elseif (count($args) == 3) { |
66 | 66 | list($this->proxy, $this->user, $this->pass) = $args; |
67 | - $this->use_authentication = true; |
|
67 | + $this->use_authentication = TRUE; |
|
68 | 68 | } |
69 | 69 | else { |
70 | 70 | throw new Requests_Exception('Invalid number of arguments', 'proxyhttpbadargs'); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * |
64 | 64 | * @var boolean |
65 | 65 | */ |
66 | - protected $done_headers = false; |
|
66 | + protected $done_headers = FALSE; |
|
67 | 67 | |
68 | 68 | /** |
69 | 69 | * If streaming to a file, keep the file pointer |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | $this->version = $curl['version_number']; |
95 | 95 | $this->handle = curl_init(); |
96 | 96 | |
97 | - curl_setopt($this->handle, CURLOPT_HEADER, false); |
|
97 | + curl_setopt($this->handle, CURLOPT_HEADER, FALSE); |
|
98 | 98 | curl_setopt($this->handle, CURLOPT_RETURNTRANSFER, 1); |
99 | 99 | if ($this->version >= self::CURL_7_10_5) { |
100 | 100 | curl_setopt($this->handle, CURLOPT_ENCODING, ''); |
@@ -134,19 +134,19 @@ discard block |
||
134 | 134 | |
135 | 135 | $options['hooks']->dispatch('curl.before_send', array(&$this->handle)); |
136 | 136 | |
137 | - if ($options['filename'] !== false) { |
|
137 | + if ($options['filename'] !== FALSE) { |
|
138 | 138 | $this->stream_handle = fopen($options['filename'], 'wb'); |
139 | 139 | } |
140 | 140 | |
141 | 141 | $this->response_data = ''; |
142 | 142 | $this->response_bytes = 0; |
143 | - $this->response_byte_limit = false; |
|
144 | - if ($options['max_bytes'] !== false) { |
|
143 | + $this->response_byte_limit = FALSE; |
|
144 | + if ($options['max_bytes'] !== FALSE) { |
|
145 | 145 | $this->response_byte_limit = $options['max_bytes']; |
146 | 146 | } |
147 | 147 | |
148 | 148 | if (isset($options['verify'])) { |
149 | - if ($options['verify'] === false) { |
|
149 | + if ($options['verify'] === FALSE) { |
|
150 | 150 | curl_setopt($this->handle, CURLOPT_SSL_VERIFYHOST, 0); |
151 | 151 | curl_setopt($this->handle, CURLOPT_SSL_VERIFYPEER, 0); |
152 | 152 | } |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | } |
156 | 156 | } |
157 | 157 | |
158 | - if (isset($options['verifyname']) && $options['verifyname'] === false) { |
|
158 | + if (isset($options['verifyname']) && $options['verifyname'] === FALSE) { |
|
159 | 159 | curl_setopt($this->handle, CURLOPT_SSL_VERIFYHOST, 0); |
160 | 160 | } |
161 | 161 | |
@@ -178,8 +178,8 @@ discard block |
||
178 | 178 | |
179 | 179 | // Need to remove the $this reference from the curl handle. |
180 | 180 | // Otherwise Requests_Transport_cURL wont be garbage collected and the curl_close() will never be called. |
181 | - curl_setopt($this->handle, CURLOPT_HEADERFUNCTION, null); |
|
182 | - curl_setopt($this->handle, CURLOPT_WRITEFUNCTION, null); |
|
181 | + curl_setopt($this->handle, CURLOPT_HEADERFUNCTION, NULL); |
|
182 | + curl_setopt($this->handle, CURLOPT_WRITEFUNCTION, NULL); |
|
183 | 183 | |
184 | 184 | return $this->headers; |
185 | 185 | } |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $request['options']['hooks']->dispatch('curl.before_multi_exec', array(&$multihandle)); |
216 | 216 | |
217 | 217 | do { |
218 | - $active = false; |
|
218 | + $active = FALSE; |
|
219 | 219 | |
220 | 220 | do { |
221 | 221 | $status = curl_multi_exec($multihandle, $active); |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | |
227 | 227 | // Read the information as needed |
228 | 228 | while ($done = curl_multi_info_read($multihandle)) { |
229 | - $key = array_search($done['handle'], $subhandles, true); |
|
229 | + $key = array_search($done['handle'], $subhandles, TRUE); |
|
230 | 230 | if (!isset($to_process[$key])) { |
231 | 231 | $to_process[$key] = $done; |
232 | 232 | } |
@@ -283,14 +283,14 @@ discard block |
||
283 | 283 | public function &get_subrequest_handle($url, $headers, $data, $options) { |
284 | 284 | $this->setup_handle($url, $headers, $data, $options); |
285 | 285 | |
286 | - if ($options['filename'] !== false) { |
|
286 | + if ($options['filename'] !== FALSE) { |
|
287 | 287 | $this->stream_handle = fopen($options['filename'], 'wb'); |
288 | 288 | } |
289 | 289 | |
290 | 290 | $this->response_data = ''; |
291 | 291 | $this->response_bytes = 0; |
292 | - $this->response_byte_limit = false; |
|
293 | - if ($options['max_bytes'] !== false) { |
|
292 | + $this->response_byte_limit = FALSE; |
|
293 | + if ($options['max_bytes'] !== FALSE) { |
|
294 | 294 | $this->response_byte_limit = $options['max_bytes']; |
295 | 295 | } |
296 | 296 | $this->hooks = $options['hooks']; |
@@ -324,18 +324,18 @@ discard block |
||
324 | 324 | $data = ''; |
325 | 325 | } |
326 | 326 | elseif (!is_string($data)) { |
327 | - $data = http_build_query($data, null, '&'); |
|
327 | + $data = http_build_query($data, NULL, '&'); |
|
328 | 328 | } |
329 | 329 | } |
330 | 330 | |
331 | 331 | switch ($options['type']) { |
332 | 332 | case Requests::POST: |
333 | - curl_setopt($this->handle, CURLOPT_POST, true); |
|
333 | + curl_setopt($this->handle, CURLOPT_POST, TRUE); |
|
334 | 334 | curl_setopt($this->handle, CURLOPT_POSTFIELDS, $data); |
335 | 335 | break; |
336 | 336 | case Requests::HEAD: |
337 | 337 | curl_setopt($this->handle, CURLOPT_CUSTOMREQUEST, $options['type']); |
338 | - curl_setopt($this->handle, CURLOPT_NOBODY, true); |
|
338 | + curl_setopt($this->handle, CURLOPT_NOBODY, TRUE); |
|
339 | 339 | break; |
340 | 340 | case Requests::TRACE: |
341 | 341 | curl_setopt($this->handle, CURLOPT_CUSTOMREQUEST, $options['type']); |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | curl_setopt($this->handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); |
386 | 386 | } |
387 | 387 | |
388 | - if (true === $options['blocking']) { |
|
388 | + if (TRUE === $options['blocking']) { |
|
389 | 389 | curl_setopt($this->handle, CURLOPT_HEADERFUNCTION, array(&$this, 'stream_headers')); |
390 | 390 | curl_setopt($this->handle, CURLOPT_WRITEFUNCTION, array(&$this, 'stream_body')); |
391 | 391 | curl_setopt($this->handle, CURLOPT_BUFFERSIZE, Requests::BUFFER_SIZE); |
@@ -400,12 +400,12 @@ discard block |
||
400 | 400 | * @return string HTTP response data including headers |
401 | 401 | */ |
402 | 402 | public function process_response($response, $options) { |
403 | - if ($options['blocking'] === false) { |
|
403 | + if ($options['blocking'] === FALSE) { |
|
404 | 404 | $fake_headers = ''; |
405 | 405 | $options['hooks']->dispatch('curl.after_request', array(&$fake_headers)); |
406 | - return false; |
|
406 | + return FALSE; |
|
407 | 407 | } |
408 | - if ($options['filename'] !== false) { |
|
408 | + if ($options['filename'] !== FALSE) { |
|
409 | 409 | fclose($this->stream_handle); |
410 | 410 | $this->headers = trim($this->headers); |
411 | 411 | } |
@@ -440,12 +440,12 @@ discard block |
||
440 | 440 | // (We may want to keep this somewhere just in case) |
441 | 441 | if ($this->done_headers) { |
442 | 442 | $this->headers = ''; |
443 | - $this->done_headers = false; |
|
443 | + $this->done_headers = FALSE; |
|
444 | 444 | } |
445 | 445 | $this->headers .= $headers; |
446 | 446 | |
447 | 447 | if ($headers === "\r\n") { |
448 | - $this->done_headers = true; |
|
448 | + $this->done_headers = TRUE; |
|
449 | 449 | } |
450 | 450 | return strlen($headers); |
451 | 451 | } |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | $query = $url_parts['query']; |
506 | 506 | } |
507 | 507 | |
508 | - $query .= '&' . http_build_query($data, null, '&'); |
|
508 | + $query .= '&' . http_build_query($data, NULL, '&'); |
|
509 | 509 | $query = trim($query, '&'); |
510 | 510 | |
511 | 511 | if (empty($url_parts['query'])) { |
@@ -526,17 +526,17 @@ discard block |
||
526 | 526 | */ |
527 | 527 | public static function test($capabilities = array()) { |
528 | 528 | if (!function_exists('curl_init') || !function_exists('curl_exec')) { |
529 | - return false; |
|
529 | + return FALSE; |
|
530 | 530 | } |
531 | 531 | |
532 | 532 | // If needed, check that our installed curl version supports SSL |
533 | 533 | if (isset($capabilities['ssl']) && $capabilities['ssl']) { |
534 | 534 | $curl_version = curl_version(); |
535 | 535 | if (!(CURL_VERSION_SSL & $curl_version['features'])) { |
536 | - return false; |
|
536 | + return FALSE; |
|
537 | 537 | } |
538 | 538 | } |
539 | 539 | |
540 | - return true; |
|
540 | + return TRUE; |
|
541 | 541 | } |
542 | 542 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | * |
40 | 40 | * @var int|bool Byte count, or false if no limit. |
41 | 41 | */ |
42 | - protected $max_bytes = false; |
|
42 | + protected $max_bytes = FALSE; |
|
43 | 43 | |
44 | 44 | protected $connect_error = ''; |
45 | 45 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | } |
65 | 65 | $host = $url_parts['host']; |
66 | 66 | $context = stream_context_create(); |
67 | - $verifyname = false; |
|
67 | + $verifyname = FALSE; |
|
68 | 68 | $case_insensitive_headers = new Requests_Utility_CaseInsensitiveDictionary($headers); |
69 | 69 | |
70 | 70 | // HTTPS support |
@@ -75,32 +75,32 @@ discard block |
||
75 | 75 | } |
76 | 76 | |
77 | 77 | $context_options = array( |
78 | - 'verify_peer' => true, |
|
78 | + 'verify_peer' => TRUE, |
|
79 | 79 | // 'CN_match' => $host, |
80 | - 'capture_peer_cert' => true |
|
80 | + 'capture_peer_cert' => TRUE |
|
81 | 81 | ); |
82 | - $verifyname = true; |
|
82 | + $verifyname = TRUE; |
|
83 | 83 | |
84 | 84 | // SNI, if enabled (OpenSSL >=0.9.8j) |
85 | 85 | if (defined('OPENSSL_TLSEXT_SERVER_NAME') && OPENSSL_TLSEXT_SERVER_NAME) { |
86 | - $context_options['SNI_enabled'] = true; |
|
87 | - if (isset($options['verifyname']) && $options['verifyname'] === false) { |
|
88 | - $context_options['SNI_enabled'] = false; |
|
86 | + $context_options['SNI_enabled'] = TRUE; |
|
87 | + if (isset($options['verifyname']) && $options['verifyname'] === FALSE) { |
|
88 | + $context_options['SNI_enabled'] = FALSE; |
|
89 | 89 | } |
90 | 90 | } |
91 | 91 | |
92 | 92 | if (isset($options['verify'])) { |
93 | - if ($options['verify'] === false) { |
|
94 | - $context_options['verify_peer'] = false; |
|
93 | + if ($options['verify'] === FALSE) { |
|
94 | + $context_options['verify_peer'] = FALSE; |
|
95 | 95 | } |
96 | 96 | elseif (is_string($options['verify'])) { |
97 | 97 | $context_options['cafile'] = $options['verify']; |
98 | 98 | } |
99 | 99 | } |
100 | 100 | |
101 | - if (isset($options['verifyname']) && $options['verifyname'] === false) { |
|
102 | - $context_options['verify_peer_name'] = false; |
|
103 | - $verifyname = false; |
|
101 | + if (isset($options['verifyname']) && $options['verifyname'] === FALSE) { |
|
102 | + $context_options['verify_peer_name'] = FALSE; |
|
103 | + $verifyname = FALSE; |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | stream_context_set_option($context, array('ssl' => $context_options)); |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | throw new Requests_Exception(rtrim($this->connect_error), 'fsockopen.connect_error'); |
135 | 135 | } |
136 | 136 | |
137 | - throw new Requests_Exception($errstr, 'fsockopenerror', null, $errno); |
|
137 | + throw new Requests_Exception($errstr, 'fsockopenerror', NULL, $errno); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | $data_format = $options['data_format']; |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | |
155 | 155 | if ($options['type'] !== Requests::TRACE) { |
156 | 156 | if (is_array($data)) { |
157 | - $request_body = http_build_query($data, null, '&'); |
|
157 | + $request_body = http_build_query($data, NULL, '&'); |
|
158 | 158 | } |
159 | 159 | else { |
160 | 160 | $request_body = $data; |
@@ -231,8 +231,8 @@ discard block |
||
231 | 231 | $response = $body = $headers = ''; |
232 | 232 | $this->info = stream_get_meta_data($socket); |
233 | 233 | $size = 0; |
234 | - $doingbody = false; |
|
235 | - $download = false; |
|
234 | + $doingbody = FALSE; |
|
235 | + $download = FALSE; |
|
236 | 236 | if ($options['filename']) { |
237 | 237 | $download = fopen($options['filename'], 'wb'); |
238 | 238 | } |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | $response .= $block; |
249 | 249 | if (strpos($response, "\r\n\r\n")) { |
250 | 250 | list($headers, $block) = explode("\r\n\r\n", $response, 2); |
251 | - $doingbody = true; |
|
251 | + $doingbody = TRUE; |
|
252 | 252 | } |
253 | 253 | } |
254 | 254 | |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | $url_parts['query'] = ''; |
354 | 354 | } |
355 | 355 | |
356 | - $url_parts['query'] .= '&' . http_build_query($data, null, '&'); |
|
356 | + $url_parts['query'] .= '&' . http_build_query($data, NULL, '&'); |
|
357 | 357 | $url_parts['query'] = trim($url_parts['query'], '&'); |
358 | 358 | } |
359 | 359 | if (isset($url_parts['path'])) { |
@@ -380,11 +380,11 @@ discard block |
||
380 | 380 | // Double-check we can handle it |
381 | 381 | if (($errno & E_WARNING) === 0 && ($errno & E_NOTICE) === 0) { |
382 | 382 | // Return false to indicate the default error handler should engage |
383 | - return false; |
|
383 | + return FALSE; |
|
384 | 384 | } |
385 | 385 | |
386 | 386 | $this->connect_error .= $errstr . "\n"; |
387 | - return true; |
|
387 | + return TRUE; |
|
388 | 388 | } |
389 | 389 | |
390 | 390 | /** |
@@ -424,21 +424,21 @@ discard block |
||
424 | 424 | */ |
425 | 425 | public static function test($capabilities = array()) { |
426 | 426 | if (!function_exists('fsockopen')) { |
427 | - return false; |
|
427 | + return FALSE; |
|
428 | 428 | } |
429 | 429 | |
430 | 430 | // If needed, check that streams support SSL |
431 | 431 | if (isset($capabilities['ssl']) && $capabilities['ssl']) { |
432 | 432 | if (!extension_loaded('openssl') || !function_exists('openssl_x509_parse')) { |
433 | - return false; |
|
433 | + return FALSE; |
|
434 | 434 | } |
435 | 435 | |
436 | 436 | // Currently broken, thanks to https://github.com/facebook/hhvm/issues/2156 |
437 | 437 | if (defined('HHVM_VERSION')) { |
438 | - return false; |
|
438 | + return FALSE; |
|
439 | 439 | } |
440 | 440 | } |
441 | 441 | |
442 | - return true; |
|
442 | + return TRUE; |
|
443 | 443 | } |
444 | 444 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * URLs will be made absolute using this as the base |
25 | 25 | * @var string|null |
26 | 26 | */ |
27 | - public $url = null; |
|
27 | + public $url = NULL; |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * Base headers for requests |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * @param array $data Default data for requests |
64 | 64 | * @param array $options Default options for requests |
65 | 65 | */ |
66 | - public function __construct($url = null, $headers = array(), $data = array(), $options = array()) { |
|
66 | + public function __construct($url = NULL, $headers = array(), $data = array(), $options = array()) { |
|
67 | 67 | $this->url = $url; |
68 | 68 | $this->headers = $headers; |
69 | 69 | $this->data = $data; |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | return $this->options[$key]; |
86 | 86 | } |
87 | 87 | |
88 | - return null; |
|
88 | + return NULL; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | /** |
@@ -129,21 +129,21 @@ discard block |
||
129 | 129 | * Send a GET request |
130 | 130 | */ |
131 | 131 | public function get($url, $headers = array(), $options = array()) { |
132 | - return $this->request($url, $headers, null, Requests::GET, $options); |
|
132 | + return $this->request($url, $headers, NULL, Requests::GET, $options); |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | /** |
136 | 136 | * Send a HEAD request |
137 | 137 | */ |
138 | 138 | public function head($url, $headers = array(), $options = array()) { |
139 | - return $this->request($url, $headers, null, Requests::HEAD, $options); |
|
139 | + return $this->request($url, $headers, NULL, Requests::HEAD, $options); |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | /** |
143 | 143 | * Send a DELETE request |
144 | 144 | */ |
145 | 145 | public function delete($url, $headers = array(), $options = array()) { |
146 | - return $this->request($url, $headers, null, Requests::DELETE, $options); |
|
146 | + return $this->request($url, $headers, NULL, Requests::DELETE, $options); |
|
147 | 147 | } |
148 | 148 | /**#@-*/ |
149 | 149 | |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | */ |
217 | 217 | public function request_multiple($requests, $options = array()) { |
218 | 218 | foreach ($requests as $key => $request) { |
219 | - $requests[$key] = $this->merge_request($request, false); |
|
219 | + $requests[$key] = $this->merge_request($request, FALSE); |
|
220 | 220 | } |
221 | 221 | |
222 | 222 | $options = array_merge($this->options, $options); |
@@ -234,8 +234,8 @@ discard block |
||
234 | 234 | * @param boolean $merge_options Should we merge options as well? |
235 | 235 | * @return array Request data |
236 | 236 | */ |
237 | - protected function merge_request($request, $merge_options = true) { |
|
238 | - if ($this->url !== null) { |
|
237 | + protected function merge_request($request, $merge_options = TRUE) { |
|
238 | + if ($this->url !== NULL) { |
|
239 | 239 | $request['url'] = Requests_IRI::absolutize($this->url, $request['url']); |
240 | 240 | $request['url'] = $request['url']->uri; |
241 | 241 | } |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | $request['data'] = array_merge($this->data, $request['data']); |
255 | 255 | } |
256 | 256 | |
257 | - if ($merge_options !== false) { |
|
257 | + if ($merge_options !== FALSE) { |
|
258 | 258 | $request['options'] = array_merge($this->options, $request['options']); |
259 | 259 | |
260 | 260 | // Disallow forcing the type, as that's a per request setting |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | public function offsetGet($key) { |
52 | 52 | $key = strtolower($key); |
53 | 53 | if (!isset($this->data[$key])) { |
54 | - return null; |
|
54 | + return NULL; |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | return $this->data[$key]; |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | * @param string $value Item value |
67 | 67 | */ |
68 | 68 | public function offsetSet($key, $value) { |
69 | - if ($key === null) { |
|
69 | + if ($key === NULL) { |
|
70 | 70 | throw new Requests_Exception('Object is a dictionary, not a list', 'invalidset'); |
71 | 71 | } |
72 | 72 |
@@ -29,16 +29,16 @@ |
||
29 | 29 | */ |
30 | 30 | protected $reason = 'Unknown'; |
31 | 31 | |
32 | - public function __construct($message, $type, $data = null, $code = 0) { |
|
33 | - if ($type !== null) { |
|
32 | + public function __construct($message, $type, $data = NULL, $code = 0) { |
|
33 | + if ($type !== NULL) { |
|
34 | 34 | $this->type = $type; |
35 | 35 | } |
36 | 36 | |
37 | - if ($code !== null) { |
|
37 | + if ($code !== NULL) { |
|
38 | 38 | $this->code = $code; |
39 | 39 | } |
40 | 40 | |
41 | - if ($message !== null) { |
|
41 | + if ($message !== NULL) { |
|
42 | 42 | $this->reason = $message; |
43 | 43 | } |
44 | 44 |
@@ -34,8 +34,8 @@ |
||
34 | 34 | * @param string|null $reason Reason phrase |
35 | 35 | * @param mixed $data Associated data |
36 | 36 | */ |
37 | - public function __construct($reason = null, $data = null) { |
|
38 | - if ($reason !== null) { |
|
37 | + public function __construct($reason = NULL, $data = NULL) { |
|
38 | + if ($reason !== NULL) { |
|
39 | 39 | $this->reason = $reason; |
40 | 40 | } |
41 | 41 |
@@ -34,7 +34,7 @@ |
||
34 | 34 | * @param string|null $reason Reason phrase |
35 | 35 | * @param mixed $data Associated data |
36 | 36 | */ |
37 | - public function __construct($reason = null, $data = null) { |
|
37 | + public function __construct($reason = NULL, $data = NULL) { |
|
38 | 38 | if ($data instanceof Requests_Response) { |
39 | 39 | $this->code = $data->status_code; |
40 | 40 | } |