Completed
Push — feature/249-318-add-content-he... ( 69575e )
by Juliette
01:23
created
bin/create_pear_package.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
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" />';
Please login to merge, or discard this patch.
library/Requests.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
library/Requests/Transport/cURL.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -310,7 +310,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
library/Requests/Transport/fsockopen.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@
 block discarded – undo
171 171
 		if (!isset($case_insensitive_headers['Host'])) {
172 172
 			$out .= sprintf('Host: %s', $url_parts['host']);
173 173
 
174
-			if (( 'http' === strtolower($url_parts['scheme']) && $url_parts['port'] !== 80 ) || ( 'https' === strtolower($url_parts['scheme']) && $url_parts['port'] !== 443 )) {
174
+			if (('http' === strtolower($url_parts['scheme']) && $url_parts['port'] !== 80) || ('https' === strtolower($url_parts['scheme']) && $url_parts['port'] !== 443)) {
175 175
 				$out .= ':' . $url_parts['port'];
176 176
 			}
177 177
 			$out .= "\r\n";
Please login to merge, or discard this patch.