Skip to content

Tidy infrastructure: Reindent PHP/PHPT #5074

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
20 changes: 10 additions & 10 deletions Zend/tests/001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,39 @@ func_num_args() tests
<?php

function test1() {
var_dump(func_num_args());
var_dump(func_num_args());
}

function test2($a) {
var_dump(func_num_args());
var_dump(func_num_args());
}

function test3($a, $b) {
var_dump(func_num_args());
var_dump(func_num_args());
}

test1();
test2(1);
try {
test2();
test2();
} catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
echo "Exception: " . $e->getMessage() . "\n";
}

test3(1,2);

call_user_func("test1");
try {
call_user_func("test3", 1);
call_user_func("test3", 1);
} catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
echo "Exception: " . $e->getMessage() . "\n";
}
call_user_func("test3", 1, 2);

class test {
static function test1($a) {
var_dump(func_num_args());
}
static function test1($a) {
var_dump(func_num_args());
}
}

test::test1(1);
Expand Down
32 changes: 16 additions & 16 deletions Zend/tests/002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,45 @@ func_get_arg() tests
<?php

function test1() {
var_dump(func_get_arg(-10));
var_dump(func_get_arg(0));
var_dump(func_get_arg(1));
var_dump(func_get_arg(-10));
var_dump(func_get_arg(0));
var_dump(func_get_arg(1));
}

function test2($a) {
var_dump(func_get_arg(0));
var_dump(func_get_arg(1));
var_dump(func_get_arg(0));
var_dump(func_get_arg(1));
}

function test3($a, $b) {
var_dump(func_get_arg(0));
var_dump(func_get_arg(1));
var_dump(func_get_arg(2));
var_dump(func_get_arg(0));
var_dump(func_get_arg(1));
var_dump(func_get_arg(2));
}

test1();
test1(10);
test2(1);
try {
test2();
test2();
} catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
echo "Exception: " . $e->getMessage() . "\n";
}
test3(1,2);

call_user_func("test1");
try {
call_user_func("test3", 1);
call_user_func("test3", 1);
} catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
echo "Exception: " . $e->getMessage() . "\n";
}
call_user_func("test3", 1, 2);

class test {
static function test1($a) {
var_dump(func_get_arg(0));
var_dump(func_get_arg(1));
}
static function test1($a) {
var_dump(func_get_arg(0));
var_dump(func_get_arg(1));
}
}

test::test1(1);
Expand Down
20 changes: 10 additions & 10 deletions Zend/tests/003.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,39 @@ func_get_args() tests
<?php

function test1() {
var_dump(func_get_args());
var_dump(func_get_args());
}

function test2($a) {
var_dump(func_get_args());
var_dump(func_get_args());
}

function test3($a, $b) {
var_dump(func_get_args());
var_dump(func_get_args());
}

test1();
test1(10);
test2(1);
try {
test2();
test2();
} catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
echo "Exception: " . $e->getMessage() . "\n";
}
test3(1,2);

call_user_func("test1");
try {
call_user_func("test3", 1);
call_user_func("test3", 1);
} catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
echo "Exception: " . $e->getMessage() . "\n";
}
call_user_func("test3", 1, 2);

class test {
static function test1($a) {
var_dump(func_get_args());
}
static function test1($a) {
var_dump(func_get_args());
}
}

test::test1(1);
Expand Down
6 changes: 3 additions & 3 deletions Zend/tests/009.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ get_class() tests
<?php

class foo {
function bar () {
var_dump(get_class());
}
function bar () {
var_dump(get_class());
}
function testNull ()
{
try {
Expand Down
14 changes: 7 additions & 7 deletions Zend/tests/010.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ get_parent_class() tests
<?php

interface i {
function test();
function test();
}

class foo implements i {
function test() {
var_dump(get_parent_class());
}
function test() {
var_dump(get_parent_class());
}
}

class bar extends foo {
function test_bar() {
var_dump(get_parent_class());
}
function test_bar() {
var_dump(get_parent_class());
}
}

$bar = new bar;
Expand Down
26 changes: 13 additions & 13 deletions Zend/tests/011.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ property_exists() tests
<?php

class foo {
public $pp1 = 1;
private $pp2 = 2;
protected $pp3 = 3;
public $pp1 = 1;
private $pp2 = 2;
protected $pp3 = 3;

function bar() {
var_dump(property_exists("foo","pp1"));
var_dump(property_exists("foo","pp2"));
var_dump(property_exists("foo","pp3"));
}
function bar() {
var_dump(property_exists("foo","pp1"));
var_dump(property_exists("foo","pp2"));
var_dump(property_exists("foo","pp3"));
}
}

class bar extends foo {
function test() {
var_dump(property_exists("foo","pp1"));
var_dump(property_exists("foo","pp2"));
var_dump(property_exists("foo","pp3"));
}
function test() {
var_dump(property_exists("foo","pp1"));
var_dump(property_exists("foo","pp2"));
var_dump(property_exists("foo","pp3"));
}
}

var_dump(property_exists("foo","pp1"));
Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/020.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ func_get_arg() invalid usage
var_dump(func_get_arg(1));

function bar() {
var_dump(func_get_arg(1));
var_dump(func_get_arg(1));
}

function foo() {
bar(func_get_arg(1));
bar(func_get_arg(1));
}

foo(1,2);
Expand Down
10 changes: 5 additions & 5 deletions Zend/tests/022.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ Implementing abstracting methods and optional parameters

abstract class Base
{
abstract function someMethod($param);
abstract function someMethod($param);
}

class Ext extends Base
{
function someMethod($param = "default")
{
echo $param, "\n";
}
function someMethod($param = "default")
{
echo $param, "\n";
}
}

$a = new Ext();
Expand Down
16 changes: 8 additions & 8 deletions Zend/tests/023.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ print "\n";


class bar {
public function a() {
return "bar!";
}
public function a() {
return "bar!";
}
}

class foo {
public function test() {
print "foo!\n";
return new bar;
}
public function test() {
print "foo!\n";
return new bar;
}
}

function test() {
return new foo;
return new foo;
}

$a = 'test';
Expand Down
6 changes: 3 additions & 3 deletions Zend/tests/025.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Testing dynamic calls
<?php

class foo {
static public function a() {
print "ok\n";
}
static public function a() {
print "ok\n";
}
}

$a = 'a';
Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/026.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Trying assign value to property when an object is not returned in a function
<?php

class foo {
public function a() {
}
public function a() {
}
}

$test = new foo;
Expand Down
34 changes: 17 additions & 17 deletions Zend/tests/030.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@ Overriding $this in catch and checking the object properties later.
<?php

class foo {
public $test = 0;
private $test_2 = 1;
protected $test_3 = 2;
public $test = 0;
private $test_2 = 1;
protected $test_3 = 2;

public function bar() {
try {
throw new Exception('foo');
} catch (Exception $this) {
var_dump($this);
}
public function bar() {
try {
throw new Exception('foo');
} catch (Exception $this) {
var_dump($this);
}

$this->baz();
}
$this->baz();
}

public function baz() {
foreach ($this as $k => $v) {
printf("'%s' => '%s'\n", $k, $v);
}
print "ok\n";
}
public function baz() {
foreach ($this as $k => $v) {
printf("'%s' => '%s'\n", $k, $v);
}
print "ok\n";
}
}

$test = new foo;
Expand Down
Loading