@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | * @param array $options |
| 47 | 47 | * @return $this |
| 48 | 48 | */ |
| 49 | - public function setDefaults(array $options = array()){ |
|
| 49 | + public function setDefaults(array $options = array()) { |
|
| 50 | 50 | $this->defaultOptions = $options; |
| 51 | 51 | return $this; |
| 52 | 52 | } |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | 'method' => $method, |
| 69 | 69 | 'url' => $uri, |
| 70 | 70 | 'data' => $payload, |
| 71 | - ) + $options; |
|
| 71 | + )+$options; |
|
| 72 | 72 | $this->addOptions(array($options)); |
| 73 | 73 | return $this; |
| 74 | 74 | } |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | public function addOptions(array $URLOptions) |
| 82 | 82 | { |
| 83 | 83 | foreach ($URLOptions as $options) { |
| 84 | - $options = $options + $this->defaultOptions; |
|
| 84 | + $options = $options+$this->defaultOptions; |
|
| 85 | 85 | $request = Request::create()->addOptions($options)->applyOptions(); |
| 86 | 86 | if (isset($options['callback'])) { |
| 87 | 87 | $request->onEnd($options['callback']); |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | */ |
| 111 | 111 | public function sendAll() |
| 112 | 112 | { |
| 113 | - $sleepTime = 1000;//microsecond, prevent CPU 100% |
|
| 113 | + $sleepTime = 1000; //microsecond, prevent CPU 100% |
|
| 114 | 114 | do { |
| 115 | 115 | curl_multi_exec(self::$multiHandler, $active); |
| 116 | 116 | // bug in PHP 5.3.18+ where curl_multi_select can return -1 |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | usleep($sleepTime); |
| 120 | 120 | } |
| 121 | 121 | usleep($sleepTime); |
| 122 | - } while ($active); |
|
| 122 | + }while ($active); |
|
| 123 | 123 | $return = array(); |
| 124 | 124 | foreach (self::$requestPool as $request) { |
| 125 | 125 | $return[] = $request->send(true); |