Skip to content

Commit 682e2f6

Browse files
chapeupretonikic
authored andcommitted
Trim trailing whitespaces and fix code style
Closes GH-5554.
1 parent 16f23cd commit 682e2f6

23 files changed

+149
-149
lines changed

Zend/tests/bug72038.phpt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ Bug #72038 (Function calls with values to a by-ref parameter don't always throw
44
<?php
55

66
try {
7-
test($foo = new stdClass);
8-
var_dump($foo);
7+
test($foo = new stdClass);
8+
var_dump($foo);
99
} catch (Throwable $e) {
10-
echo "Exception: " . $e->getMessage() . "\n";
10+
echo "Exception: " . $e->getMessage() . "\n";
1111
}
1212
try {
13-
test($bar = 2);
14-
var_dump($bar);
13+
test($bar = 2);
14+
var_dump($bar);
1515
} catch (Throwable $e) {
16-
echo "Exception: " . $e->getMessage() . "\n";
16+
echo "Exception: " . $e->getMessage() . "\n";
1717
}
1818
try {
19-
test($baz = &$bar);
20-
var_dump($baz);
19+
test($baz = &$bar);
20+
var_dump($baz);
2121
} catch (Throwable $e) {
22-
echo "Exception: " . $e->getMessage() . "\n";
22+
echo "Exception: " . $e->getMessage() . "\n";
2323
}
2424

