@@ -357,7 +357,7 @@ |
||
| 357 | 357 | * @param int $delta |
| 358 | 358 | * @param int $numpoints |
| 359 | 359 | * @param bool $firsttime |
| 360 | - * @return int New bias |
|
| 360 | + * @return double New bias |
|
| 361 | 361 | */ |
| 362 | 362 | protected static function adapt($delta, $numpoints, $firsttime) { |
| 363 | 363 | # function adapt(delta,numpoints,firsttime): |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | * |
| 250 | 250 | * Returns false if $base is not absolute, otherwise an IRI. |
| 251 | 251 | * |
| 252 | - * @param IRI|string $base (Absolute) Base IRI |
|
| 252 | + * @param string $base (Absolute) Base IRI |
|
| 253 | 253 | * @param IRI|string $relative Relative IRI |
| 254 | 254 | * @return IRI|false |
| 255 | 255 | */ |
@@ -987,6 +987,7 @@ discard block |
||
| 987 | 987 | * Convert an IRI to a URI (or parts thereof) |
| 988 | 988 | * |
| 989 | 989 | * @param string|bool IRI to convert (or false from {@see get_iri}) |
| 990 | + * @param false|string $string |
|
| 990 | 991 | * @return string|false URI if IRI is valid, false otherwise. |
| 991 | 992 | */ |
| 992 | 993 | protected function to_uri($string) { |
@@ -232,7 +232,7 @@ |
||
| 232 | 232 | * |
| 233 | 233 | * @param array $request Request data (same form as {@see request_multiple}) |
| 234 | 234 | * @param boolean $merge_options Should we merge options as well? |
| 235 | - * @return array Request data |
|
| 235 | + * @return string Request data |
|
| 236 | 236 | */ |
| 237 | 237 | protected function merge_request($request, $merge_options = true) { |
| 238 | 238 | if ($this->url !== null) { |
@@ -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; |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | $context['files'] = ''; |
| 36 | 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" />'; |
@@ -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 |