]> granicus.if.org Git - php/commitdiff
Merge remote-tracking branch 'github/pr/3345'
authorStanislav Malyshev <stas@php.net>
Mon, 3 Dec 2018 00:00:44 +0000 (16:00 -0800)
committerStanislav Malyshev <stas@php.net>
Mon, 3 Dec 2018 00:00:44 +0000 (16:00 -0800)
* github/pr/3345:
  Update Coding style

1  2 
run-tests.php

diff --cc run-tests.php
index 46fabbb5777e4b5b5811e48baea33f1b5b120036,4ec7cf520084951a07340ad00b7c62924c8cf372..863a51889067c8332345b3bddad67e9da5b84733
mode 100755,100644..100755
@@@ -240,33 -240,32 +240,33 @@@ if (getenv('TEST_PHP_USER')) 
  
  $exts_to_test = array();
  $ini_overwrites = array(
-               'output_handler=',
-               'open_basedir=',
-               'disable_functions=',
-               'output_buffering=Off',
-               'error_reporting=' . (E_ALL | E_STRICT),
-               'display_errors=1',
-               'display_startup_errors=1',
-               'log_errors=0',
-               'html_errors=0',
-               'track_errors=0',
-               'report_memleaks=1',
-               'report_zend_debug=0',
-               'docref_root=',
-               'docref_ext=.html',
-               'error_prepend_string=',
-               'error_append_string=',
-               'auto_prepend_file=',
-               'auto_append_file=',
-               'ignore_repeated_errors=0',
-               'precision=14',
-               'memory_limit=128M',
-               'log_errors_max_len=0',
-               'opcache.fast_shutdown=0',
-               'opcache.file_update_protection=0',
-               'opcache.preload=',
-               'zend.assertions=1',
-       );
+       'output_handler=',
+       'open_basedir=',
+       'disable_functions=',
+       'output_buffering=Off',
+       'error_reporting=' . (E_ALL | E_STRICT),
+       'display_errors=1',
+       'display_startup_errors=1',
+       'log_errors=0',
+       'html_errors=0',
+       'track_errors=0',
+       'report_memleaks=1',
+       'report_zend_debug=0',
+       'docref_root=',
+       'docref_ext=.html',
+       'error_prepend_string=',
+       'error_append_string=',
+       'auto_prepend_file=',
+       'auto_append_file=',
+       'ignore_repeated_errors=0',
+       'precision=14',
+       'memory_limit=128M',
+       'log_errors_max_len=0',
+       'opcache.fast_shutdown=0',
+       'opcache.file_update_protection=0',
++      'opcache.preload=',
+       'zend.assertions=1',
+ );
  
  $no_file_cache = '-d opcache.file_cache= -d opcache.file_cache_only=0';
  
@@@ -895,9 -893,9 +894,9 @@@ $exts_skipped = 0
  $ignored_by_ext = 0;
  sort($exts_to_test);
  $test_dirs = array();
 -$optionals = array('tests', 'ext', 'Zend', 'sapi');
 +$optionals = array('tests', 'ext', 'Zend');
  
- foreach($optionals as $dir) {
+ foreach ($optionals as $dir) {
        if (is_dir($dir)) {
                $test_dirs[] = $dir;
        }
@@@ -1029,9 -1026,9 +1027,9 @@@ function mail_qa_team($data, $status = 
  {
        $url_bits = parse_url(QA_SUBMISSION_PAGE);
  
 -      if (($proxy = getenv('http_proxy'))) {
 +      if ($proxy = getenv('http_proxy')) {
                $proxy = parse_url($proxy);
-               $path = $url_bits['host'].$url_bits['path'];
+               $path = $url_bits['host'] . $url_bits['path'];
                $host = $proxy['host'];
                if (empty($proxy['port'])) {
                        $proxy['port'] = 80;
@@@ -1449,10 -1446,9 +1447,10 @@@ TEST $fil
        }
  
        /* For phpdbg tests, check if phpdbg sapi is available and if it is, use it. */
 +      $extra_options = '';
        if (array_key_exists('PHPDBG', $section_text)) {
                if (!isset($section_text['STDIN'])) {
-                       $section_text['STDIN'] = $section_text['PHPDBG']."\n";
+                       $section_text['STDIN'] = $section_text['PHPDBG'] . "\n";
                }
  
                if (isset($phpdbg)) {
                $ext_params = array();
                settings2array($ini_overwrites, $ext_params);
                settings2params($ext_params);
-               $ext_dir=`$php $pass_options $extra_options $ext_params -d display_errors=0 -r "echo ini_get('extension_dir');"`;
 -              $ext_dir = `$php $pass_options $ext_params -d display_errors=0 -r "echo ini_get('extension_dir');"`;
++              $ext_dir = `$php $pass_options $extra_options $ext_params -d display_errors=0 -r "echo ini_get('extension_dir');"`;
                $extensions = preg_split("/[\n\r]+/", trim($section_text['EXTENSIONS']));
 -              $loaded = explode(",", `$php $pass_options $ext_params -d display_errors=0 -r "echo implode(',', get_loaded_extensions());"`);
 +              $loaded = explode(",", `$php $pass_options $extra_options $ext_params -d display_errors=0 -r "echo implode(',', get_loaded_extensions());"`);
                $ext_prefix = substr(PHP_OS, 0, 3) === "WIN" ? "php_" : "";
                foreach ($extensions as $req_ext) {
                        if (!in_array($req_ext, $loaded)) {
@@@ -1938,9 -1930,9 +1936,9 @@@ COMMAND $cm
  
        junit_start_timer($shortname);
        $hrtime = hrtime();
-       $startTime = $hrtime[0]*1000000000 + $hrtime[1];
+       $startTime = $hrtime[0] * 1000000000 + $hrtime[1];
  
 -      $out = system_with_timeout($cmd, $env, isset($section_text['STDIN']) ? $section_text['STDIN'] : null, $captureStdIn, $captureStdOut, $captureStdErr);
 +      $out = system_with_timeout($cmd, $env, $section_text['STDIN'] ?? null, $captureStdIn, $captureStdOut, $captureStdErr);
  
        junit_finish_timer($shortname);
        $hrtime = hrtime();
                                settings2array($ini_overwrites, $clean_params);
                                settings2params($clean_params);
                                $extra = substr(PHP_OS, 0, 3) !== "WIN" ?
-                                       "unset REQUEST_METHOD; unset QUERY_STRING; unset PATH_TRANSLATED; unset SCRIPT_FILENAME; unset REQUEST_METHOD;": "";
+                                       "unset REQUEST_METHOD; unset QUERY_STRING; unset PATH_TRANSLATED; unset SCRIPT_FILENAME; unset REQUEST_METHOD;" : "";
 -                              system_with_timeout("$extra $php $pass_options -q $clean_params $no_file_cache \"$test_clean\"", $env);
 +                              system_with_timeout("$extra $php $pass_options $extra_options -q $clean_params $no_file_cache \"$test_clean\"", $env);
                        }
  
                        if (!$cfg['keep']['clean']) {