2525
function test(&$param) {

Zend/tests/bug77589.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ BUG #77589 (Core dump using parse_ini_string with numeric sections)
33
--FILE--
44
<?php
55
var_dump(
6-
parse_ini_string(<<<INI
6+
parse_ini_string(<<<INI
77
[0]
88
a = 1
99
b = on
1010
c = true
1111
1212
["true"]
13-
a = 100
13+
a = 100
1414
b = null
1515
c = yes
1616
INI

Zend/tests/bug78154.phpt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ Bug #78154: SEND_VAR_NO_REF does not always send reference
44
<?php
55

66
namespace {
7-
try {
8-
var_dump(similar_text('a', 'a', $c=0x44444444));
9-
var_dump($c);
10-
} catch (Throwable $e) {
11-
echo "Exception: " . $e->getMessage() . "\n";
12-
}
7+
try {
8+
var_dump(similar_text('a', 'a', $c=0x44444444));
9+
var_dump($c);
10+
} catch (Throwable $e) {
11+
echo "Exception: " . $e->getMessage() . "\n";
12+
}
1313
}
1414
namespace Foo {
15-
try {
16-
var_dump(similar_text('a', 'a', $d=0x44444444));
17-
var_dump($d);
18-
} catch (\Throwable $e) {
19-
echo "Exception: " . $e->getMessage() . "\n";
20-
}
15+
try {
16+
var_dump(similar_text('a', 'a', $d=0x44444444));
17+
var_dump($d);
18+
} catch (\Throwable $e) {
19+
echo "Exception: " . $e->getMessage() . "\n";
20+
}
2121
}
2222

2323
?>

Zend/tests/bug79477.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Bug #79477: casting object into array creates references
44
<?php
55

66
class Test {
7-
public $prop = 'default value';
7+
public $prop = 'default value';
88
}
99

1010
$obj = new Test;

Zend/tests/lsb_021.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class B extends A {
2424
B::test();
2525
call_user_func("B::test");
2626
call_user_func(array("B", "test"));
27-
27+
2828
(self::class)::test();
2929
call_user_func(self::class . "::test");
3030
call_user_func(array(self::class, "test"));

Zend/tests/magic_methods_serialize.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ __serialize declaration
33
--FILE--
44
<?php
55
class Foo {
6-
static function __serialize($arguments) {}
6+
static function __serialize($arguments) {}
77
}
88
?>
99
--EXPECTF--

Zend/tests/magic_methods_unserialize.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ __unserialize declaration
33
--FILE--
44
<?php
55
class Foo {
6-
static function __unserialize($data, $value) {}
6+
static function __unserialize($data, $value) {}
77
}
88
?>
99
--EXPECTF--

ext/ffi/tests/101.phpt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ ffi.enable=1
1717
require_once('utils.inc');
1818
$fastcall = ffi_get_fastcall_specifier();
1919
$zend = ffi_cdef("
20-
const char *get_zend_version(void);
21-
//char *get_zend_version(void);
22-
extern size_t (*zend_printf)(const char *format, ...);
20+
const char *get_zend_version(void);
21+
//char *get_zend_version(void);
22+
extern size_t (*zend_printf)(const char *format, ...);
2323
24-
unsigned long $fastcall zend_hash_func(const char *str, size_t len);
24+
unsigned long $fastcall zend_hash_func(const char *str, size_t len);
2525
26-
void $fastcall zend_str_tolower(char *str, size_t length);
26+
void $fastcall zend_str_tolower(char *str, size_t length);
2727
2828
", ffi_get_php_dll_name());
2929
$f = $zend->get_zend_version;

ext/ffi/tests/301-win32.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ ffi.enable=1
1010
require_once('utils.inc');
1111
$fn = __DIR__ . "/300-win32.h";
1212
$cont = str_replace(
13-
"PHP_DLL_NAME",
14-
ffi_get_php_dll_name(),
15-
file_get_contents("$fn.in")
16-
);
13+
"PHP_DLL_NAME",
14+
ffi_get_php_dll_name(),
15+
file_get_contents("$fn.in")
16+
);
1717
file_put_contents($fn, $cont);
1818

1919
$ffi = FFI::load($fn);

ext/phar/tests/bug79082.phpt

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,24 @@ chmod(__DIR__ . '/test79082/test79082-testfile', 0644);
1313
chmod(__DIR__ . '/test79082/test79082-testfile2', 0400);
1414

1515
foreach([Phar::TAR => 'tar', Phar::ZIP => 'zip'] as $mode => $ext) {
16-
clearstatcache();
17-
$phar = new PharData(__DIR__ . '/test79082.' . $ext, null, null, $mode);
18-
$phar->buildFromIterator(new \RecursiveDirectoryIterator(__DIR__ . '/test79082', \FilesystemIterator::SKIP_DOTS), __DIR__ . '/test79082');
19-
$phar->extractTo(__DIR__);
20-
var_dump(decoct(stat(__DIR__ . '/test79082-testfile')['mode']));
21-
var_dump(decoct(stat(__DIR__ . '/test79082-testfile2')['mode']));
22-
unlink(__DIR__ . '/test79082-testfile');
23-
unlink(__DIR__ . '/test79082-testfile2');
16+
clearstatcache();
17+
$phar = new PharData(__DIR__ . '/test79082.' . $ext, null, null, $mode);
18+
$phar->buildFromIterator(new \RecursiveDirectoryIterator(__DIR__ . '/test79082', \FilesystemIterator::SKIP_DOTS), __DIR__ . '/test79082');
19+
$phar->extractTo(__DIR__);
20+
var_dump(decoct(stat(__DIR__ . '/test79082-testfile')['mode']));
21+
var_dump(decoct(stat(__DIR__ . '/test79082-testfile2')['mode']));
22+
unlink(__DIR__ . '/test79082-testfile');
23+
unlink(__DIR__ . '/test79082-testfile2');
2424
}
2525
foreach([Phar::TAR => 'tar', Phar::ZIP => 'zip'] as $mode => $ext) {
26-
clearstatcache();
27-
$phar = new PharData(__DIR__ . '/test79082-d.' . $ext, null, null, $mode);
28-
$phar->buildFromDirectory(__DIR__ . '/test79082');
29-
$phar->extractTo(__DIR__);
30-
var_dump(decoct(stat(__DIR__ . '/test79082-testfile')['mode']));
31-
var_dump(decoct(stat(__DIR__ . '/test79082-testfile2')['mode']));
32-
unlink(__DIR__ . '/test79082-testfile');
33-
unlink(__DIR__ . '/test79082-testfile2');
26+
clearstatcache();
27+
$phar = new PharData(__DIR__ . '/test79082-d.' . $ext, null, null, $mode);
28+
$phar->buildFromDirectory(__DIR__ . '/test79082');
29+
$phar->extractTo(__DIR__);
30+
var_dump(decoct(stat(__DIR__ . '/test79082-testfile')['mode']));
31+
var_dump(decoct(stat(__DIR__ . '/test79082-testfile2')['mode']));
32+
unlink(__DIR__ . '/test79082-testfile');
33+
unlink(__DIR__ . '/test79082-testfile2');
3434
}
3535
?>
3636
--CLEAN--

ext/soap/tests/bug79536.phpt

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ soap.wsdl_cache_enabled=0
77
--FILE--
88
<?php
99
$GLOBALS['HTTP_RAW_POST_DATA']="
10-
<env:Envelope xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\"
11-
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
12-
xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
13-
xmlns:enc=\"http://schemas.xmlsoap.org/soap/encoding/\"
14-
xmlns:ns1=\"http://schemas.nothing.com\"
10+
<env:Envelope xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\"
11+
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
12+
xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
13+
xmlns:enc=\"http://schemas.xmlsoap.org/soap/encoding/\"
14+
xmlns:ns1=\"http://schemas.nothing.com\"
1515
>
1616
<env:Body>
1717
<ns1:dotest2>
@@ -22,35 +22,35 @@ $GLOBALS['HTTP_RAW_POST_DATA']="
2222
</env:Envelope>";
2323

2424
class myFault extends SoapFault {
25-
public function __destruct() {
26-
}
25+
public function __destruct() {
26+
}
2727
}
2828

2929
function book_to_xml($book) {
30-
throw new myFault("Server", "Conversion Fault");
30+
throw new myFault("Server", "Conversion Fault");
3131
}
3232

3333
class test{
34-
function dotest2($str){
35-
$book = new book;
36-
$book->a = "foo";
37-
$book->b = "bar";
38-
return $book;
39-
}
34+
function dotest2($str){
35+
$book = new book;
36+
$book->a = "foo";
37+
$book->b = "bar";
38+
return $book;
39+
}
4040
}
4141

4242
class book{
43-
public $a="a";
44-
public $b="c";
43+
public $a="a";
44+
public $b="c";
4545

4646
}
4747

4848
$options=Array(
49-
'actor' =>'http://schemas.nothing.com',
50-
'typemap' => array(array("type_ns" => "http://schemas.nothing.com",
51-
"type_name" => "book",
52-
"to_xml" => "book_to_xml"))
53-
);
49+
'actor' =>'http://schemas.nothing.com',
50+
'typemap' => array(array("type_ns" => "http://schemas.nothing.com",
51+
"type_name" => "book",
52+
"to_xml" => "book_to_xml"))
53+
);
5454

5555
$server = new SoapServer(__DIR__."/classmap.wsdl",$options);
5656
$server->setClass("test");

ext/standard/tests/serialize/bug79526.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ Bug #79526 (`__sleep` error message doesn't include the name of the class)
44
<?php
55
class A
66
{
7-
public function __sleep() {
8-
return 1;
9-
}
7+
public function __sleep() {
8+
return 1;
9+
}
1010
}
1111

1212

1313
serialize(new A());
1414

1515
class B
1616
{
17-
public function __sleep() {
18-
return [1];
19-
}
17+
public function __sleep() {
18+
return [1];
19+
}
2020
}
2121

2222

ext/xml/tests/xml_parser_set_option_variation5.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if (!extension_loaded('xml')) {
1111

1212
$xmlParser = xml_parser_create();
1313

14-
var_dump(xml_parser_set_option($xmlParser, 42, 1));
14+
var_dump(xml_parser_set_option($xmlParser, 42, 1));
1515

1616
?>
1717
--EXPECTF--

ext/zip/tests/oo_add_encoding.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ $file = $dirname . 'tmp.zip';
1515
@mkdir($dirname);
1616
$zip = new ZipArchive;
1717
if (!$zip->open($file, ZipArchive::CREATE)) {
18-
exit('failed');
18+
exit('failed');
1919
}
2020

2121
$zip->addEmptyDir('foo');
@@ -27,10 +27,10 @@ $zip->addFromString(chr(0x91), __FILE__, ZipArchive::FL_ENC_CP437);
2727
$zip->addFromString('', __FILE__, ZipArchive::FL_ENC_UTF_8);
2828

2929
if ($zip->status == ZIPARCHIVE::ER_OK) {
30-
dump_entries_name($zip);
31-
$zip->close();
30+
dump_entries_name($zip);
31+
$zip->close();
3232
} else {
33-
echo "failed\n";
33+
echo "failed\n";
3434
}
3535
?>
3636
--CLEAN--

ext/zip/tests/oo_add_from_string.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ var_dump($zip->addFromString('entry1.txt', __FILE__, ZipArchive::FL_OVERWRITE));
3131
var_dump($zip->status == ZipArchive::ER_OK);
3232

3333
if ($zip->status == ZipArchive::ER_OK) {
34-
dump_entries_name($zip);
35-
$zip->close();
34+
dump_entries_name($zip);
35+
$zip->close();
3636
} else {
37-
echo "failed\n";
37+
echo "failed\n";
3838
}
3939
?>
4040
Done

ext/zip/tests/oo_addfile.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ if (!$zip->addFile($dirname . 'utils.inc', 'test.php')) {
2323
}
2424
var_dump($zip->lastId);
2525
if (!$zip->addFile($dirname . 'utils.inc', 'mini.txt', 12, 34)) {
26-
echo "failed\n";
26+
echo "failed\n";
2727
}
2828
var_dump($zip->lastId);
2929
if ($zip->status == ZIPARCHIVE::ER_OK) {
@@ -44,7 +44,7 @@ if ($zip->status == ZIPARCHIVE::ER_OK) {
4444
echo "failed\n";
4545
}
4646
if (!$zip->open($file)) {
47-
exit('failed');
47+
exit('failed');
4848
}
4949
var_dump(strlen($zip->getFromName('test.php')) == filesize($dirname . 'utils.inc'));
5050
var_dump(strlen($zip->getFromName('mini.txt')) == 34);

ext/zip/tests/oo_addglob.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ if (!$zip->open($file)) {
2626
}
2727
$options = array('add_path' => 'baz/', 'remove_all_path' => TRUE);
2828
if (!$zip->addGlob($dirname . '*.{txt,baz}', GLOB_BRACE, $options)) {
29-
echo "failed 1\n";
29+
echo "failed 1\n";
3030
}
3131
if (!$zip->addGlob($dirname . '*.{txt,baz}', GLOB_BRACE, $options)) {
32-
echo "failed 2\n";
32+
echo "failed 2\n";
3333
}
3434
$options['flags'] = 0; // clean FL_OVERWRITE
3535
if (!$zip->addGlob($dirname . '*.{txt,baz}', GLOB_BRACE, $options)) {
36-
var_dump($zip->getStatusString());
36+
var_dump($zip->getStatusString());
3737
}
3838
$options['flags'] = ZipArchive::FL_OVERWRITE;
3939
if (!$zip->addGlob($dirname . '*.{txt,baz}', GLOB_BRACE, $options)) {
40-
echo "failed 3\n";
40+
echo "failed 3\n";
4141
}
4242
if ($zip->status == ZIPARCHIVE::ER_OK) {
4343
if (!verify_entries($zip, [

0 commit comments

Comments
 (0)