summaryrefslogtreecommitdiff
path: root/tests/classes/array_access_003.phpt
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-02-03 22:52:20 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-02-03 22:52:20 +0100
commitf8d795820e780a6322e054c26c581570613c14f0 (patch)
tree99d3ae01ce564752807341c5743863b4c92513f8 /tests/classes/array_access_003.phpt
parentd2cb200e10ada6fa44c54a29292bb4665728fff0 (diff)
downloadphp-git-f8d795820e780a6322e054c26c581570613c14f0.tar.gz
Reindent phpt files
Diffstat (limited to 'tests/classes/array_access_003.phpt')
-rw-r--r--tests/classes/array_access_003.phpt56
1 files changed, 28 insertions, 28 deletions
diff --git a/tests/classes/array_access_003.phpt b/tests/classes/array_access_003.phpt
index 9fa2ee73e6..dbaaa6b192 100644
--- a/tests/classes/array_access_003.phpt
+++ b/tests/classes/array_access_003.phpt
@@ -6,35 +6,35 @@ error_reporting=4095
<?php
class ObjectOne implements ArrayAccess {
- public $a = array('1st', 1, 2=>'3rd', '4th'=>4);
+ public $a = array('1st', 1, 2=>'3rd', '4th'=>4);
- function offsetExists($index) {
- echo __METHOD__ . "($index)\n";
- return array_key_exists($index, $this->a);
- }
- function offsetGet($index) {
- echo __METHOD__ . "($index)\n";
- switch($index) {
- case 1:
- $a = 'foo';
- return $a . 'Bar';
- case 2:
- static $a=1;
- return $a;
- }
- return $this->a[$index];
- }
- function offsetSet($index, $newval) {
- echo __METHOD__ . "($index,$newval)\n";
- if ($index==3) {
- $this->cnt = $newval;
- }
- return $this->a[$index] = $newval;
- }
- function offsetUnset($index) {
- echo __METHOD__ . "($index)\n";
- unset($this->a[$index]);
- }
+ function offsetExists($index) {
+ echo __METHOD__ . "($index)\n";
+ return array_key_exists($index, $this->a);
+ }
+ function offsetGet($index) {
+ echo __METHOD__ . "($index)\n";
+ switch($index) {
+ case 1:
+ $a = 'foo';
+ return $a . 'Bar';
+ case 2:
+ static $a=1;
+ return $a;
+ }
+ return $this->a[$index];
+ }
+ function offsetSet($index, $newval) {
+ echo __METHOD__ . "($index,$newval)\n";
+ if ($index==3) {
+ $this->cnt = $newval;
+ }
+ return $this->a[$index] = $newval;
+ }
+ function offsetUnset($index) {
+ echo __METHOD__ . "($index)\n";
+ unset($this->a[$index]);
+ }
}
$obj = new ObjectOne;