@@ -161,7 +161,7 @@ |
||
| 161 | 161 | * |
| 162 | 162 | * @var Requests_Response $response |
| 163 | 163 | */ |
| 164 | - public function before_redirect_check(Requests_Response &$return) { |
|
| 164 | + public function before_redirect_check(Requests_Response & $return) { |
|
| 165 | 165 | $url = $return->url; |
| 166 | 166 | if (!$url instanceof Requests_IRI) { |
| 167 | 167 | $url = new Requests_IRI($url); |
@@ -29,5 +29,5 @@ |
||
| 29 | 29 | * @see Requests_Hooks::register |
| 30 | 30 | * @param Requests_Hooks $hooks Hook system |
| 31 | 31 | */ |
| 32 | - public function register(Requests_Hooks &$hooks); |
|
| 32 | + public function register(Requests_Hooks & $hooks); |
|
| 33 | 33 | } |
| 34 | 34 | \ No newline at end of file |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | * @see fsockopen_header |
| 54 | 54 | * @param Requests_Hooks $hooks Hook system |
| 55 | 55 | */ |
| 56 | - public function register(Requests_Hooks &$hooks) { |
|
| 56 | + public function register(Requests_Hooks & $hooks) { |
|
| 57 | 57 | $hooks->register('curl.before_send', array(&$this, 'curl_before_send')); |
| 58 | 58 | $hooks->register('fsockopen.after_headers', array(&$this, 'fsockopen_header')); |
| 59 | 59 | } |
@@ -33,9 +33,9 @@ discard block |
||
| 33 | 33 | ); |
| 34 | 34 | |
| 35 | 35 | $context['files'] = ''; |
| 36 | -$path = realpath(dirname(__FILE__).'/../library/Requests'); |
|
| 36 | +$path = realpath(dirname(__FILE__) . '/../library/Requests'); |
|
| 37 | 37 | foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::LEAVES_ONLY) as $file) { |
| 38 | - if (preg_match('/\.php$/', $file)) { |
|
| 38 | + if (preg_match('/\.php$/', $file)) { |
|
| 39 | 39 | $name = str_replace($path . DIRECTORY_SEPARATOR, '', $file); |
| 40 | 40 | $name = str_replace(DIRECTORY_SEPARATOR, '/', $name); |
| 41 | 41 | $context['files'][] = "\t\t\t\t\t" . '<file install-as="Requests/' . $name . '" name="' . $name . '" role="php" />'; |
@@ -44,9 +44,9 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | $context['files'] = implode("\n", $context['files']); |
| 46 | 46 | |
| 47 | -$template = file_get_contents(dirname(__FILE__).'/../package.xml.tpl'); |
|
| 47 | +$template = file_get_contents(dirname(__FILE__) . '/../package.xml.tpl'); |
|
| 48 | 48 | $content = preg_replace_callback('/\{\{\s*([a-zA-Z0-9_]+)\s*\}\}/', 'replace_parameters', $template); |
| 49 | -file_put_contents(dirname(__FILE__).'/../package.xml', $content); |
|
| 49 | +file_put_contents(dirname(__FILE__) . '/../package.xml', $content); |
|
| 50 | 50 | |
| 51 | 51 | function replace_parameters($matches) { |
| 52 | 52 | global $context; |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | * @see fsockopen_header |
| 54 | 54 | * @param Requests_Hooks $hooks Hook system |
| 55 | 55 | */ |
| 56 | - public function register(Requests_Hooks &$hooks) { |
|
| 56 | + public function register(Requests_Hooks & $hooks) { |
|
| 57 | 57 | $hooks->register('curl.before_send', array(&$this, 'curl_before_send')); |
| 58 | 58 | $hooks->register('fsockopen.after_headers', array(&$this, 'fsockopen_header')); |
| 59 | 59 | } |
@@ -29,5 +29,5 @@ |
||
| 29 | 29 | * @see Requests_Hooks::register |
| 30 | 30 | * @param Requests_Hooks $hooks Hook system |
| 31 | 31 | */ |
| 32 | - public function register(Requests_Hooks &$hooks); |
|
| 32 | + public function register(Requests_Hooks & $hooks); |
|
| 33 | 33 | } |
| 34 | 34 | \ No newline at end of file |
@@ -531,7 +531,7 @@ discard block |
||
| 531 | 531 | * @return string Default certificate path. |
| 532 | 532 | */ |
| 533 | 533 | public static function get_certificate_path() { |
| 534 | - if ( ! empty( Requests::$certificate_path ) ) { |
|
| 534 | + if (!empty(Requests::$certificate_path)) { |
|
| 535 | 535 | return Requests::$certificate_path; |
| 536 | 536 | } |
| 537 | 537 | |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | * |
| 544 | 544 | * @param string $path Certificate path, pointing to a PEM file. |
| 545 | 545 | */ |
| 546 | - public static function set_certificate_path( $path ) { |
|
| 546 | + public static function set_certificate_path($path) { |
|
| 547 | 547 | Requests::$certificate_path = $path; |
| 548 | 548 | } |
| 549 | 549 | |
@@ -310,7 +310,7 @@ |
||
| 310 | 310 | $options['hooks']->dispatch('curl.before_request', array(&$this->handle)); |
| 311 | 311 | |
| 312 | 312 | // Force closing the connection for old versions of cURL (<7.22). |
| 313 | - if ( ! isset( $headers['Connection'] ) ) { |
|
| 313 | + if (!isset($headers['Connection'])) { |
|
| 314 | 314 | $headers['Connection'] = 'close'; |
| 315 | 315 | } |
| 316 | 316 | |