@@ -63,11 +63,11 @@ discard block |
||
63 | 63 | * |
64 | 64 | * @return bool true |
65 | 65 | */ |
66 | - public function copy($origin, $fileUrl, $fileName, $progress=true, $options=array()) |
|
66 | + public function copy($origin, $fileUrl, $fileName, $progress = true, $options = array()) |
|
67 | 67 | { |
68 | 68 | $that = $this; // for PHP5.3 |
69 | 69 | |
70 | - return $this->fetch($origin, $fileUrl, $progress, $options, function ($ch, $request) use ($that, $fileName) { |
|
70 | + return $this->fetch($origin, $fileUrl, $progress, $options, function($ch, $request) use ($that, $fileName) { |
|
71 | 71 | $fp = $that->createFile($fileName); |
72 | 72 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, false); |
73 | 73 | curl_setopt($ch, CURLOPT_FILE, $fp); |
@@ -95,11 +95,11 @@ discard block |
||
95 | 95 | * |
96 | 96 | * @return bool|string The content |
97 | 97 | */ |
98 | - public function getContents($origin, $fileUrl, $progress=true, $options=array()) |
|
98 | + public function getContents($origin, $fileUrl, $progress = true, $options = array()) |
|
99 | 99 | { |
100 | 100 | $that = $this; // for PHP5.3 |
101 | 101 | |
102 | - return $this->fetch($origin, $fileUrl, $progress, $options, function ($ch, $request) use ($that) { |
|
102 | + return $this->fetch($origin, $fileUrl, $progress, $options, function($ch, $request) use ($that) { |
|
103 | 103 | // This order is important. |
104 | 104 | curl_setopt($ch, CURLOPT_FILE, STDOUT); |
105 | 105 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | if ($this->pluginConfig['insecure']) { |
158 | 158 | $opts[CURLOPT_VERIFYPEER] = false; |
159 | 159 | } |
160 | - if (! empty($pluginConfig['capath'])) { |
|
160 | + if (!empty($pluginConfig['capath'])) { |
|
161 | 161 | $opts[CURLOPT_CAPATH] = $pluginConfig['capath']; |
162 | 162 | } |
163 | 163 |
@@ -104,7 +104,7 @@ |
||
104 | 104 | if ($pluginConfig['insecure']) { |
105 | 105 | $opts[CURLOPT_VERIFYPEER] = false; |
106 | 106 | } |
107 | - if (! empty($pluginConfig['capath'])) { |
|
107 | + if (!empty($pluginConfig['capath'])) { |
|
108 | 108 | $opts[CURLOPT_CAPATH] = $pluginConfig['capath']; |
109 | 109 | } |
110 | 110 | unset($opts[CURLOPT_ENCODING]); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | } |
108 | 108 | |
109 | 109 | $config = $this->config->get('prestissimo'); |
110 | - if (! is_array($config)) { |
|
110 | + if (!is_array($config)) { |
|
111 | 111 | $config = array(); |
112 | 112 | } |
113 | 113 | $config += array( |
@@ -120,22 +120,22 @@ discard block |
||
120 | 120 | 'privatePackages' => array(), |
121 | 121 | ); |
122 | 122 | |
123 | - if (! is_int($config['maxConnections']) || $config['maxConnections'] < 1) { |
|
123 | + if (!is_int($config['maxConnections']) || $config['maxConnections'] < 1) { |
|
124 | 124 | $config['maxConnections'] = 6; |
125 | 125 | } |
126 | - if (! is_int($config['minConnections']) || $config['minConnections'] > $config['maxConnections']) { |
|
126 | + if (!is_int($config['minConnections']) || $config['minConnections'] > $config['maxConnections']) { |
|
127 | 127 | $config['minConnections'] = 3; |
128 | 128 | } |
129 | - if (! is_bool($config['pipeline'])) { |
|
129 | + if (!is_bool($config['pipeline'])) { |
|
130 | 130 | $config['pipeline'] = (bool)$config['pipeline']; |
131 | 131 | } |
132 | - if (! is_bool($config['insecure'])) { |
|
132 | + if (!is_bool($config['insecure'])) { |
|
133 | 133 | $config['insecure'] = (bool)$config['insecure']; |
134 | 134 | } |
135 | - if (! is_string($config['capath'])) { |
|
135 | + if (!is_string($config['capath'])) { |
|
136 | 136 | $config['capath'] = ''; |
137 | 137 | } |
138 | - if (! is_array($config['privatePackages'])) { |
|
138 | + if (!is_array($config['privatePackages'])) { |
|
139 | 139 | $config['privatePackages'] = (array)$config['privatePackages']; |
140 | 140 | } |
141 | 141 |