Skip to content

Commit

Permalink
Reindent phpt files
Browse files Browse the repository at this point in the history
nikic committed Feb 3, 2020

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent d2cb200 commit f8d7958
Showing 5,414 changed files with 78,610 additions and 78,610 deletions.
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
@@ -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);
32 changes: 16 additions & 16 deletions Zend/tests/002.phpt
Original file line number Diff line number Diff line change
@@ -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);
20 changes: 10 additions & 10 deletions Zend/tests/003.phpt
Original file line number Diff line number Diff line change
@@ -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);
6 changes: 3 additions & 3 deletions Zend/tests/009.phpt
Original file line number Diff line number Diff line change
@@ -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 {
14 changes: 7 additions & 7 deletions Zend/tests/010.phpt
Original file line number Diff line number Diff line change
@@ -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;
26 changes: 13 additions & 13 deletions Zend/tests/011.phpt
Original file line number Diff line number Diff line change
@@ -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"));
4 changes: 2 additions & 2 deletions Zend/tests/020.phpt
Original file line number Diff line number Diff line change
@@ -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);
10 changes: 5 additions & 5 deletions Zend/tests/022.phpt
Original file line number Diff line number Diff line change
@@ -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();
16 changes: 8 additions & 8 deletions Zend/tests/023.phpt
Original file line number Diff line number Diff line change
@@ -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';
6 changes: 3 additions & 3 deletions Zend/tests/025.phpt
Original file line number Diff line number Diff line change
@@ -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';
4 changes: 2 additions & 2 deletions Zend/tests/026.phpt
Original file line number Diff line number Diff line change
@@ -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;
34 changes: 17 additions & 17 deletions Zend/tests/030.phpt
Original file line number Diff line number Diff line change
@@ -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;
Loading

0 comments on commit f8d7958

Please sign in to comment.