diff options
author | Rod Elias <rodiney@fretebras.com.br> | 2020-05-11 11:08:17 -0300 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-05-12 17:00:11 +0200 |
commit | 682e2f6c20ef931df04105ddf1ccaf2256f00cbb (patch) | |
tree | 712b476102b2636e9700a9aa142588ae5430b262 | |
parent | 16f23cd1590115c035549cbb0cfcb9ed9e22edbc (diff) | |
download | php-git-682e2f6c20ef931df04105ddf1ccaf2256f00cbb.tar.gz |
Trim trailing whitespaces and fix code style
Closes GH-5554.
-rw-r--r-- | Zend/tests/bug72038.phpt | 18 | ||||
-rw-r--r-- | Zend/tests/bug77589.phpt | 4 | ||||
-rw-r--r-- | Zend/tests/bug78154.phpt | 24 | ||||
-rw-r--r-- | Zend/tests/bug79477.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/lsb_021.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/magic_methods_serialize.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/magic_methods_unserialize.phpt | 2 | ||||
-rw-r--r-- | ext/ffi/tests/101.phpt | 10 | ||||
-rw-r--r-- | ext/ffi/tests/301-win32.phpt | 8 | ||||
-rw-r--r-- | ext/phar/tests/bug79082.phpt | 32 | ||||
-rw-r--r-- | ext/soap/tests/bug79536.phpt | 42 | ||||
-rw-r--r-- | ext/standard/tests/serialize/bug79526.phpt | 12 | ||||
-rw-r--r-- | ext/xml/tests/xml_parser_set_option_variation5.phpt | 2 | ||||
-rw-r--r-- | ext/zip/tests/oo_add_encoding.phpt | 8 | ||||
-rw-r--r-- | ext/zip/tests/oo_add_from_string.phpt | 6 | ||||
-rw-r--r-- | ext/zip/tests/oo_addfile.phpt | 4 | ||||
-rw-r--r-- | ext/zip/tests/oo_addglob.phpt | 8 | ||||
-rw-r--r-- | ext/zip/tests/oo_addglob2.phpt | 28 | ||||
-rw-r--r-- | ext/zip/tests/oo_addpattern.phpt | 6 | ||||
-rw-r--r-- | ext/zip/tests/oo_replacefile.phpt | 2 | ||||
-rw-r--r-- | ext/zip/tests/oo_supported.phpt | 30 | ||||
-rw-r--r-- | ext/zip/tests/utils.inc | 8 | ||||
-rw-r--r-- | tests/lang/passByReference_010.phpt | 38 |
23 files changed, 149 insertions, 149 deletions
diff --git a/Zend/tests/bug72038.phpt b/Zend/tests/bug72038.phpt index 44207af965..a20642917b 100644 --- a/Zend/tests/bug72038.phpt +++ b/Zend/tests/bug72038.phpt @@ -4,22 +4,22 @@ Bug #72038 (Function calls with values to a by-ref parameter don't always throw <?php try { - test($foo = new stdClass); - var_dump($foo); + test($foo = new stdClass); + var_dump($foo); } catch (Throwable $e) { - echo "Exception: " . $e->getMessage() . "\n"; + echo "Exception: " . $e->getMessage() . "\n"; } try { - test($bar = 2); - var_dump($bar); + test($bar = 2); + var_dump($bar); } catch (Throwable $e) { - echo "Exception: " . $e->getMessage() . "\n"; + echo "Exception: " . $e->getMessage() . "\n"; } try { - test($baz = &$bar); - var_dump($baz); + test($baz = &$bar); + var_dump($baz); } catch (Throwable $e) { - echo "Exception: " . $e->getMessage() . "\n"; + echo "Exception: " . $e->getMessage() . "\n"; } function test(&$param) { diff --git a/Zend/tests/bug77589.phpt b/Zend/tests/bug77589.phpt index ad07ee1351..d9b5301b2b 100644 --- a/Zend/tests/bug77589.phpt +++ b/Zend/tests/bug77589.phpt @@ -3,14 +3,14 @@ BUG #77589 (Core dump using parse_ini_string with numeric sections) --FILE-- <?php var_dump( - parse_ini_string(<<<INI + parse_ini_string(<<<INI [0] a = 1 b = on c = true ["true"] -a = 100 +a = 100 b = null c = yes INI diff --git a/Zend/tests/bug78154.phpt b/Zend/tests/bug78154.phpt index 4016a88973..abfbce1434 100644 --- a/Zend/tests/bug78154.phpt +++ b/Zend/tests/bug78154.phpt @@ -4,20 +4,20 @@ Bug #78154: SEND_VAR_NO_REF does not always send reference <?php namespace { - try { - var_dump(similar_text('a', 'a', $c=0x44444444)); - var_dump($c); - } catch (Throwable $e) { - echo "Exception: " . $e->getMessage() . "\n"; - } + try { + var_dump(similar_text('a', 'a', $c=0x44444444)); + var_dump($c); + } catch (Throwable $e) { + echo "Exception: " . $e->getMessage() . "\n"; + } } namespace Foo { - try { - var_dump(similar_text('a', 'a', $d=0x44444444)); - var_dump($d); - } catch (\Throwable $e) { - echo "Exception: " . $e->getMessage() . "\n"; - } + try { + var_dump(similar_text('a', 'a', $d=0x44444444)); + var_dump($d); + } catch (\Throwable $e) { + echo "Exception: " . $e->getMessage() . "\n"; + } } ?> diff --git a/Zend/tests/bug79477.phpt b/Zend/tests/bug79477.phpt index cb5340d104..b717a830df 100644 --- a/Zend/tests/bug79477.phpt +++ b/Zend/tests/bug79477.phpt @@ -4,7 +4,7 @@ Bug #79477: casting object into array creates references <?php class Test { - public $prop = 'default value'; + public $prop = 'default value'; } $obj = new Test; diff --git a/Zend/tests/lsb_021.phpt b/Zend/tests/lsb_021.phpt index 2e5b418441..5694537a04 100644 --- a/Zend/tests/lsb_021.phpt +++ b/Zend/tests/lsb_021.phpt @@ -24,7 +24,7 @@ class B extends A { B::test(); call_user_func("B::test"); call_user_func(array("B", "test")); - + (self::class)::test(); call_user_func(self::class . "::test"); call_user_func(array(self::class, "test")); diff --git a/Zend/tests/magic_methods_serialize.phpt b/Zend/tests/magic_methods_serialize.phpt index e3d20974c6..3cf3b5b159 100644 --- a/Zend/tests/magic_methods_serialize.phpt +++ b/Zend/tests/magic_methods_serialize.phpt @@ -3,7 +3,7 @@ __serialize declaration --FILE-- <?php class Foo { - static function __serialize($arguments) {} + static function __serialize($arguments) {} } ?> --EXPECTF-- diff --git a/Zend/tests/magic_methods_unserialize.phpt b/Zend/tests/magic_methods_unserialize.phpt index 757cb6bf98..5feedd554d 100644 --- a/Zend/tests/magic_methods_unserialize.phpt +++ b/Zend/tests/magic_methods_unserialize.phpt @@ -3,7 +3,7 @@ __unserialize declaration --FILE-- <?php class Foo { - static function __unserialize($data, $value) {} + static function __unserialize($data, $value) {} } ?> --EXPECTF-- diff --git a/ext/ffi/tests/101.phpt b/ext/ffi/tests/101.phpt index 7f673b7fb2..3acc98f035 100644 --- a/ext/ffi/tests/101.phpt +++ b/ext/ffi/tests/101.phpt @@ -17,13 +17,13 @@ ffi.enable=1 require_once('utils.inc'); $fastcall = ffi_get_fastcall_specifier(); $zend = ffi_cdef(" - const char *get_zend_version(void); - //char *get_zend_version(void); - extern size_t (*zend_printf)(const char *format, ...); + const char *get_zend_version(void); + //char *get_zend_version(void); + extern size_t (*zend_printf)(const char *format, ...); - unsigned long $fastcall zend_hash_func(const char *str, size_t len); + unsigned long $fastcall zend_hash_func(const char *str, size_t len); - void $fastcall zend_str_tolower(char *str, size_t length); + void $fastcall zend_str_tolower(char *str, size_t length); ", ffi_get_php_dll_name()); $f = $zend->get_zend_version; diff --git a/ext/ffi/tests/301-win32.phpt b/ext/ffi/tests/301-win32.phpt index c53d6f9f4a..7493399caf 100644 --- a/ext/ffi/tests/301-win32.phpt +++ b/ext/ffi/tests/301-win32.phpt @@ -10,10 +10,10 @@ ffi.enable=1 require_once('utils.inc'); $fn = __DIR__ . "/300-win32.h"; $cont = str_replace( - "PHP_DLL_NAME", - ffi_get_php_dll_name(), - file_get_contents("$fn.in") - ); + "PHP_DLL_NAME", + ffi_get_php_dll_name(), + file_get_contents("$fn.in") + ); file_put_contents($fn, $cont); $ffi = FFI::load($fn); diff --git a/ext/phar/tests/bug79082.phpt b/ext/phar/tests/bug79082.phpt index 5dc861801a..9ced140b28 100644 --- a/ext/phar/tests/bug79082.phpt +++ b/ext/phar/tests/bug79082.phpt @@ -13,24 +13,24 @@ chmod(__DIR__ . '/test79082/test79082-testfile', 0644); chmod(__DIR__ . '/test79082/test79082-testfile2', 0400); foreach([Phar::TAR => 'tar', Phar::ZIP => 'zip'] as $mode => $ext) { - clearstatcache(); - $phar = new PharData(__DIR__ . '/test79082.' . $ext, null, null, $mode); - $phar->buildFromIterator(new \RecursiveDirectoryIterator(__DIR__ . '/test79082', \FilesystemIterator::SKIP_DOTS), __DIR__ . '/test79082'); - $phar->extractTo(__DIR__); - var_dump(decoct(stat(__DIR__ . '/test79082-testfile')['mode'])); - var_dump(decoct(stat(__DIR__ . '/test79082-testfile2')['mode'])); - unlink(__DIR__ . '/test79082-testfile'); - unlink(__DIR__ . '/test79082-testfile2'); + clearstatcache(); + $phar = new PharData(__DIR__ . '/test79082.' . $ext, null, null, $mode); + $phar->buildFromIterator(new \RecursiveDirectoryIterator(__DIR__ . '/test79082', \FilesystemIterator::SKIP_DOTS), __DIR__ . '/test79082'); + $phar->extractTo(__DIR__); + var_dump(decoct(stat(__DIR__ . '/test79082-testfile')['mode'])); + var_dump(decoct(stat(__DIR__ . '/test79082-testfile2')['mode'])); + unlink(__DIR__ . '/test79082-testfile'); + unlink(__DIR__ . '/test79082-testfile2'); } foreach([Phar::TAR => 'tar', Phar::ZIP => 'zip'] as $mode => $ext) { - clearstatcache(); - $phar = new PharData(__DIR__ . '/test79082-d.' . $ext, null, null, $mode); - $phar->buildFromDirectory(__DIR__ . '/test79082'); - $phar->extractTo(__DIR__); - var_dump(decoct(stat(__DIR__ . '/test79082-testfile')['mode'])); - var_dump(decoct(stat(__DIR__ . '/test79082-testfile2')['mode'])); - unlink(__DIR__ . '/test79082-testfile'); - unlink(__DIR__ . '/test79082-testfile2'); + clearstatcache(); + $phar = new PharData(__DIR__ . '/test79082-d.' . $ext, null, null, $mode); + $phar->buildFromDirectory(__DIR__ . '/test79082'); + $phar->extractTo(__DIR__); + var_dump(decoct(stat(__DIR__ . '/test79082-testfile')['mode'])); + var_dump(decoct(stat(__DIR__ . '/test79082-testfile2')['mode'])); + unlink(__DIR__ . '/test79082-testfile'); + unlink(__DIR__ . '/test79082-testfile2'); } ?> --CLEAN-- diff --git a/ext/soap/tests/bug79536.phpt b/ext/soap/tests/bug79536.phpt index 6de17fb762..b1cbb8de77 100644 --- a/ext/soap/tests/bug79536.phpt +++ b/ext/soap/tests/bug79536.phpt @@ -7,11 +7,11 @@ soap.wsdl_cache_enabled=0 --FILE-- <?php $GLOBALS['HTTP_RAW_POST_DATA']=" -<env:Envelope xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\" - xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" - xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" - xmlns:enc=\"http://schemas.xmlsoap.org/soap/encoding/\" - xmlns:ns1=\"http://schemas.nothing.com\" +<env:Envelope xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\" + xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" + xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" + xmlns:enc=\"http://schemas.xmlsoap.org/soap/encoding/\" + xmlns:ns1=\"http://schemas.nothing.com\" > <env:Body> <ns1:dotest2> @@ -22,35 +22,35 @@ $GLOBALS['HTTP_RAW_POST_DATA']=" </env:Envelope>"; class myFault extends SoapFault { - public function __destruct() { - } + public function __destruct() { + } } function book_to_xml($book) { - throw new myFault("Server", "Conversion Fault"); + throw new myFault("Server", "Conversion Fault"); } class test{ - function dotest2($str){ - $book = new book; - $book->a = "foo"; - $book->b = "bar"; - return $book; - } + function dotest2($str){ + $book = new book; + $book->a = "foo"; + $book->b = "bar"; + return $book; + } } class book{ - public $a="a"; - public $b="c"; + public $a="a"; + public $b="c"; } $options=Array( - 'actor' =>'http://schemas.nothing.com', - 'typemap' => array(array("type_ns" => "http://schemas.nothing.com", - "type_name" => "book", - "to_xml" => "book_to_xml")) - ); + 'actor' =>'http://schemas.nothing.com', + 'typemap' => array(array("type_ns" => "http://schemas.nothing.com", + "type_name" => "book", + "to_xml" => "book_to_xml")) + ); $server = new SoapServer(__DIR__."/classmap.wsdl",$options); $server->setClass("test"); diff --git a/ext/standard/tests/serialize/bug79526.phpt b/ext/standard/tests/serialize/bug79526.phpt index b237df0d73..19f07fe989 100644 --- a/ext/standard/tests/serialize/bug79526.phpt +++ b/ext/standard/tests/serialize/bug79526.phpt @@ -4,9 +4,9 @@ Bug #79526 (`__sleep` error message doesn't include the name of the class) <?php class A { - public function __sleep() { - return 1; - } + public function __sleep() { + return 1; + } } @@ -14,9 +14,9 @@ serialize(new A()); class B { - public function __sleep() { - return [1]; - } + public function __sleep() { + return [1]; + } } diff --git a/ext/xml/tests/xml_parser_set_option_variation5.phpt b/ext/xml/tests/xml_parser_set_option_variation5.phpt index 0ef45d50c6..ac6e891072 100644 --- a/ext/xml/tests/xml_parser_set_option_variation5.phpt +++ b/ext/xml/tests/xml_parser_set_option_variation5.phpt @@ -11,7 +11,7 @@ if (!extension_loaded('xml')) { $xmlParser = xml_parser_create(); -var_dump(xml_parser_set_option($xmlParser, 42, 1)); +var_dump(xml_parser_set_option($xmlParser, 42, 1)); ?> --EXPECTF-- diff --git a/ext/zip/tests/oo_add_encoding.phpt b/ext/zip/tests/oo_add_encoding.phpt index 43e91105ed..a04894f482 100644 --- a/ext/zip/tests/oo_add_encoding.phpt +++ b/ext/zip/tests/oo_add_encoding.phpt @@ -15,7 +15,7 @@ $file = $dirname . 'tmp.zip'; @mkdir($dirname); $zip = new ZipArchive; if (!$zip->open($file, ZipArchive::CREATE)) { - exit('failed'); + exit('failed'); } $zip->addEmptyDir('foo'); @@ -27,10 +27,10 @@ $zip->addFromString(chr(0x91), __FILE__, ZipArchive::FL_ENC_CP437); $zip->addFromString('€', __FILE__, ZipArchive::FL_ENC_UTF_8); if ($zip->status == ZIPARCHIVE::ER_OK) { - dump_entries_name($zip); - $zip->close(); + dump_entries_name($zip); + $zip->close(); } else { - echo "failed\n"; + echo "failed\n"; } ?> --CLEAN-- diff --git a/ext/zip/tests/oo_add_from_string.phpt b/ext/zip/tests/oo_add_from_string.phpt index 6ddc6ff8be..9124650add 100644 --- a/ext/zip/tests/oo_add_from_string.phpt +++ b/ext/zip/tests/oo_add_from_string.phpt @@ -31,10 +31,10 @@ var_dump($zip->addFromString('entry1.txt', __FILE__, ZipArchive::FL_OVERWRITE)); var_dump($zip->status == ZipArchive::ER_OK); if ($zip->status == ZipArchive::ER_OK) { - dump_entries_name($zip); - $zip->close(); + dump_entries_name($zip); + $zip->close(); } else { - echo "failed\n"; + echo "failed\n"; } ?> Done diff --git a/ext/zip/tests/oo_addfile.phpt b/ext/zip/tests/oo_addfile.phpt index 4ca302a5eb..6d9b6e4479 100644 --- a/ext/zip/tests/oo_addfile.phpt +++ b/ext/zip/tests/oo_addfile.phpt @@ -23,7 +23,7 @@ if (!$zip->addFile($dirname . 'utils.inc', 'test.php')) { } var_dump($zip->lastId); if (!$zip->addFile($dirname . 'utils.inc', 'mini.txt', 12, 34)) { - echo "failed\n"; + echo "failed\n"; } var_dump($zip->lastId); if ($zip->status == ZIPARCHIVE::ER_OK) { @@ -44,7 +44,7 @@ if ($zip->status == ZIPARCHIVE::ER_OK) { echo "failed\n"; } if (!$zip->open($file)) { - exit('failed'); + exit('failed'); } var_dump(strlen($zip->getFromName('test.php')) == filesize($dirname . 'utils.inc')); var_dump(strlen($zip->getFromName('mini.txt')) == 34); diff --git a/ext/zip/tests/oo_addglob.phpt b/ext/zip/tests/oo_addglob.phpt index a648cd7c05..c622ac5eff 100644 --- a/ext/zip/tests/oo_addglob.phpt +++ b/ext/zip/tests/oo_addglob.phpt @@ -26,18 +26,18 @@ if (!$zip->open($file)) { } $options = array('add_path' => 'baz/', 'remove_all_path' => TRUE); if (!$zip->addGlob($dirname . '*.{txt,baz}', GLOB_BRACE, $options)) { - echo "failed 1\n"; + echo "failed 1\n"; } if (!$zip->addGlob($dirname . '*.{txt,baz}', GLOB_BRACE, $options)) { - echo "failed 2\n"; + echo "failed 2\n"; } $options['flags'] = 0; // clean FL_OVERWRITE if (!$zip->addGlob($dirname . '*.{txt,baz}', GLOB_BRACE, $options)) { - var_dump($zip->getStatusString()); + var_dump($zip->getStatusString()); } $options['flags'] = ZipArchive::FL_OVERWRITE; if (!$zip->addGlob($dirname . '*.{txt,baz}', GLOB_BRACE, $options)) { - echo "failed 3\n"; + echo "failed 3\n"; } if ($zip->status == ZIPARCHIVE::ER_OK) { if (!verify_entries($zip, [ diff --git a/ext/zip/tests/oo_addglob2.phpt b/ext/zip/tests/oo_addglob2.phpt index 18b74758c5..9a37e1d1b8 100644 --- a/ext/zip/tests/oo_addglob2.phpt +++ b/ext/zip/tests/oo_addglob2.phpt @@ -23,18 +23,18 @@ if (!$zip->open($file, ZipArchive::CREATE | ZipArchive::OVERWRITE)) { exit('failed'); } $options = [ - 'remove_all_path' => true, + 'remove_all_path' => true, ]; if (!$zip->addGlob($dirname . 'foo.*', GLOB_BRACE, $options)) { echo "failed 1\n"; } $options = [ - 'remove_all_path' => true, - 'comp_method' => ZipArchive::CM_STORE, - 'comp_flags' => 5, - 'enc_method' => ZipArchive::EM_AES_256, - 'enc_password' => 'secret', + 'remove_all_path' => true, + 'comp_method' => ZipArchive::CM_STORE, + 'comp_flags' => 5, + 'enc_method' => ZipArchive::EM_AES_256, + 'enc_password' => 'secret', ]; if (!$zip->addGlob($dirname . 'bar.*', GLOB_BRACE, $options)) { echo "failed 2\n"; @@ -42,14 +42,14 @@ if (!$zip->addGlob($dirname . 'bar.*', GLOB_BRACE, $options)) { if ($zip->status == ZIPARCHIVE::ER_OK) { $zip->close(); - $zip = new ZipArchive(); - $zip->open($file); - for($i=0; $i<$zip->numFiles; $i++) { - $sb = $zip->statIndex($i); - echo "$i: " . $sb['name'] . - ", comp=" . $sb['comp_method'] . - ", enc=" . $sb['encryption_method'] . "\n"; - } + $zip = new ZipArchive(); + $zip->open($file); + for($i=0; $i<$zip->numFiles; $i++) { + $sb = $zip->statIndex($i); + echo "$i: " . $sb['name'] . + ", comp=" . $sb['comp_method'] . + ", enc=" . $sb['encryption_method'] . "\n"; + } } else { echo "failed 3\n"; } diff --git a/ext/zip/tests/oo_addpattern.phpt b/ext/zip/tests/oo_addpattern.phpt index 2b9ef11647..577fc365aa 100644 --- a/ext/zip/tests/oo_addpattern.phpt +++ b/ext/zip/tests/oo_addpattern.phpt @@ -27,15 +27,15 @@ if (!$zip->open($file)) { $dir = realpath($dirname); $options = array('add_path' => 'baz/', 'remove_path' => $dir); if (!$zip->addPattern('/\.txt$/', $dir, $options)) { - echo "failed 1\n"; + echo "failed 1\n"; } $options['flags'] = 0; // clean FL_OVERWRITE if (!$zip->addPattern('/\.txt$/', $dir, $options)) { - var_dump($zip->getStatusString()); + var_dump($zip->getStatusString()); } $options['flags'] = ZipArchive::FL_OVERWRITE; if (!$zip->addPattern('/\.txt$/', $dir, $options)) { - echo "failed 2\n"; + echo "failed 2\n"; } if ($zip->status == ZIPARCHIVE::ER_OK) { diff --git a/ext/zip/tests/oo_replacefile.phpt b/ext/zip/tests/oo_replacefile.phpt index 486928c069..6f0e393acf 100644 --- a/ext/zip/tests/oo_replacefile.phpt +++ b/ext/zip/tests/oo_replacefile.phpt @@ -42,7 +42,7 @@ if ($zip->status == ZIPARCHIVE::ER_OK) { echo "failed\n"; } if (!$zip->open($file)) { - exit('re-open failed'); + exit('re-open failed'); } var_dump(strlen($zip->getFromName('bar')) == filesize($dirname . 'utils.inc')); var_dump(strlen($zip->getFromName('foobar/baz')) == 42); diff --git a/ext/zip/tests/oo_supported.phpt b/ext/zip/tests/oo_supported.phpt index 02b169bff7..d72b533815 100644 --- a/ext/zip/tests/oo_supported.phpt +++ b/ext/zip/tests/oo_supported.phpt @@ -9,28 +9,28 @@ if (!method_exists('ZipArchive', 'isCompressionMethodSupported')) die('skip need --FILE-- <?php $methods = [ - ZipArchive::CM_STORE => "STORE", - ZipArchive::CM_DEFLATE => "DEFLATE", - ZipArchive::CM_BZIP2 => "BZIP2", - ZipArchive::CM_XZ => "XZ", + ZipArchive::CM_STORE => "STORE", + ZipArchive::CM_DEFLATE => "DEFLATE", + ZipArchive::CM_BZIP2 => "BZIP2", + ZipArchive::CM_XZ => "XZ", ]; foreach($methods as $method => $name) { - echo "Compression $name\n"; - var_dump(ZipArchive::isCompressionMethodSupported($method)); - var_dump(ZipArchive::isCompressionMethodSupported($method, false)); + echo "Compression $name\n"; + var_dump(ZipArchive::isCompressionMethodSupported($method)); + var_dump(ZipArchive::isCompressionMethodSupported($method, false)); } $methods = [ - ZipArchive::EM_NONE => "NONE", - ZipArchive::EM_TRAD_PKWARE => "TRAD_PKWARE", - ZipArchive::EM_AES_128 => "AES-128", - ZipArchive::EM_AES_192 => "AES-192", - ZipArchive::EM_AES_256 => "AES-256", + ZipArchive::EM_NONE => "NONE", + ZipArchive::EM_TRAD_PKWARE => "TRAD_PKWARE", + ZipArchive::EM_AES_128 => "AES-128", + ZipArchive::EM_AES_192 => "AES-192", + ZipArchive::EM_AES_256 => "AES-256", ]; foreach($methods as $method => $name) { - echo "Encryption $name\n"; - var_dump(ZipArchive::isEncryptionMethodSupported($method)); - var_dump(ZipArchive::isEncryptionMethodSupported($method, false)); + echo "Encryption $name\n"; + var_dump(ZipArchive::isEncryptionMethodSupported($method)); + var_dump(ZipArchive::isEncryptionMethodSupported($method, false)); } ?> Done diff --git a/ext/zip/tests/utils.inc b/ext/zip/tests/utils.inc index 93158b05b2..1076cf8bf2 100644 --- a/ext/zip/tests/utils.inc +++ b/ext/zip/tests/utils.inc @@ -1,9 +1,9 @@ <?php function dump_entries_name($z) { - for($i=0; $i<$z->numFiles; $i++) { - $sb = $z->statIndex($i); - echo $i . ' ' . $sb['name'] . "\n"; - } + for($i=0; $i<$z->numFiles; $i++) { + $sb = $z->statIndex($i); + echo $i . ' ' . $sb['name'] . "\n"; + } } function verify_entries($zip, $entries = []) { diff --git a/tests/lang/passByReference_010.phpt b/tests/lang/passByReference_010.phpt index 9606d4f842..24b108a174 100644 --- a/tests/lang/passByReference_010.phpt +++ b/tests/lang/passByReference_010.phpt @@ -10,41 +10,41 @@ function f(&$a) { echo "\n\n---> Pass constant assignment by reference:\n"; try { - f($a="a.original"); - var_dump($a); + f($a="a.original"); + var_dump($a); } catch (Throwable $e) { - echo "Exception: " . $e->getMessage() ."\n"; + echo "Exception: " . $e->getMessage() ."\n"; } echo "\n\n---> Pass variable assignment by reference:\n"; try { - unset($a); - $a = "a.original"; - f($b = $a); - var_dump($a); + unset($a); + $a = "a.original"; + f($b = $a); + var_dump($a); } catch (Throwable $e) { - echo "Exception: " . $e->getMessage() ."\n"; + echo "Exception: " . $e->getMessage() ."\n"; } echo "\n\n---> Pass reference assignment by reference:\n"; try { - unset($a, $b); - $a = "a.original"; - f($b =& $a); - var_dump($a); + unset($a, $b); + $a = "a.original"; + f($b =& $a); + var_dump($a); } catch (Throwable $e) { - echo "Exception: " . $e->getMessage() ."\n"; + echo "Exception: " . $e->getMessage() ."\n"; } echo "\n\n---> Pass concat assignment by reference:\n"; try { - unset($a, $b); - $b = "b.original"; - $a = "a.original"; - f($b .= $a); - var_dump($a); + unset($a, $b); + $b = "b.original"; + $a = "a.original"; + f($b .= $a); + var_dump($a); } catch (Throwable $e) { - echo "Exception: " . $e->getMessage() ."\n"; + echo "Exception: " . $e->getMessage() ."\n"; } ?> |