summaryrefslogtreecommitdiff
path: root/ext/reflection/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ext/reflection/tests')
-rw-r--r--ext/reflection/tests/001.phpt28
-rw-r--r--ext/reflection/tests/002.phpt18
-rw-r--r--ext/reflection/tests/003.phpt16
-rw-r--r--ext/reflection/tests/004.phpt4
-rw-r--r--ext/reflection/tests/005.phpt16
-rw-r--r--ext/reflection/tests/006.phpt102
-rw-r--r--ext/reflection/tests/007.phpt114
-rw-r--r--ext/reflection/tests/008.phpt20
-rw-r--r--ext/reflection/tests/009.phpt2
-rw-r--r--ext/reflection/tests/010.phpt8
-rw-r--r--ext/reflection/tests/012.phpt2
-rw-r--r--ext/reflection/tests/017.phpt2
-rw-r--r--ext/reflection/tests/020.phpt14
-rw-r--r--ext/reflection/tests/021.phpt2
-rw-r--r--ext/reflection/tests/022.phpt2
-rw-r--r--ext/reflection/tests/023.phpt12
-rw-r--r--ext/reflection/tests/024.phpt6
-rw-r--r--ext/reflection/tests/025.phpt2
-rw-r--r--ext/reflection/tests/027.phpt6
-rw-r--r--ext/reflection/tests/028.phpt6
-rw-r--r--ext/reflection/tests/ReflectionClass_constructor_001.phpt8
-rw-r--r--ext/reflection/tests/ReflectionClass_constructor_002.phpt28
-rw-r--r--ext/reflection/tests/ReflectionClass_export_array_bug72222.phpt4
-rw-r--r--ext/reflection/tests/ReflectionClass_export_basic1.phpt18
-rw-r--r--ext/reflection/tests/ReflectionClass_export_basic2.phpt4
-rw-r--r--ext/reflection/tests/ReflectionClass_getConstant_basic.phpt12
-rw-r--r--ext/reflection/tests/ReflectionClass_getConstant_error.phpt2
-rw-r--r--ext/reflection/tests/ReflectionClass_getConstants_basic.phpt10
-rw-r--r--ext/reflection/tests/ReflectionClass_getConstructor_basic.phpt16
-rw-r--r--ext/reflection/tests/ReflectionClass_getDefaultProperties_001.phpt82
-rw-r--r--ext/reflection/tests/ReflectionClass_getDocComment_001.phpt6
-rw-r--r--ext/reflection/tests/ReflectionClass_getExtensionName_basic.phpt4
-rw-r--r--ext/reflection/tests/ReflectionClass_getExtensionName_variation.phpt14
-rw-r--r--ext/reflection/tests/ReflectionClass_getExtension_basic.phpt4
-rw-r--r--ext/reflection/tests/ReflectionClass_getExtension_variation.phpt14
-rw-r--r--ext/reflection/tests/ReflectionClass_getInterfaces_001.phpt16
-rw-r--r--ext/reflection/tests/ReflectionClass_getMethod_001.phpt42
-rw-r--r--ext/reflection/tests/ReflectionClass_getMethod_002.phpt34
-rw-r--r--ext/reflection/tests/ReflectionClass_getMethods_001.phpt20
-rw-r--r--ext/reflection/tests/ReflectionClass_getMethods_003.phpt16
-rw-r--r--ext/reflection/tests/ReflectionClass_getModifierNames_basic.phpt36
-rw-r--r--ext/reflection/tests/ReflectionClass_getModifiers_basic.phpt4
-rw-r--r--ext/reflection/tests/ReflectionClass_getName_basic.phpt8
-rw-r--r--ext/reflection/tests/ReflectionClass_getProperties_001.phpt20
-rw-r--r--ext/reflection/tests/ReflectionClass_getProperties_003.phpt16
-rw-r--r--ext/reflection/tests/ReflectionClass_getProperty_001.phpt66
-rw-r--r--ext/reflection/tests/ReflectionClass_getProperty_002.phpt34
-rw-r--r--ext/reflection/tests/ReflectionClass_getProperty_003.phpt66
-rw-r--r--ext/reflection/tests/ReflectionClass_getProperty_004.phpt66
-rw-r--r--ext/reflection/tests/ReflectionClass_getStaticPropertyValue_001.phpt24
-rw-r--r--ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt22
-rw-r--r--ext/reflection/tests/ReflectionClass_hasConstant_001.phpt2
-rw-r--r--ext/reflection/tests/ReflectionClass_hasConstant_002.phpt2
-rw-r--r--ext/reflection/tests/ReflectionClass_hasMethod_001.phpt34
-rw-r--r--ext/reflection/tests/ReflectionClass_hasMethod_002.phpt2
-rw-r--r--ext/reflection/tests/ReflectionClass_hasProperty_001.phpt34
-rw-r--r--ext/reflection/tests/ReflectionClass_hasProperty_002.phpt2
-rw-r--r--ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt52
-rw-r--r--ext/reflection/tests/ReflectionClass_isCloneable_001.phpt4
-rw-r--r--ext/reflection/tests/ReflectionClass_isInstance_basic.phpt16
-rw-r--r--ext/reflection/tests/ReflectionClass_isInstantiable_basic.phpt16
-rw-r--r--ext/reflection/tests/ReflectionClass_isInstantiable_variation.phpt12
-rw-r--r--ext/reflection/tests/ReflectionClass_isInternal_basic.phpt2
-rw-r--r--ext/reflection/tests/ReflectionClass_isIterateable_001.phpt20
-rw-r--r--ext/reflection/tests/ReflectionClass_isIterateable_basic.phpt20
-rw-r--r--ext/reflection/tests/ReflectionClass_isIterateable_variation1.phpt4
-rw-r--r--ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt20
-rw-r--r--ext/reflection/tests/ReflectionClass_isSubclassOf_basic.phpt16
-rw-r--r--ext/reflection/tests/ReflectionClass_isUserDefined_basic.phpt2
-rw-r--r--ext/reflection/tests/ReflectionClass_modifiers_001.phpt10
-rw-r--r--ext/reflection/tests/ReflectionClass_newInstanceArgs_001.phpt40
-rw-r--r--ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt6
-rw-r--r--ext/reflection/tests/ReflectionClass_newInstance_001.phpt44
-rw-r--r--ext/reflection/tests/ReflectionClass_setStaticPropertyValue_001.phpt24
-rw-r--r--ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt26
-rw-r--r--ext/reflection/tests/ReflectionClass_setStaticPropertyValue_003.phpt4
-rw-r--r--ext/reflection/tests/ReflectionClass_toString_002.phpt12
-rw-r--r--ext/reflection/tests/ReflectionClass_toString_003.phpt12
-rw-r--r--ext/reflection/tests/ReflectionExtension_constructor_error.phpt12
-rw-r--r--ext/reflection/tests/ReflectionFunction_001.phpt22
-rw-r--r--ext/reflection/tests/ReflectionFunction_construct.001.phpt22
-rw-r--r--ext/reflection/tests/ReflectionFunction_getClosureScopeClass.phpt6
-rw-r--r--ext/reflection/tests/ReflectionFunction_getClosure_basic.phpt4
-rw-r--r--ext/reflection/tests/ReflectionFunction_getDocComment.001.phpt12
-rw-r--r--ext/reflection/tests/ReflectionFunction_getFileName.002.phpt12
-rw-r--r--ext/reflection/tests/ReflectionFunction_isGenerator_basic.phpt18
-rw-r--r--ext/reflection/tests/ReflectionGenerator_basic.phpt38
-rw-r--r--ext/reflection/tests/ReflectionGenerator_getTrace.phpt4
-rw-r--r--ext/reflection/tests/ReflectionGenerator_in_Generator.phpt34
-rw-r--r--ext/reflection/tests/ReflectionMethod_006.phpt8
-rw-r--r--ext/reflection/tests/ReflectionMethod_constructor_error1.phpt48
-rw-r--r--ext/reflection/tests/ReflectionMethod_constructor_error2.phpt30
-rw-r--r--ext/reflection/tests/ReflectionMethod_defaultArg.phpt6
-rw-r--r--ext/reflection/tests/ReflectionMethod_getClosureThis.phpt18
-rw-r--r--ext/reflection/tests/ReflectionMethod_getClosure_basic.phpt18
-rw-r--r--ext/reflection/tests/ReflectionMethod_getClosure_error.phpt18
-rw-r--r--ext/reflection/tests/ReflectionMethod_getDocComment_basic.phpt2
-rw-r--r--ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt6
-rw-r--r--ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt8
-rw-r--r--ext/reflection/tests/ReflectionMethod_invoke_basic.phpt12
-rw-r--r--ext/reflection/tests/ReflectionNamedType.phpt4
-rw-r--r--ext/reflection/tests/ReflectionObject___toString_basic1.phpt2
-rw-r--r--ext/reflection/tests/ReflectionObject___toString_basic2.phpt2
-rw-r--r--ext/reflection/tests/ReflectionObject_export_basic1.phpt2
-rw-r--r--ext/reflection/tests/ReflectionObject_export_basic2.phpt2
-rw-r--r--ext/reflection/tests/ReflectionObject_export_basic3.phpt2
-rw-r--r--ext/reflection/tests/ReflectionObject_getConstant_basic.phpt12
-rw-r--r--ext/reflection/tests/ReflectionObject_getConstants_basic.phpt10
-rw-r--r--ext/reflection/tests/ReflectionObject_getConstructor_basic.phpt26
-rw-r--r--ext/reflection/tests/ReflectionObject_isInstance_basic.phpt14
-rw-r--r--ext/reflection/tests/ReflectionObject_isInstantiable_basic.phpt16
-rw-r--r--ext/reflection/tests/ReflectionObject_isInstantiable_variation.phpt46
-rw-r--r--ext/reflection/tests/ReflectionObject_isInternal_basic.phpt2
-rw-r--r--ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt20
-rw-r--r--ext/reflection/tests/ReflectionObject_isSubclassOf_basic.phpt30
-rw-r--r--ext/reflection/tests/ReflectionObject_isUserDefined_basic.phpt2
-rw-r--r--ext/reflection/tests/ReflectionParameter_001.phpt22
-rw-r--r--ext/reflection/tests/ReflectionParameter_002.phpt12
-rw-r--r--ext/reflection/tests/ReflectionParameter_003.phpt44
-rw-r--r--ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic1.phpt28
-rw-r--r--ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic2.phpt28
-rw-r--r--ext/reflection/tests/ReflectionParameter_DefaultValueConstant_error.phpt14
-rw-r--r--ext/reflection/tests/ReflectionParameter_export_basic.phpt4
-rw-r--r--ext/reflection/tests/ReflectionParameter_export_error2.phpt18
-rw-r--r--ext/reflection/tests/ReflectionParameter_export_error3.phpt4
-rw-r--r--ext/reflection/tests/ReflectionParameter_getDeclaringFunction_basic.phpt4
-rw-r--r--ext/reflection/tests/ReflectionParameter_getPosition_basic.phpt4
-rw-r--r--ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt14
-rw-r--r--ext/reflection/tests/ReflectionParameter_toString_basic.phpt4
-rw-r--r--ext/reflection/tests/ReflectionProperty_constructor_variation1.phpt38
-rw-r--r--ext/reflection/tests/ReflectionProperty_error.phpt12
-rw-r--r--ext/reflection/tests/ReflectionProperty_getModifiers.001.phpt16
-rw-r--r--ext/reflection/tests/ReflectionProperty_isInitialized.phpt12
-rw-r--r--ext/reflection/tests/ReflectionType_001.phpt22
-rw-r--r--ext/reflection/tests/bug26640.phpt16
-rw-r--r--ext/reflection/tests/bug29268.phpt12
-rw-r--r--ext/reflection/tests/bug29523.phpt18
-rw-r--r--ext/reflection/tests/bug29828.phpt10
-rw-r--r--ext/reflection/tests/bug30209.phpt24
-rw-r--r--ext/reflection/tests/bug31651.phpt2
-rw-r--r--ext/reflection/tests/bug32981.phpt12
-rw-r--r--ext/reflection/tests/bug36434.phpt18
-rw-r--r--ext/reflection/tests/bug37816.phpt6
-rw-r--r--ext/reflection/tests/bug37964.phpt18
-rw-r--r--ext/reflection/tests/bug38132.phpt4
-rw-r--r--ext/reflection/tests/bug38217.phpt14
-rw-r--r--ext/reflection/tests/bug38653.phpt6
-rw-r--r--ext/reflection/tests/bug39001.phpt4
-rw-r--r--ext/reflection/tests/bug39067.phpt10
-rw-r--r--ext/reflection/tests/bug40431.phpt2
-rw-r--r--ext/reflection/tests/bug40794.phpt2
-rw-r--r--ext/reflection/tests/bug41884.phpt4
-rw-r--r--ext/reflection/tests/bug42976.phpt6
-rw-r--r--ext/reflection/tests/bug45139.phpt14
-rw-r--r--ext/reflection/tests/bug45571.phpt10
-rw-r--r--ext/reflection/tests/bug45765.phpt20
-rw-r--r--ext/reflection/tests/bug46064.phpt20
-rw-r--r--ext/reflection/tests/bug46064_2.phpt22
-rw-r--r--ext/reflection/tests/bug46205.phpt2
-rw-r--r--ext/reflection/tests/bug47254.phpt4
-rw-r--r--ext/reflection/tests/bug48757.phpt4
-rw-r--r--ext/reflection/tests/bug49074.phpt8
-rw-r--r--ext/reflection/tests/bug49719.phpt22
-rw-r--r--ext/reflection/tests/bug51905.phpt6
-rw-r--r--ext/reflection/tests/bug52854.phpt4
-rw-r--r--ext/reflection/tests/bug53915.phpt4
-rw-r--r--ext/reflection/tests/bug60367.phpt10
-rw-r--r--ext/reflection/tests/bug64239.phpt6
-rw-r--r--ext/reflection/tests/bug64936.phpt4
-rw-r--r--ext/reflection/tests/bug66430.phpt8
-rw-r--r--ext/reflection/tests/bug70982.phpt10
-rw-r--r--ext/reflection/tests/bug74454.inc2
-rw-r--r--ext/reflection/tests/bug74454.phpt6
-rw-r--r--ext/reflection/tests/bug74673.phpt6
-rw-r--r--ext/reflection/tests/bug74949.phpt4
-rw-r--r--ext/reflection/tests/bug77882.phpt2
-rw-r--r--ext/reflection/tests/bug78895.phpt12
-rw-r--r--ext/reflection/tests/closures_001.phpt8
-rw-r--r--ext/reflection/tests/closures_002.phpt2
-rw-r--r--ext/reflection/tests/included4.inc4
-rw-r--r--ext/reflection/tests/parameters_001.phpt10
-rw-r--r--ext/reflection/tests/parameters_002.phpt72
-rw-r--r--ext/reflection/tests/property_exists.phpt92
-rw-r--r--ext/reflection/tests/static_properties_002.phpt32
-rw-r--r--ext/reflection/tests/union_types.phpt2
185 files changed, 1503 insertions, 1503 deletions
diff --git a/ext/reflection/tests/001.phpt b/ext/reflection/tests/001.phpt
index 266a1ef5ff..d476013653 100644
--- a/ext/reflection/tests/001.phpt
+++ b/ext/reflection/tests/001.phpt
@@ -5,17 +5,17 @@ Reflection inheritance
class ReflectionClassEx extends ReflectionClass
{
- public $bla;
+ public $bla;
- function getMethodNames()
- {
- $res = array();
- foreach($this->getMethods() as $m)
- {
- $res[] = $m->class . '::' . $m->name;
- }
- return $res;
- }
+ function getMethodNames()
+ {
+ $res = array();
+ foreach($this->getMethods() as $m)
+ {
+ $res[] = $m->class . '::' . $m->name;
+ }
+ return $res;
+ }
}
$r = new ReflectionClassEx('ReflectionClassEx');
@@ -62,10 +62,10 @@ $res = $r->getMethodNames();
foreach($exp as $m)
{
- if (!in_array($m, $exp))
- {
- $miss[] = $m;
- }
+ if (!in_array($m, $exp))
+ {
+ $miss[] = $m;
+ }
}
var_dump($miss);
diff --git a/ext/reflection/tests/002.phpt b/ext/reflection/tests/002.phpt
index 6df97f0daa..b10013d2a9 100644
--- a/ext/reflection/tests/002.phpt
+++ b/ext/reflection/tests/002.phpt
@@ -5,13 +5,13 @@ Reflection properties are read only
class ReflectionMethodEx extends ReflectionMethod
{
- public $foo = "xyz";
+ public $foo = "xyz";
- function __construct($c,$m)
- {
- echo __METHOD__ . "\n";
- parent::__construct($c,$m);
- }
+ function __construct($c,$m)
+ {
+ echo __METHOD__ . "\n";
+ parent::__construct($c,$m);
+ }
}
$r = new ReflectionMethodEx('ReflectionMethodEx','getName');
@@ -23,11 +23,11 @@ var_dump($r->foo);
try
{
- $r->class = 'bullshit';
+ $r->class = 'bullshit';
}
catch(ReflectionException $e)
{
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try
{
@@ -35,7 +35,7 @@ $r->name = 'bullshit';
}
catch(ReflectionException $e)
{
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
$r->foo = 'bar';
diff --git a/ext/reflection/tests/003.phpt b/ext/reflection/tests/003.phpt
index 8c37d539ac..dbafebfb8d 100644
--- a/ext/reflection/tests/003.phpt
+++ b/ext/reflection/tests/003.phpt
@@ -5,18 +5,18 @@ ReflectionMethod::invoke() with base class method
class Foo
{
- function Test()
- {
- echo __METHOD__ . "\n";
- }
+ function Test()
+ {
+ echo __METHOD__ . "\n";
+ }
}
class Bar extends Foo
{
- function Test()
- {
- echo __METHOD__ . "\n";
- }
+ function Test()
+ {
+ echo __METHOD__ . "\n";
+ }
}
$o = new Bar;
diff --git a/ext/reflection/tests/004.phpt b/ext/reflection/tests/004.phpt
index 924c3fe283..3739d2e55c 100644
--- a/ext/reflection/tests/004.phpt
+++ b/ext/reflection/tests/004.phpt
@@ -4,8 +4,8 @@ ReflectionMethod::invoke() with non object or null value
<?php
class a {
- function __construct(){
- }
+ function __construct(){
+ }
}
class b {
}
diff --git a/ext/reflection/tests/005.phpt b/ext/reflection/tests/005.phpt
index cb099129e7..58411f98c8 100644
--- a/ext/reflection/tests/005.phpt
+++ b/ext/reflection/tests/005.phpt
@@ -7,18 +7,18 @@ opcache.save_comments=1
function strip_doc_comment($c)
{
- if (!strlen($c) || $c === false) return $c;
- return trim(substr($c, 3, -2));
+ if (!strlen($c) || $c === false) return $c;
+ return trim(substr($c, 3, -2));
}
/** Comment for class A */
class A
{
- /** Method A::bla()
- */
- function bla()
- {
- }
+ /** Method A::bla()
+ */
+ function bla()
+ {
+ }
function foo() {
/**
@@ -42,7 +42,7 @@ var_dump(strip_doc_comment($r->getDocComment()));
foreach($r->getMethods() as $m)
{
- var_dump(strip_doc_comment($m->getDocComment()));
+ var_dump(strip_doc_comment($m->getDocComment()));
}
?>
diff --git a/ext/reflection/tests/006.phpt b/ext/reflection/tests/006.phpt
index 28d4cc592b..c21aa5af8b 100644
--- a/ext/reflection/tests/006.phpt
+++ b/ext/reflection/tests/006.phpt
@@ -9,73 +9,73 @@ ReflectionClass::[gs]etStaticPropertyValue
Class Test
{
- static public $pub = 'pub';
- static protected $pro = 'pro';
- static private $pri = 'pri';
+ static public $pub = 'pub';
+ static protected $pro = 'pro';
+ static private $pri = 'pri';
- static function testing()
- {
- $ref = new ReflectionClass('Test');
+ static function testing()
+ {
+ $ref = new ReflectionClass('Test');
- foreach(array('pub', 'pro', 'pri') as $name)
- {
- try
- {
- var_dump($ref->getStaticPropertyValue($name));
- var_dump($ref->getStaticPropertyValue($name));
- $ref->setStaticPropertyValue($name, 'updated');
- var_dump($ref->getStaticPropertyValue($name));
- }
- catch(Exception $e)
- {
- echo "EXCEPTION\n";
- }
- }
- }
+ foreach(array('pub', 'pro', 'pri') as $name)
+ {
+ try
+ {
+ var_dump($ref->getStaticPropertyValue($name));
+ var_dump($ref->getStaticPropertyValue($name));
+ $ref->setStaticPropertyValue($name, 'updated');
+ var_dump($ref->getStaticPropertyValue($name));
+ }
+ catch(Exception $e)
+ {
+ echo "EXCEPTION\n";
+ }
+ }
+ }
}
Class TestDerived extends Test
{
// static public $pub = 'pub';
// static protected $pro = 'pro';
- static private $pri = 'pri';
+ static private $pri = 'pri';
- static function testing()
- {
- $ref = new ReflectionClass('Test');
+ static function testing()
+ {
+ $ref = new ReflectionClass('Test');
- foreach(array('pub', 'pro', 'pri') as $name)
- {
- try
- {
- var_dump($ref->getStaticPropertyValue($name));
- var_dump($ref->getStaticPropertyValue($name));
- $ref->setStaticPropertyValue($name, 'updated');
- var_dump($ref->getStaticPropertyValue($name));
- }
- catch(Exception $e)
- {
- echo "EXCEPTION\n";
- }
- }
- }
+ foreach(array('pub', 'pro', 'pri') as $name)
+ {
+ try
+ {
+ var_dump($ref->getStaticPropertyValue($name));
+ var_dump($ref->getStaticPropertyValue($name));
+ $ref->setStaticPropertyValue($name, 'updated');
+ var_dump($ref->getStaticPropertyValue($name));
+ }
+ catch(Exception $e)
+ {
+ echo "EXCEPTION\n";
+ }
+ }
+ }
}
$ref = new ReflectionClass('Test');
foreach(array('pub', 'pro', 'pri') as $name)
{
- try
- {
- var_dump($ref->getStaticPropertyValue($name));
- var_dump($ref->getStaticPropertyValue($name));
- $ref->setStaticPropertyValue($name, 'updated');
- var_dump($ref->getStaticPropertyValue($name));
- }
- catch(Exception $e)
- {
- echo "EXCEPTION\n";
- }
+ try
+ {
+ var_dump($ref->getStaticPropertyValue($name));
+ var_dump($ref->getStaticPropertyValue($name));
+ $ref->setStaticPropertyValue($name, 'updated');
+ var_dump($ref->getStaticPropertyValue($name));
+ }
+ catch(Exception $e)
+ {
+ echo "EXCEPTION\n";
+ }
}
Test::testing();
diff --git a/ext/reflection/tests/007.phpt b/ext/reflection/tests/007.phpt
index 57e3ee47fe..df1d97eea9 100644
--- a/ext/reflection/tests/007.phpt
+++ b/ext/reflection/tests/007.phpt
@@ -5,56 +5,56 @@ ReflectionClass::newInstance[Args]
function test($class)
{
- echo "====>$class\n";
- try
- {
- $ref = new ReflectionClass($class);
- }
- catch (ReflectionException $e)
- {
- var_dump($e->getMessage());
- return; // only here
- }
-
- echo "====>newInstance()\n";
- try
- {
- var_dump($ref->newInstance());
- }
- catch (ReflectionException $e)
- {
- var_dump($e->getMessage());
- }
- catch (Throwable $e)
- {
- echo "Exception: " . $e->getMessage() . "\n";
- }
-
- echo "====>newInstance(25)\n";
- try
- {
- var_dump($ref->newInstance(25));
- }
- catch (ReflectionException $e)
- {
- var_dump($e->getMessage());
- }
-
- echo "====>newInstance(25, 42)\n";
- try
- {
- var_dump($ref->newInstance(25, 42));
- }
- catch (ReflectionException $e)
- {
- var_dump($e->getMessage());
- }
-
- echo "\n";
+ echo "====>$class\n";
+ try
+ {
+ $ref = new ReflectionClass($class);
+ }
+ catch (ReflectionException $e)
+ {
+ var_dump($e->getMessage());
+ return; // only here
+ }
+
+ echo "====>newInstance()\n";
+ try
+ {
+ var_dump($ref->newInstance());
+ }
+ catch (ReflectionException $e)
+ {
+ var_dump($e->getMessage());
+ }
+ catch (Throwable $e)
+ {
+ echo "Exception: " . $e->getMessage() . "\n";
+ }
+
+ echo "====>newInstance(25)\n";
+ try
+ {
+ var_dump($ref->newInstance(25));
+ }
+ catch (ReflectionException $e)
+ {
+ var_dump($e->getMessage());
+ }
+
+ echo "====>newInstance(25, 42)\n";
+ try
+ {
+ var_dump($ref->newInstance(25, 42));
+ }
+ catch (ReflectionException $e)
+ {
+ var_dump($e->getMessage());
+ }
+
+ echo "\n";
}
spl_autoload_register(function ($class) {
- echo __FUNCTION__ . "($class)\n";
+ echo __FUNCTION__ . "($class)\n";
});
test('Class_does_not_exist');
@@ -67,22 +67,22 @@ test('NoCtor');
Class WithCtor
{
- function __construct()
- {
- echo __METHOD__ . "()\n";
- var_dump(func_get_args());
- }
+ function __construct()
+ {
+ echo __METHOD__ . "()\n";
+ var_dump(func_get_args());
+ }
}
test('WithCtor');
Class WithCtorWithArgs
{
- function __construct($arg)
- {
- echo __METHOD__ . "($arg)\n";
- var_dump(func_get_args());
- }
+ function __construct($arg)
+ {
+ echo __METHOD__ . "($arg)\n";
+ var_dump(func_get_args());
+ }
}
test('WithCtorWithArgs');
diff --git a/ext/reflection/tests/008.phpt b/ext/reflection/tests/008.phpt
index 80a4a39218..10806b0015 100644
--- a/ext/reflection/tests/008.phpt
+++ b/ext/reflection/tests/008.phpt
@@ -6,22 +6,22 @@ ReflectionMethod::__construct() tests
$a = array("", 1, "::", "a::", "::b", "a::b");
foreach ($a as $val) {
- try {
- new ReflectionMethod($val);
- } catch (Exception $e) {
- var_dump($e->getMessage());
- }
+ try {
+ new ReflectionMethod($val);
+ } catch (Exception $e) {
+ var_dump($e->getMessage());
+ }
}
$a = array("", 1, "");
$b = array("", "", 1);
foreach ($a as $key=>$val) {
- try {
- new ReflectionMethod($val, $b[$key]);
- } catch (Exception $e) {
- var_dump($e->getMessage());
- }
+ try {
+ new ReflectionMethod($val, $b[$key]);
+ } catch (Exception $e) {
+ var_dump($e->getMessage());
+ }
}
echo "Done\n";
diff --git a/ext/reflection/tests/009.phpt b/ext/reflection/tests/009.phpt
index d582623cbd..8a57ed9d1d 100644
--- a/ext/reflection/tests/009.phpt
+++ b/ext/reflection/tests/009.phpt
@@ -9,7 +9,7 @@ opcache.save_comments=1
hoho
*/
function test ($a, $b = 1, $c = "") {
- static $var = 1;
+ static $var = 1;
}
$func = new ReflectionFunction("test");
diff --git a/ext/reflection/tests/010.phpt b/ext/reflection/tests/010.phpt
index ae667b65ab..ae1e4dff0b 100644
--- a/ext/reflection/tests/010.phpt
+++ b/ext/reflection/tests/010.phpt
@@ -3,12 +3,12 @@ ReflectionMethod::__toString() tests (overridden method)
--FILE--
<?php
class Foo {
- function func() {
- }
+ function func() {
+ }
}
class Bar extends Foo {
- function func() {
- }
+ function func() {
+ }
}
$m = new ReflectionMethod("Bar::func");
echo $m;
diff --git a/ext/reflection/tests/012.phpt b/ext/reflection/tests/012.phpt
index d2d1c5f384..4eeeb98f3d 100644
--- a/ext/reflection/tests/012.phpt
+++ b/ext/reflection/tests/012.phpt
@@ -3,7 +3,7 @@ ReflectionClass::getDefaultProperties()
--FILE--
<?php
class Foo {
- public $test = "ok";
+ public $test = "ok";
}
$class = new ReflectionClass("Foo");
$props = $class->getDefaultProperties();
diff --git a/ext/reflection/tests/017.phpt b/ext/reflection/tests/017.phpt
index 322065bf20..be306b53c6 100644
--- a/ext/reflection/tests/017.phpt
+++ b/ext/reflection/tests/017.phpt
@@ -3,7 +3,7 @@ ReflectionClass::__toString() (constants)
--FILE--
<?php
class Foo {
- const test = "ok";
+ const test = "ok";
}
$class = new ReflectionClass("Foo");
echo $class;
diff --git a/ext/reflection/tests/020.phpt b/ext/reflection/tests/020.phpt
index 13ae6fe275..491eed7d1f 100644
--- a/ext/reflection/tests/020.phpt
+++ b/ext/reflection/tests/020.phpt
@@ -3,14 +3,14 @@ ReflectionObject::hasProperty
--FILE--
<?php
class Foo {
- public $p1;
- protected $p2;
- private $p3;
+ public $p1;
+ protected $p2;
+ private $p3;
- function __isset($name) {
- var_dump($name);
- return false;
- }
+ function __isset($name) {
+ var_dump($name);
+ return false;
+ }
}
$obj = new ReflectionObject(new Foo());
var_dump($obj->hasProperty("p1"));
diff --git a/ext/reflection/tests/021.phpt b/ext/reflection/tests/021.phpt
index 42d11cc445..fefcf34e78 100644
--- a/ext/reflection/tests/021.phpt
+++ b/ext/reflection/tests/021.phpt
@@ -3,7 +3,7 @@ ReflectionClass::hasConstant
--FILE--
<?php
class Foo {
- const c1 = 1;
+ const c1 = 1;
}
$class = new ReflectionClass("Foo");
var_dump($class->hasConstant("c1"));
diff --git a/ext/reflection/tests/022.phpt b/ext/reflection/tests/022.phpt
index 2cfd603dad..4a6738f97c 100644
--- a/ext/reflection/tests/022.phpt
+++ b/ext/reflection/tests/022.phpt
@@ -3,7 +3,7 @@ ReflectionClass::getConstant
--FILE--
<?php
class Foo {
- const c1 = 1;
+ const c1 = 1;
}
$class = new ReflectionClass("Foo");
var_dump($class->getConstant("c1"));
diff --git a/ext/reflection/tests/023.phpt b/ext/reflection/tests/023.phpt
index fe10b2531a..7f8c500015 100644
--- a/ext/reflection/tests/023.phpt
+++ b/ext/reflection/tests/023.phpt
@@ -3,14 +3,14 @@ ReflectionClass::getDefaultProperties (filtering parent privates)
--FILE--
<?php
class C1 {
- private $p1 = 1;
- protected $p2 = 2;
- public $p3 = 3;
+ private $p1 = 1;
+ protected $p2 = 2;
+ public $p3 = 3;
}
class C2 extends C1 {
- private $p4 = 4;
- protected $p5 = 5;
- public $p6 = 6;
+ private $p4 = 4;
+ protected $p5 = 5;
+ public $p6 = 6;
}
$class = new ReflectionClass("C2");
var_dump($class->getDefaultProperties());
diff --git a/ext/reflection/tests/024.phpt b/ext/reflection/tests/024.phpt
index 2b894d3f31..0fb1cd6fe2 100644
--- a/ext/reflection/tests/024.phpt
+++ b/ext/reflection/tests/024.phpt
@@ -3,9 +3,9 @@ ReflectionObject::__toString (filtering privates/protected dynamic properties)
--FILE--
<?php
class C1 {
- private $p1 = 1;
- protected $p2 = 2;
- public $p3 = 3;
+ private $p1 = 1;
+ protected $p2 = 2;
+ public $p3 = 3;
}
$x = new C1();
diff --git a/ext/reflection/tests/025.phpt b/ext/reflection/tests/025.phpt
index c18a0f5b8e..2e3316d3c0 100644
--- a/ext/reflection/tests/025.phpt
+++ b/ext/reflection/tests/025.phpt
@@ -9,7 +9,7 @@ opcache.save_comments=1
hoho
*/
function test ($a, $b = 1, $c = "") {
- static $var = 1;
+ static $var = 1;
}
$func = new ReflectionFunction("test");
diff --git a/ext/reflection/tests/027.phpt b/ext/reflection/tests/027.phpt
index e750682ab6..add38f1476 100644
--- a/ext/reflection/tests/027.phpt
+++ b/ext/reflection/tests/027.phpt
@@ -4,7 +4,7 @@ ReflectionGenerator::getTrace()
<?php
function foo()
{
- yield 1;
+ yield 1;
}
$g = foo();
@@ -13,9 +13,9 @@ $r = new ReflectionGenerator($g);
$g->next();
try {
- $r->getTrace();
+ $r->getTrace();
} catch (ReflectionException $e) {
- echo $e->getMessage();
+ echo $e->getMessage();
}
?>
--EXPECT--
diff --git a/ext/reflection/tests/028.phpt b/ext/reflection/tests/028.phpt
index ed6950fce3..bf16785c18 100644
--- a/ext/reflection/tests/028.phpt
+++ b/ext/reflection/tests/028.phpt
@@ -4,16 +4,16 @@ ReflectionGenerator::__construct()
<?php
function foo()
{
- yield 1;
+ yield 1;
}
$g = foo();
$g->next();
try {
- $r = new ReflectionGenerator($g);
+ $r = new ReflectionGenerator($g);
} catch (ReflectionException $e) {
- echo "Done!\n";
+ echo "Done!\n";
}
?>
--EXPECT--
diff --git a/ext/reflection/tests/ReflectionClass_constructor_001.phpt b/ext/reflection/tests/ReflectionClass_constructor_001.phpt
index 1a70fe1f59..0d4fa670c3 100644
--- a/ext/reflection/tests/ReflectionClass_constructor_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_constructor_001.phpt
@@ -8,10 +8,10 @@ $myInstance = new stdClass;
$r2 = new ReflectionClass($myInstance);
class TrickClass {
- function __toString() {
- //Return the name of another class
- return "Exception";
- }
+ function __toString() {
+ //Return the name of another class
+ return "Exception";
+ }
}
$myTrickClass = new TrickClass;
$r3 = new ReflectionClass($myTrickClass);
diff --git a/ext/reflection/tests/ReflectionClass_constructor_002.phpt b/ext/reflection/tests/ReflectionClass_constructor_002.phpt
index 7d8a312f51..3744fec06c 100644
--- a/ext/reflection/tests/ReflectionClass_constructor_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_constructor_002.phpt
@@ -3,45 +3,45 @@ ReflectionClass::__constructor() - bad arguments
--FILE--
<?php
try {
- var_dump(new ReflectionClass());
+ var_dump(new ReflectionClass());
} catch (TypeError $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump(new ReflectionClass(null));
+ var_dump(new ReflectionClass(null));
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump(new ReflectionClass(true));
+ var_dump(new ReflectionClass(true));
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump(new ReflectionClass(1));
+ var_dump(new ReflectionClass(1));
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump(new ReflectionClass(array(1,2,3)));
+ var_dump(new ReflectionClass(array(1,2,3)));
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump(new ReflectionClass("stdClass", 1));
+ var_dump(new ReflectionClass("stdClass", 1));
} catch (TypeError $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump(new ReflectionClass("X"));
+ var_dump(new ReflectionClass("X"));
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
?>
diff --git a/ext/reflection/tests/ReflectionClass_export_array_bug72222.phpt b/ext/reflection/tests/ReflectionClass_export_array_bug72222.phpt
index 80d2be2585..2e050af209 100644
--- a/ext/reflection/tests/ReflectionClass_export_array_bug72222.phpt
+++ b/ext/reflection/tests/ReflectionClass_export_array_bug72222.phpt
@@ -3,8 +3,8 @@ ReflectionClass::__toString() - array constants
--FILE--
<?php
Class A {
- const A = 8;
- const B = ["a", "b"];
+ const A = 8;
+ const B = ["a", "b"];
}
echo new ReflectionClass("A"), "\n";
?>
diff --git a/ext/reflection/tests/ReflectionClass_export_basic1.phpt b/ext/reflection/tests/ReflectionClass_export_basic1.phpt
index 784fc6a5fb..318e47b355 100644
--- a/ext/reflection/tests/ReflectionClass_export_basic1.phpt
+++ b/ext/reflection/tests/ReflectionClass_export_basic1.phpt
@@ -3,15 +3,15 @@ ReflectionClass::__toString() - various parameters
--FILE--
<?php
Class A {
- public function privf(Exception $a) {}
- public function pubf(A $a,
- $b,
- C $c = null,
- $d = K,
- $e = "15 chars long -",
- $f = null,
- $g = false,
- array $h = null) {}
+ public function privf(Exception $a) {}
+ public function pubf(A $a,
+ $b,
+ C $c = null,
+ $d = K,
+ $e = "15 chars long -",
+ $f = null,
+ $g = false,
+ array $h = null) {}
}
Class C extends A { }
diff --git a/ext/reflection/tests/ReflectionClass_export_basic2.phpt b/ext/reflection/tests/ReflectionClass_export_basic2.phpt
index 12cee4e6e3..c91c5d1d73 100644
--- a/ext/reflection/tests/ReflectionClass_export_basic2.phpt
+++ b/ext/reflection/tests/ReflectionClass_export_basic2.phpt
@@ -3,8 +3,8 @@ ReflectionClass::__toString() - ensure inherited private props are hidden.
--FILE--
<?php
Class c {
- private $a;
- static private $b;
+ private $a;
+ static private $b;
}
class d extends c {}
diff --git a/ext/reflection/tests/ReflectionClass_getConstant_basic.phpt b/ext/reflection/tests/ReflectionClass_getConstant_basic.phpt
index 59031a26ee..b8906b2070 100644
--- a/ext/reflection/tests/ReflectionClass_getConstant_basic.phpt
+++ b/ext/reflection/tests/ReflectionClass_getConstant_basic.phpt
@@ -3,24 +3,24 @@ ReflectionClass::getConstants()
--FILE--
<?php
class C {
- const a = 'hello from C';
+ const a = 'hello from C';
}
class D extends C {
}
class E extends D {
}
class F extends E {
- const a = 'hello from F';
+ const a = 'hello from F';
}
class X {
}
$classes = array("C", "D", "E", "F", "X");
foreach($classes as $class) {
- echo "Reflecting on class $class: \n";
- $rc = new ReflectionClass($class);
- var_dump($rc->getConstant('a'));
- var_dump($rc->getConstant('doesnotexist'));
+ echo "Reflecting on class $class: \n";
+ $rc = new ReflectionClass($class);
+ var_dump($rc->getConstant('a'));
+ var_dump($rc->getConstant('doesnotexist'));
}
?>
--EXPECT--
diff --git a/ext/reflection/tests/ReflectionClass_getConstant_error.phpt b/ext/reflection/tests/ReflectionClass_getConstant_error.phpt
index 020ac6f7f5..ca9bc0ce2d 100644
--- a/ext/reflection/tests/ReflectionClass_getConstant_error.phpt
+++ b/ext/reflection/tests/ReflectionClass_getConstant_error.phpt
@@ -3,7 +3,7 @@ ReflectionClass::getConstant() - bad params
--FILE--
<?php
class C {
- const myConst = 1;
+ const myConst = 1;
}
$rc = new ReflectionClass("C");
diff --git a/ext/reflection/tests/ReflectionClass_getConstants_basic.phpt b/ext/reflection/tests/ReflectionClass_getConstants_basic.phpt
index a9c0cd4225..c4d2c5267f 100644
--- a/ext/reflection/tests/ReflectionClass_getConstants_basic.phpt
+++ b/ext/reflection/tests/ReflectionClass_getConstants_basic.phpt
@@ -3,23 +3,23 @@ ReflectionClass::getConstants()
--FILE--
<?php
class C {
- const a = 'hello from C';
+ const a = 'hello from C';
}
class D extends C {
}
class E extends D {
}
class F extends E {
- const a = 'hello from F';
+ const a = 'hello from F';
}
class X {
}
$classes = array('C', 'D', 'E', 'F', 'X');
foreach($classes as $class) {
- echo "Constants from class $class: \n";
- $rc = new ReflectionClass($class);
- var_dump($rc->getConstants());
+ echo "Constants from class $class: \n";
+ $rc = new ReflectionClass($class);
+ var_dump($rc->getConstants());
}
?>
--EXPECT--
diff --git a/ext/reflection/tests/ReflectionClass_getConstructor_basic.phpt b/ext/reflection/tests/ReflectionClass_getConstructor_basic.phpt
index df6880aedb..bbf26e04a5 100644
--- a/ext/reflection/tests/ReflectionClass_getConstructor_basic.phpt
+++ b/ext/reflection/tests/ReflectionClass_getConstructor_basic.phpt
@@ -3,7 +3,7 @@ ReflectionClass::getConstructor()
--FILE--
<?php
class NewCtor {
- function __construct() {}
+ function __construct() {}
}
class ExtendsNewCtor extends NewCtor {
@@ -11,13 +11,13 @@ class ExtendsNewCtor extends NewCtor {
$classes = array('NewCtor', 'ExtendsNewCtor');
foreach ($classes as $class) {
- $rc = new ReflectionClass($class);
- $rm = $rc->getConstructor();
- if ($rm != null) {
- echo "Constructor of $class: " . $rm->getName() . "\n";
- } else {
- echo "No constructor for $class\n";
- }
+ $rc = new ReflectionClass($class);
+ $rm = $rc->getConstructor();
+ if ($rm != null) {
+ echo "Constructor of $class: " . $rm->getName() . "\n";
+ } else {
+ echo "No constructor for $class\n";
+ }
}
diff --git a/ext/reflection/tests/ReflectionClass_getDefaultProperties_001.phpt b/ext/reflection/tests/ReflectionClass_getDefaultProperties_001.phpt
index 3778adb403..0adbd34335 100644
--- a/ext/reflection/tests/ReflectionClass_getDefaultProperties_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_getDefaultProperties_001.phpt
@@ -8,68 +8,68 @@ Steve Seear <stevseea@php.net>
class A {
- static public $statPubC = "stat pubC in A";
- static protected $statProtC = "stat protC in A";
- static private $statPrivC = "stat privC in A";
+ static public $statPubC = "stat pubC in A";
+ static protected $statProtC = "stat protC in A";
+ static private $statPrivC = "stat privC in A";
- static public $statPubA = "stat pubA in A";
- static protected $statProtA = "stat protA in A";
- static private $statPrivA = "stat privA in A";
+ static public $statPubA = "stat pubA in A";
+ static protected $statProtA = "stat protA in A";
+ static private $statPrivA = "stat privA in A";
- public $pubC = "pubC in A";
- protected $protC = "protC in A";
- private $privC = "privC in A";
+ public $pubC = "pubC in A";
+ protected $protC = "protC in A";
+ private $privC = "privC in A";
- public $pubA = "pubA in A";
- protected $protA = "protA in A";
- private $privA = "privA in A";
+ public $pubA = "pubA in A";
+ protected $protA = "protA in A";
+ private $privA = "privA in A";
}
class B extends A {
- static public $statPubC = "stat pubC in B";
- static protected $statProtC = "stat protC in B";
- static private $statPrivC = "stat privC in B";
+ static public $statPubC = "stat pubC in B";
+ static protected $statProtC = "stat protC in B";
+ static private $statPrivC = "stat privC in B";
- static public $statPubB = "stat pubB in B";
- static protected $statProtB = "stat protB in B";
- static private $statPrivB = "stat privB in B";
+ static public $statPubB = "stat pubB in B";
+ static protected $statProtB = "stat protB in B";
+ static private $statPrivB = "stat privB in B";
- public $pubC = "pubC in B";
- protected $protC = "protC in B";
- private $privC = "privC in B";
+ public $pubC = "pubC in B";
+ protected $protC = "protC in B";
+ private $privC = "privC in B";
- public $pubB = "pubB in B";
- protected $protB = "protB in B";
- private $privB = "privB in B";
+ public $pubB = "pubB in B";
+ protected $protB = "protB in B";
+ private $privB = "privB in B";
}
class C extends B {
- static public $statPubC = "stat pubC in C";
- static protected $statProtC = "stat protC in C";
- static private $statPrivC = "stat privC in C";
+ static public $statPubC = "stat pubC in C";
+ static protected $statProtC = "stat protC in C";
+ static private $statPrivC = "stat privC in C";
- public $pubC = "pubC in C";
- protected $protC = "protC in C";
- private $privC = "privC in C";
+ public $pubC = "pubC in C";
+ protected $protC = "protC in C";
+ private $privC = "privC in C";
}
class X {
- static public $statPubC = "stat pubC in X";
- static protected $statProtC = "stat protC in X";
- static private $statPrivC = "stat privC in X";
+ static public $statPubC = "stat pubC in X";
+ static protected $statProtC = "stat protC in X";
+ static private $statPrivC = "stat privC in X";
- public $pubC = "pubC in X";
- protected $protC = "protC in X";
- private $privC = "privC in X";
+ public $pubC = "pubC in X";
+ protected $protC = "protC in X";
+ private $privC = "privC in X";
}
$classes = array('A', 'B', 'C', 'X');
foreach ($classes as $class) {
- $rc = new ReflectionClass($class);
- echo "\n\n---- Static properties in $class ----\n";
- print_r($rc->getStaticProperties());
- echo "\n\n---- Default properties in $class ----\n";
- print_r($rc->getDefaultProperties());
+ $rc = new ReflectionClass($class);
+ echo "\n\n---- Static properties in $class ----\n";
+ print_r($rc->getStaticProperties());
+ echo "\n\n---- Default properties in $class ----\n";
+ print_r($rc->getDefaultProperties());
}
?>
diff --git a/ext/reflection/tests/ReflectionClass_getDocComment_001.phpt b/ext/reflection/tests/ReflectionClass_getDocComment_001.phpt
index d4f3ed27f2..28b92abedb 100644
--- a/ext/reflection/tests/ReflectionClass_getDocComment_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_getDocComment_001.phpt
@@ -48,9 +48,9 @@ final class G extends C implements I {} {}
$classes = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'I');
foreach ($classes as $class) {
- echo "\n\n---> Doc comment for class $class:\n";
- $rc = new ReflectionClass($class);
- var_dump($rc->getDocComment());
+ echo "\n\n---> Doc comment for class $class:\n";
+ $rc = new ReflectionClass($class);
+ var_dump($rc->getDocComment());
}
diff --git a/ext/reflection/tests/ReflectionClass_getExtensionName_basic.phpt b/ext/reflection/tests/ReflectionClass_getExtensionName_basic.phpt
index 310b22e695..84e38b0802 100644
--- a/ext/reflection/tests/ReflectionClass_getExtensionName_basic.phpt
+++ b/ext/reflection/tests/ReflectionClass_getExtensionName_basic.phpt
@@ -7,8 +7,8 @@ Rein Velt <rein@velt.org>
#testFest Roosendaal 2008-05-10
--FILE--
<?php
- $rc=new reflectionClass('domDocument');
- var_dump( $rc->getExtensionName()) ;
+ $rc=new reflectionClass('domDocument');
+ var_dump( $rc->getExtensionName()) ;
?>
--EXPECT--
string(3) "dom"
diff --git a/ext/reflection/tests/ReflectionClass_getExtensionName_variation.phpt b/ext/reflection/tests/ReflectionClass_getExtensionName_variation.phpt
index 4f78343081..4b4ed125a4 100644
--- a/ext/reflection/tests/ReflectionClass_getExtensionName_variation.phpt
+++ b/ext/reflection/tests/ReflectionClass_getExtensionName_variation.phpt
@@ -6,13 +6,13 @@ Rein Velt <rein@velt.org>
--FILE--
<?php
- class myClass
- {
- public $varX;
- public $varY;
- }
- $rc=new reflectionClass('myClass');
- var_dump( $rc->getExtensionName()) ;
+ class myClass
+ {
+ public $varX;
+ public $varY;
+ }
+ $rc=new reflectionClass('myClass');
+ var_dump( $rc->getExtensionName()) ;
?>
--EXPECT--
bool(false)
diff --git a/ext/reflection/tests/ReflectionClass_getExtension_basic.phpt b/ext/reflection/tests/ReflectionClass_getExtension_basic.phpt
index dbe157acd6..8cd1caad74 100644
--- a/ext/reflection/tests/ReflectionClass_getExtension_basic.phpt
+++ b/ext/reflection/tests/ReflectionClass_getExtension_basic.phpt
@@ -7,8 +7,8 @@ Rein Velt <rein@velt.org>
#testFest Roosendaal 2008-05-10
--FILE--
<?php
- $rc=new reflectionClass('domDocument');
- var_dump($rc->getExtension()) ;
+ $rc=new reflectionClass('domDocument');
+ var_dump($rc->getExtension()) ;
?>
--EXPECTF--
object(ReflectionExtension)#%d (1) {
diff --git a/ext/reflection/tests/ReflectionClass_getExtension_variation.phpt b/ext/reflection/tests/ReflectionClass_getExtension_variation.phpt
index f3697792db..b8a881f9b3 100644
--- a/ext/reflection/tests/ReflectionClass_getExtension_variation.phpt
+++ b/ext/reflection/tests/ReflectionClass_getExtension_variation.phpt
@@ -6,13 +6,13 @@ Rein Velt <rein@velt.org>
--FILE--
<?php
- class myClass
- {
- public $varX;
- public $varY;
- }
- $rc=new reflectionClass('myClass');
- var_dump( $rc->getExtension()) ;
+ class myClass
+ {
+ public $varX;
+ public $varY;
+ }
+ $rc=new reflectionClass('myClass');
+ var_dump( $rc->getExtension()) ;
?>
--EXPECT--
NULL
diff --git a/ext/reflection/tests/ReflectionClass_getInterfaces_001.phpt b/ext/reflection/tests/ReflectionClass_getInterfaces_001.phpt
index 6f7561c462..feaa703c98 100644
--- a/ext/reflection/tests/ReflectionClass_getInterfaces_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_getInterfaces_001.phpt
@@ -29,16 +29,16 @@ class C6 implements I1, I2, I3, I4, I5, I6, I7 {}
$classes = array( 'A0', 'A1', 'B0', 'B1',
- 'I0', 'I1', 'I2', 'I3', 'I4', 'I5', 'I6', 'I7',
- 'C0', 'C1', 'C2', 'C3', 'C4', 'C5', 'C6' );
+ 'I0', 'I1', 'I2', 'I3', 'I4', 'I5', 'I6', 'I7',
+ 'C0', 'C1', 'C2', 'C3', 'C4', 'C5', 'C6' );
foreach ($classes as $class) {
- echo "---( Interfaces implemented by $class )---\n ";
- $rc = new ReflectionClass($class);
- $interfaces = $rc->getInterfaces();
- // Sort interfaces so that tests do not fail because of wrong order.
- ksort($interfaces);
- print_r($interfaces);
+ echo "---( Interfaces implemented by $class )---\n ";
+ $rc = new ReflectionClass($class);
+ $interfaces = $rc->getInterfaces();
+ // Sort interfaces so that tests do not fail because of wrong order.
+ ksort($interfaces);
+ print_r($interfaces);
}
?>
diff --git a/ext/reflection/tests/ReflectionClass_getMethod_001.phpt b/ext/reflection/tests/ReflectionClass_getMethod_001.phpt
index e2a4eb9903..c8a2ed14ed 100644
--- a/ext/reflection/tests/ReflectionClass_getMethod_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_getMethod_001.phpt
@@ -6,43 +6,43 @@ Steve Seear <stevseea@php.net>
--FILE--
<?php
class pubf {
- public function f() {}
- static public function s() {}
+ public function f() {}
+ static public function s() {}
}
class subpubf extends pubf {
}
class protf {
- protected function f() {}
- static protected function s() {}
+ protected function f() {}
+ static protected function s() {}
}
class subprotf extends protf {
}
class privf {
- private function f() {}
- static private function s() {}
+ private function f() {}
+ static private function s() {}
}
class subprivf extends privf {
}
$classes = array("pubf", "subpubf", "protf", "subprotf",
- "privf", "subprivf");
+ "privf", "subprivf");
foreach($classes as $class) {
- echo "Reflecting on class $class: \n";
- $rc = new ReflectionClass($class);
- echo " --> Check for f(): ";
- var_dump($rc->getMethod("f"));
- echo " --> Check for s(): ";
- var_dump($rc->getMethod("s"));
- echo " --> Check for F(): ";
- var_dump($rc->getMethod("F"));
- echo " --> Check for doesNotExist(): ";
- try {
- var_dump($rc->getMethod("doesNotExist"));
- } catch (Exception $e) {
- echo $e->getMessage() . "\n";
- }
+ echo "Reflecting on class $class: \n";
+ $rc = new ReflectionClass($class);
+ echo " --> Check for f(): ";
+ var_dump($rc->getMethod("f"));
+ echo " --> Check for s(): ";
+ var_dump($rc->getMethod("s"));
+ echo " --> Check for F(): ";
+ var_dump($rc->getMethod("F"));
+ echo " --> Check for doesNotExist(): ";
+ try {
+ var_dump($rc->getMethod("doesNotExist"));
+ } catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+ }
}
?>
--EXPECTF--
diff --git a/ext/reflection/tests/ReflectionClass_getMethod_002.phpt b/ext/reflection/tests/ReflectionClass_getMethod_002.phpt
index 424550f67a..cebb5cd089 100644
--- a/ext/reflection/tests/ReflectionClass_getMethod_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_getMethod_002.phpt
@@ -6,50 +6,50 @@ Steve Seear <stevseea@php.net>
--FILE--
<?php
class C {
- function f() {}
+ function f() {}
}
$rc = new ReflectionClass("C");
echo "Check invalid params:\n";
try {
- var_dump($rc->getMethod());
+ var_dump($rc->getMethod());
} catch (TypeError $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->getMethod("f", "f"));
+ var_dump($rc->getMethod("f", "f"));
} catch (TypeError $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->getMethod(null));
+ var_dump($rc->getMethod(null));
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->getMethod(1));
+ var_dump($rc->getMethod(1));
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->getMethod(1.5));
+ var_dump($rc->getMethod(1.5));
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->getMethod(true));
+ var_dump($rc->getMethod(true));
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->getMethod(array(1,2,3)));
+ var_dump($rc->getMethod(array(1,2,3)));
} catch (TypeError $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->getMethod(new C));
+ var_dump($rc->getMethod(new C));
} catch (TypeError $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
diff --git a/ext/reflection/tests/ReflectionClass_getMethods_001.phpt b/ext/reflection/tests/ReflectionClass_getMethods_001.phpt
index dca9adb56d..1f2ed55ffb 100644
--- a/ext/reflection/tests/ReflectionClass_getMethods_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_getMethods_001.phpt
@@ -6,32 +6,32 @@ Steve Seear <stevseea@php.net>
--FILE--
<?php
class pubf {
- public function f() {}
- static public function s() {}
+ public function f() {}
+ static public function s() {}
}
class subpubf extends pubf {
}
class protf {
- protected function f() {}
- static protected function s() {}
+ protected function f() {}
+ static protected function s() {}
}
class subprotf extends protf {
}
class privf {
- private function f() {}
- static private function s() {}
+ private function f() {}
+ static private function s() {}
}
class subprivf extends privf {
}
$classes = array("pubf", "subpubf", "protf", "subprotf",
- "privf", "subprivf");
+ "privf", "subprivf");
foreach($classes as $class) {
- echo "Reflecting on class $class: \n";
- $rc = new ReflectionClass($class);
- var_dump($rc->getMethods());
+ echo "Reflecting on class $class: \n";
+ $rc = new ReflectionClass($class);
+ var_dump($rc->getMethods());
}
?>
diff --git a/ext/reflection/tests/ReflectionClass_getMethods_003.phpt b/ext/reflection/tests/ReflectionClass_getMethods_003.phpt
index b08fcaa4d4..d40e0b9122 100644
--- a/ext/reflection/tests/ReflectionClass_getMethods_003.phpt
+++ b/ext/reflection/tests/ReflectionClass_getMethods_003.phpt
@@ -6,14 +6,14 @@ Steve Seear <stevseea@php.net>
--FILE--
<?php
class C {
- public function pubf1() {}
- public function pubf2() {}
- private function privf1() {}
- private function privf2() {}
- static public function pubsf1() {}
- static public function pubsf2() {}
- static private function privsf1() {}
- static private function privsf2() {}
+ public function pubf1() {}
+ public function pubf2() {}
+ private function privf1() {}
+ private function privf2() {}
+ static public function pubsf1() {}
+ static public function pubsf2() {}
+ static private function privsf1() {}
+ static private function privsf2() {}
}
$rc = new ReflectionClass("C");
diff --git a/ext/reflection/tests/ReflectionClass_getModifierNames_basic.phpt b/ext/reflection/tests/ReflectionClass_getModifierNames_basic.phpt
index ba7fa6880b..f792031a01 100644
--- a/ext/reflection/tests/ReflectionClass_getModifierNames_basic.phpt
+++ b/ext/reflection/tests/ReflectionClass_getModifierNames_basic.phpt
@@ -11,34 +11,34 @@ final class c {}
class x
{
- function __construct() {}
- function __destruct() {}
- private function a() {}
- private static function b() {}
- protected function c() {}
- protected static function d() {}
- public function e() {}
- public static function f() {}
- final function g() {}
- function h() {}
+ function __construct() {}
+ function __destruct() {}
+ private function a() {}
+ private static function b() {}
+ protected function c() {}
+ protected static function d() {}
+ public function e() {}
+ public static function f() {}
+ final function g() {}
+ function h() {}
}
abstract class y
{
- abstract function a();
- abstract protected function b();
+ abstract function a();
+ abstract protected function b();
}
function dump_modifierNames($class) {
- $obj = new ReflectionClass($class);
- var_dump($obj->getName(), Reflection::getModifierNames($obj->getModifiers()));
+ $obj = new ReflectionClass($class);
+ var_dump($obj->getName(), Reflection::getModifierNames($obj->getModifiers()));
}
function dump_methodModifierNames($class) {
- $obj = new ReflectionClass($class);
- foreach($obj->getMethods() as $method) {
- var_dump($obj->getName() . "::" . $method->getName(), Reflection::getModifierNames($method->getModifiers()));
- }
+ $obj = new ReflectionClass($class);
+ foreach($obj->getMethods() as $method) {
+ var_dump($obj->getName() . "::" . $method->getName(), Reflection::getModifierNames($method->getModifiers()));
+ }
}
dump_modifierNames('a');
diff --git a/ext/reflection/tests/ReflectionClass_getModifiers_basic.phpt b/ext/reflection/tests/ReflectionClass_getModifiers_basic.phpt
index ffe8876133..447f8d2edc 100644
--- a/ext/reflection/tests/ReflectionClass_getModifiers_basic.phpt
+++ b/ext/reflection/tests/ReflectionClass_getModifiers_basic.phpt
@@ -14,8 +14,8 @@ interface f extends d {}
class g extends b {}
function dump_modifiers($class) {
- $obj = new ReflectionClass($class);
- var_dump($obj->getModifiers());
+ $obj = new ReflectionClass($class);
+ var_dump($obj->getModifiers());
}
dump_modifiers('a');
diff --git a/ext/reflection/tests/ReflectionClass_getName_basic.phpt b/ext/reflection/tests/ReflectionClass_getName_basic.phpt
index 37cec4bc81..f230165f0d 100644
--- a/ext/reflection/tests/ReflectionClass_getName_basic.phpt
+++ b/ext/reflection/tests/ReflectionClass_getName_basic.phpt
@@ -3,10 +3,10 @@ ReflectionClass::getName()
--FILE--
<?php
class TrickClass {
- function __toString() {
- //Return the name of another class
- return "Exception";
- }
+ function __toString() {
+ //Return the name of another class
+ return "Exception";
+ }
}
$r1 = new ReflectionClass("stdClass");
diff --git a/ext/reflection/tests/ReflectionClass_getProperties_001.phpt b/ext/reflection/tests/ReflectionClass_getProperties_001.phpt
index 3554af3890..0607822a20 100644
--- a/ext/reflection/tests/ReflectionClass_getProperties_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_getProperties_001.phpt
@@ -6,32 +6,32 @@ Steve Seear <stevseea@php.net>
--FILE--
<?php
class pubf {
- public $a;
- static public $s;
+ public $a;
+ static public $s;
}
class subpubf extends pubf {
}
class protf {
- protected $a;
- static protected $s;
+ protected $a;
+ static protected $s;
}
class subprotf extends protf {
}
class privf {
- private $a;
- static private $s;
+ private $a;
+ static private $s;
}
class subprivf extends privf {
}
$classes = array("pubf", "subpubf", "protf", "subprotf",
- "privf", "subprivf");
+ "privf", "subprivf");
foreach($classes as $class) {
- echo "Reflecting on class $class: \n";
- $rc = new ReflectionClass($class);
- var_dump($rc->getProperties());
+ echo "Reflecting on class $class: \n";
+ $rc = new ReflectionClass($class);
+ var_dump($rc->getProperties());
}
?>
diff --git a/ext/reflection/tests/ReflectionClass_getProperties_003.phpt b/ext/reflection/tests/ReflectionClass_getProperties_003.phpt
index fe3792a30f..63d5d476b4 100644
--- a/ext/reflection/tests/ReflectionClass_getProperties_003.phpt
+++ b/ext/reflection/tests/ReflectionClass_getProperties_003.phpt
@@ -6,14 +6,14 @@ Steve Seear <stevseea@php.net>
--FILE--
<?php
class C {
- public $pub1;
- public $pub2;
- private $priv1;
- private $priv2;
- static public $pubs;
- static public $pubs2;
- static private $privs1;
- static private $privs2;
+ public $pub1;
+ public $pub2;
+ private $priv1;
+ private $priv2;
+ static public $pubs;
+ static public $pubs2;
+ static private $privs1;
+ static private $privs2;
}
$rc = new ReflectionClass("C");
diff --git a/ext/reflection/tests/ReflectionClass_getProperty_001.phpt b/ext/reflection/tests/ReflectionClass_getProperty_001.phpt
index b69d51eb00..2d5494b264 100644
--- a/ext/reflection/tests/ReflectionClass_getProperty_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_getProperty_001.phpt
@@ -6,55 +6,55 @@ Steve Seear <stevseea@php.net>
--FILE--
<?php
class pubf {
- public $a;
- static public $s;
+ public $a;
+ static public $s;
}
class subpubf extends pubf {
}
class protf {
- protected $a;
- static protected $s;
+ protected $a;
+ static protected $s;
}
class subprotf extends protf {
}
class privf {
- private $a;
- static protected $s;
+ private $a;
+ static protected $s;
}
class subprivf extends privf {
}
$classes = array("pubf", "subpubf", "protf", "subprotf",
- "privf", "subprivf");
+ "privf", "subprivf");
foreach($classes as $class) {
- echo "Reflecting on class $class: \n";
- $rc = new ReflectionClass($class);
- try {
- echo " --> Check for s: ";
- var_dump($rc->getProperty("s"));
- } catch (exception $e) {
- echo $e->getMessage() . "\n";
- }
- try {
- echo " --> Check for a: ";
- var_dump($rc->getProperty("a"));
- } catch (exception $e) {
- echo $e->getMessage() . "\n";
- }
- try {
- echo " --> Check for A: ";
- var_dump($rc->getProperty("A"));
- } catch (exception $e) {
- echo $e->getMessage() . "\n";
- }
- try {
- echo " --> Check for doesNotExist: ";
- var_dump($rc->getProperty("doesNotExist"));
- } catch (exception $e) {
- echo $e->getMessage() . "\n";
- }
+ echo "Reflecting on class $class: \n";
+ $rc = new ReflectionClass($class);
+ try {
+ echo " --> Check for s: ";
+ var_dump($rc->getProperty("s"));
+ } catch (exception $e) {
+ echo $e->getMessage() . "\n";
+ }
+ try {
+ echo " --> Check for a: ";
+ var_dump($rc->getProperty("a"));
+ } catch (exception $e) {
+ echo $e->getMessage() . "\n";
+ }
+ try {
+ echo " --> Check for A: ";
+ var_dump($rc->getProperty("A"));
+ } catch (exception $e) {
+ echo $e->getMessage() . "\n";
+ }
+ try {
+ echo " --> Check for doesNotExist: ";
+ var_dump($rc->getProperty("doesNotExist"));
+ } catch (exception $e) {
+ echo $e->getMessage() . "\n";
+ }
}
?>
diff --git a/ext/reflection/tests/ReflectionClass_getProperty_002.phpt b/ext/reflection/tests/ReflectionClass_getProperty_002.phpt
index d9a2ebcd71..904162b263 100644
--- a/ext/reflection/tests/ReflectionClass_getProperty_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_getProperty_002.phpt
@@ -6,50 +6,50 @@ Steve Seear <stevseea@php.net>
--FILE--
<?php
class C {
- public $a;
+ public $a;
}
$rc = new ReflectionClass("C");
echo "Check invalid params:\n";
try {
- var_dump($rc->getProperty());
+ var_dump($rc->getProperty());
} catch (TypeError $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->getProperty("a", "a"));
+ var_dump($rc->getProperty("a", "a"));
} catch (TypeError $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->getProperty(null));
+ var_dump($rc->getProperty(null));
} catch (exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->getProperty(1));
+ var_dump($rc->getProperty(1));
} catch (exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->getProperty(1.5));
+ var_dump($rc->getProperty(1.5));
} catch (exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->getProperty(true));
+ var_dump($rc->getProperty(true));
} catch (exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->getProperty(array(1,2,3)));
+ var_dump($rc->getProperty(array(1,2,3)));
} catch (TypeError $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->getProperty(new C));
+ var_dump($rc->getProperty(new C));
} catch (TypeError $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
?>
--EXPECT--
diff --git a/ext/reflection/tests/ReflectionClass_getProperty_003.phpt b/ext/reflection/tests/ReflectionClass_getProperty_003.phpt
index 7011a0912c..34ade2fc5e 100644
--- a/ext/reflection/tests/ReflectionClass_getProperty_003.phpt
+++ b/ext/reflection/tests/ReflectionClass_getProperty_003.phpt
@@ -6,56 +6,56 @@ Steve Seear <stevseea@php.net>
--FILE--
<?php
class A {
- static public $pubC = "pubC in A";
- static protected $protC = "protC in A";
- static private $privC = "privC in A";
+ static public $pubC = "pubC in A";
+ static protected $protC = "protC in A";
+ static private $privC = "privC in A";
- static public $pubA = "pubA in A";
- static protected $protA = "protA in A";
- static private $privA = "privA in A";
+ static public $pubA = "pubA in A";
+ static protected $protA = "protA in A";
+ static private $privA = "privA in A";
}
class B extends A {
- static public $pubC = "pubC in B";
- static protected $protC = "protC in B";
- static private $privC = "privC in B";
+ static public $pubC = "pubC in B";
+ static protected $protC = "protC in B";
+ static private $privC = "privC in B";
- static public $pubB = "pubB in B";
- static protected $protB = "protB in B";
- static private $privB = "privB in B";
+ static public $pubB = "pubB in B";
+ static protected $protB = "protB in B";
+ static private $privB = "privB in B";
}
class C extends B {
- static public $pubC = "pubC in C";
- static protected $protC = "protC in C";
- static private $privC = "privC in C";
+ static public $pubC = "pubC in C";
+ static protected $protC = "protC in C";
+ static private $privC = "privC in C";
}
class X {
- static public $pubC = "pubC in X";
- static protected $protC = "protC in X";
- static private $privC = "privC in X";
+ static public $pubC = "pubC in X";
+ static protected $protC = "protC in X";
+ static private $privC = "privC in X";
}
$myC = new C;
$rc = new ReflectionClass("C");
function showInfo($name) {
- global $rc, $myC;
- echo "--- (Reflecting on $name) ---\n";
- try {
- $rp = $rc->getProperty($name);
- } catch (Exception $e) {
- echo $e->getMessage() . "\n";
- return;
- }
- try {
- var_dump($rp);
- var_dump($rp->getValue($myC));
- } catch (Exception $e) {
- echo $e->getMessage() . "\n";
- return;
- }
+ global $rc, $myC;
+ echo "--- (Reflecting on $name) ---\n";
+ try {
+ $rp = $rc->getProperty($name);
+ } catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+ return;
+ }
+ try {
+ var_dump($rp);
+ var_dump($rp->getValue($myC));
+ } catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+ return;
+ }
}
diff --git a/ext/reflection/tests/ReflectionClass_getProperty_004.phpt b/ext/reflection/tests/ReflectionClass_getProperty_004.phpt
index 95f821e472..b5396aae40 100644
--- a/ext/reflection/tests/ReflectionClass_getProperty_004.phpt
+++ b/ext/reflection/tests/ReflectionClass_getProperty_004.phpt
@@ -6,56 +6,56 @@ Steve Seear <stevseea@php.net>
--FILE--
<?php
class A {
- public $pubC = "pubC in A";
- protected $protC = "protC in A";
- private $privC = "privC in A";
+ public $pubC = "pubC in A";
+ protected $protC = "protC in A";
+ private $privC = "privC in A";
- public $pubA = "pubA in A";
- protected $protA = "protA in A";
- private $privA = "privA in A";
+ public $pubA = "pubA in A";
+ protected $protA = "protA in A";
+ private $privA = "privA in A";
}
class B extends A {
- public $pubC = "pubC in B";
- protected $protC = "protC in B";
- private $privC = "privC in B";
+ public $pubC = "pubC in B";
+ protected $protC = "protC in B";
+ private $privC = "privC in B";
- public $pubB = "pubB in B";
- protected $protB = "protB in B";
- private $privB = "privB in B";
+ public $pubB = "pubB in B";
+ protected $protB = "protB in B";
+ private $privB = "privB in B";
}
class C extends B {
- public $pubC = "pubC in C";
- protected $protC = "protC in C";
- private $privC = "privC in C";
+ public $pubC = "pubC in C";
+ protected $protC = "protC in C";
+ private $privC = "privC in C";
}
class X {
- public $pubC = "pubC in X";
- protected $protC = "protC in X";
- private $privC = "privC in X";
+ public $pubC = "pubC in X";
+ protected $protC = "protC in X";
+ private $privC = "privC in X";
}
$myC = new C;
$rc = new ReflectionClass("C");
function showInfo($name) {
- global $rc, $myC;
- echo "--- (Reflecting on $name) ---\n";
- try {
- $rp = $rc->getProperty($name);
- } catch (Exception $e) {
- echo $e->getMessage() . "\n";
- return;
- }
- try {
- var_dump($rp);
- var_dump($rp->getValue($myC));
- } catch (Exception $e) {
- echo $e->getMessage() . "\n";
- return;
- }
+ global $rc, $myC;
+ echo "--- (Reflecting on $name) ---\n";
+ try {
+ $rp = $rc->getProperty($name);
+ } catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+ return;
+ }
+ try {
+ var_dump($rp);
+ var_dump($rp->getValue($myC));
+ } catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+ return;
+ }
}
diff --git a/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_001.phpt b/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_001.phpt
index 365ec89ff1..b11d2ec0d7 100644
--- a/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_001.phpt
@@ -6,15 +6,15 @@ Steve Seear <stevseea@php.net>
--FILE--
<?php
class A {
- static private $privateOverridden = "original private";
- static protected $protectedOverridden = "original protected";
- static public $publicOverridden = "original public";
+ static private $privateOverridden = "original private";
+ static protected $protectedOverridden = "original protected";
+ static public $publicOverridden = "original public";
}
class B extends A {
- static private $privateOverridden = "changed private";
- static protected $protectedOverridden = "changed protected";
- static public $publicOverridden = "changed public";
+ static private $privateOverridden = "changed private";
+ static protected $protectedOverridden = "changed protected";
+ static public $publicOverridden = "changed public";
}
echo "Retrieving static values from A:\n";
@@ -34,17 +34,17 @@ var_dump($rcB->getStaticPropertyValue("publicOverridden"));
echo "\nRetrieving non-existent values from A with no default value:\n";
try {
- var_dump($rcA->getStaticPropertyValue("protectedOverridden"));
- echo "you should not see this";
+ var_dump($rcA->getStaticPropertyValue("protectedOverridden"));
+ echo "you should not see this";
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rcA->getStaticPropertyValue("privateOverridden"));
- echo "you should not see this";
+ var_dump($rcA->getStaticPropertyValue("privateOverridden"));
+ echo "you should not see this";
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
?>
diff --git a/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt b/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt
index 7c071e5ba0..672c7f3e1d 100644
--- a/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt
@@ -6,34 +6,34 @@ Steve Seear <stevseea@php.net>
--FILE--
<?php
class C {
- public static $x;
+ public static $x;
}
$rc = new ReflectionClass('C');
try {
- var_dump($rc->getStaticPropertyValue("x", "default value", 'blah'));
+ var_dump($rc->getStaticPropertyValue("x", "default value", 'blah'));
} catch (TypeError $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->getStaticPropertyValue());
+ var_dump($rc->getStaticPropertyValue());
} catch (TypeError $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->getStaticPropertyValue(null));
+ var_dump($rc->getStaticPropertyValue(null));
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->getStaticPropertyValue(1.5, 'def'));
+ var_dump($rc->getStaticPropertyValue(1.5, 'def'));
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->getStaticPropertyValue(array(1,2,3)));
+ var_dump($rc->getStaticPropertyValue(array(1,2,3)));
} catch (TypeError $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
diff --git a/ext/reflection/tests/ReflectionClass_hasConstant_001.phpt b/ext/reflection/tests/ReflectionClass_hasConstant_001.phpt
index 22ef1f50c5..5783b2b506 100644
--- a/ext/reflection/tests/ReflectionClass_hasConstant_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_hasConstant_001.phpt
@@ -6,7 +6,7 @@ Steve Seear <stevseea@php.net>
--FILE--
<?php
class C {
- const myConst = 1;
+ const myConst = 1;
}
class D extends C {
diff --git a/ext/reflection/tests/ReflectionClass_hasConstant_002.phpt b/ext/reflection/tests/ReflectionClass_hasConstant_002.phpt
index 257d9aa9da..5dcc7df173 100644
--- a/ext/reflection/tests/ReflectionClass_hasConstant_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_hasConstant_002.phpt
@@ -6,7 +6,7 @@ Steve Seear <stevseea@php.net>
--FILE--
<?php
class C {
- const myConst = 1;
+ const myConst = 1;
}
$rc = new ReflectionClass("C");
diff --git a/ext/reflection/tests/ReflectionClass_hasMethod_001.phpt b/ext/reflection/tests/ReflectionClass_hasMethod_001.phpt
index bf2a3c9bb5..d987897a6e 100644
--- a/ext/reflection/tests/ReflectionClass_hasMethod_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_hasMethod_001.phpt
@@ -6,39 +6,39 @@ Steve Seear <stevseea@php.net>
--FILE--
<?php
class pubf {
- public function f() {}
- static public function s() {}
+ public function f() {}
+ static public function s() {}
}
class subpubf extends pubf {
}
class protf {
- protected function f() {}
- static protected function s() {}
+ protected function f() {}
+ static protected function s() {}
}
class subprotf extends protf {
}
class privf {
- private function f() {}
- static private function s() {}
+ private function f() {}
+ static private function s() {}
}
class subprivf extends privf {
}
$classes = array("pubf", "subpubf", "protf", "subprotf",
- "privf", "subprivf");
+ "privf", "subprivf");
foreach($classes as $class) {
- echo "Reflecting on class $class: \n";
- $rc = new ReflectionClass($class);
- echo " --> Check for f(): ";
- var_dump($rc->hasMethod("f"));
- echo " --> Check for s(): ";
- var_dump($rc->hasMethod("s"));
- echo " --> Check for F(): ";
- var_dump($rc->hasMethod("F"));
- echo " --> Check for doesNotExist(): ";
- var_dump($rc->hasMethod("doesNotExist"));
+ echo "Reflecting on class $class: \n";
+ $rc = new ReflectionClass($class);
+ echo " --> Check for f(): ";
+ var_dump($rc->hasMethod("f"));
+ echo " --> Check for s(): ";
+ var_dump($rc->hasMethod("s"));
+ echo " --> Check for F(): ";
+ var_dump($rc->hasMethod("F"));
+ echo " --> Check for doesNotExist(): ";
+ var_dump($rc->hasMethod("doesNotExist"));
}
?>
--EXPECT--
diff --git a/ext/reflection/tests/ReflectionClass_hasMethod_002.phpt b/ext/reflection/tests/ReflectionClass_hasMethod_002.phpt
index 77f2865a31..2bbc84551e 100644
--- a/ext/reflection/tests/ReflectionClass_hasMethod_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_hasMethod_002.phpt
@@ -6,7 +6,7 @@ Steve Seear <stevseea@php.net>
--FILE--
<?php
class C {
- function f() {}
+ function f() {}
}
$rc = new ReflectionClass("C");
diff --git a/ext/reflection/tests/ReflectionClass_hasProperty_001.phpt b/ext/reflection/tests/ReflectionClass_hasProperty_001.phpt
index 6abf392eae..12040658ba 100644
--- a/ext/reflection/tests/ReflectionClass_hasProperty_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_hasProperty_001.phpt
@@ -6,39 +6,39 @@ Steve Seear <stevseea@php.net>
--FILE--
<?php
class pubf {
- public $a;
- static public $s;
+ public $a;
+ static public $s;
}
class subpubf extends pubf {
}
class protf {
- protected $a;
- static protected $s;
+ protected $a;
+ static protected $s;
}
class subprotf extends protf {
}
class privf {
- private $a;
- static protected $s;
+ private $a;
+ static protected $s;
}
class subprivf extends privf {
}
$classes = array("pubf", "subpubf", "protf", "subprotf",
- "privf", "subprivf");
+ "privf", "subprivf");
foreach($classes as $class) {
- echo "Reflecting on class $class: \n";
- $rc = new ReflectionClass($class);
- echo " --> Check for s: ";
- var_dump($rc->hasProperty("s"));
- echo " --> Check for a: ";
- var_dump($rc->hasProperty("a"));
- echo " --> Check for A: ";
- var_dump($rc->hasProperty("A"));
- echo " --> Check for doesNotExist: ";
- var_dump($rc->hasProperty("doesNotExist"));
+ echo "Reflecting on class $class: \n";
+ $rc = new ReflectionClass($class);
+ echo " --> Check for s: ";
+ var_dump($rc->hasProperty("s"));
+ echo " --> Check for a: ";
+ var_dump($rc->hasProperty("a"));
+ echo " --> Check for A: ";
+ var_dump($rc->hasProperty("A"));
+ echo " --> Check for doesNotExist: ";
+ var_dump($rc->hasProperty("doesNotExist"));
}
?>
--EXPECT--
diff --git a/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt b/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt
index a1bbb9e73c..a135939052 100644
--- a/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt
@@ -6,7 +6,7 @@ Steve Seear <stevseea@php.net>
--FILE--
<?php
class C {
- public $a;
+ public $a;
}
$rc = new ReflectionClass("C");
diff --git a/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt b/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt
index 5176dd75ad..7f28198dfa 100644
--- a/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt
@@ -15,54 +15,54 @@ class C implements I2 {}
$classNames = array('A', 'B', 'C', 'I1', 'I2');
foreach ($classNames as $className) {
- $rcs[$className] = new ReflectionClass($className);
+ $rcs[$className] = new ReflectionClass($className);
}
foreach ($rcs as $childName => $child) {
- foreach ($rcs as $parentName => $parent) {
- echo "Does " . $childName . " implement " . $parentName . "? \n";
- echo " - Using object argument: ";
- try {
- var_dump($child->implementsInterface($parent));
- } catch (Exception $e) {
- echo $e->getMessage() . "\n";
- }
- echo " - Using string argument: ";
- try {
- var_dump($child->implementsInterface($parentName));
- } catch (Exception $e) {
- echo $e->getMessage() . "\n";
- }
- }
+ foreach ($rcs as $parentName => $parent) {
+ echo "Does " . $childName . " implement " . $parentName . "? \n";
+ echo " - Using object argument: ";
+ try {
+ var_dump($child->implementsInterface($parent));
+ } catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+ }
+ echo " - Using string argument: ";
+ try {
+ var_dump($child->implementsInterface($parentName));
+ } catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+ }
+ }
}
echo "\n\nTest bad arguments:\n";
try {
- var_dump($rcs['A']->implementsInterface());
+ var_dump($rcs['A']->implementsInterface());
} catch (TypeError $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rcs['A']->implementsInterface('C', 'C'));
+ var_dump($rcs['A']->implementsInterface('C', 'C'));
} catch (TypeError $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rcs['A']->implementsInterface(null));
+ var_dump($rcs['A']->implementsInterface(null));
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rcs['A']->implementsInterface('ThisClassDoesNotExist'));
+ var_dump($rcs['A']->implementsInterface('ThisClassDoesNotExist'));
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rcs['A']->implementsInterface(2));
+ var_dump($rcs['A']->implementsInterface(2));
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
?>
--EXPECTF--
diff --git a/ext/reflection/tests/ReflectionClass_isCloneable_001.phpt b/ext/reflection/tests/ReflectionClass_isCloneable_001.phpt
index 361708a315..caf55fa648 100644
--- a/ext/reflection/tests/ReflectionClass_isCloneable_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_isCloneable_001.phpt
@@ -17,8 +17,8 @@ var_dump($obj->isCloneable());
$h = clone $foo;
class bar {
- private function __clone() {
- }
+ private function __clone() {
+ }
}
$bar = new bar;
print "User class - private __clone\n";
diff --git a/ext/reflection/tests/ReflectionClass_isInstance_basic.phpt b/ext/reflection/tests/ReflectionClass_isInstance_basic.phpt
index a108718894..e34176fe51 100644
--- a/ext/reflection/tests/ReflectionClass_isInstance_basic.phpt
+++ b/ext/reflection/tests/ReflectionClass_isInstance_basic.phpt
@@ -13,17 +13,17 @@ class X {}
$classes = array("A", "B", "C", "I", "X");
$instances = array( "myA" => new A,
- "myB" => new B,
- "myC" => new C,
- "myX" => new X );
+ "myB" => new B,
+ "myC" => new C,
+ "myX" => new X );
foreach ($classes as $class) {
- $rc = new ReflectionClass($class);
+ $rc = new ReflectionClass($class);
- foreach ($instances as $name => $instance) {
- echo "is $name a $class? ";
- var_dump($rc->isInstance($instance));
- }
+ foreach ($instances as $name => $instance) {
+ echo "is $name a $class? ";
+ var_dump($rc->isInstance($instance));
+ }
}
diff --git a/ext/reflection/tests/ReflectionClass_isInstantiable_basic.phpt b/ext/reflection/tests/ReflectionClass_isInstantiable_basic.phpt
index ef179721dc..3bc79b3e79 100644
--- a/ext/reflection/tests/ReflectionClass_isInstantiable_basic.phpt
+++ b/ext/reflection/tests/ReflectionClass_isInstantiable_basic.phpt
@@ -6,28 +6,28 @@ class C {
}
interface iface {
- function f1();
+ function f1();
}
class ifaceImpl implements iface {
- function f1() {}
+ function f1() {}
}
abstract class abstractClass {
- function f1() {}
- abstract function f2();
+ function f1() {}
+ abstract function f2();
}
class D extends abstractClass {
- function f2() {}
+ function f2() {}
}
$classes = array("C", "iface", "ifaceImpl", "abstractClass", "D");
foreach($classes as $class ) {
- $reflectionClass = new ReflectionClass($class);
- echo "Is $class instantiable? ";
- var_dump($reflectionClass->IsInstantiable());
+ $reflectionClass = new ReflectionClass($class);
+ echo "Is $class instantiable? ";
+ var_dump($reflectionClass->IsInstantiable());
}
diff --git a/ext/reflection/tests/ReflectionClass_isInstantiable_variation.phpt b/ext/reflection/tests/ReflectionClass_isInstantiable_variation.phpt
index e688b40f46..cdfaf911e4 100644
--- a/ext/reflection/tests/ReflectionClass_isInstantiable_variation.phpt
+++ b/ext/reflection/tests/ReflectionClass_isInstantiable_variation.phpt
@@ -6,22 +6,22 @@ class noCtor {
}
class publicCtorNew {
- public function __construct() {}
+ public function __construct() {}
}
class protectedCtorNew {
- protected function __construct() {}
+ protected function __construct() {}
}
class privateCtorNew {
- private function __construct() {}
+ private function __construct() {}
}
$classes = array("noCtor", "publicCtorNew", "protectedCtorNew", "privateCtorNew");
foreach ($classes as $class) {
- $reflectionClass = new ReflectionClass($class);
- echo "Is $class instantiable? ";
- var_dump($reflectionClass->IsInstantiable());
+ $reflectionClass = new ReflectionClass($class);
+ echo "Is $class instantiable? ";
+ var_dump($reflectionClass->IsInstantiable());
}
?>
diff --git a/ext/reflection/tests/ReflectionClass_isInternal_basic.phpt b/ext/reflection/tests/ReflectionClass_isInternal_basic.phpt
index 9c656a38b6..48f0c963ea 100644
--- a/ext/reflection/tests/ReflectionClass_isInternal_basic.phpt
+++ b/ext/reflection/tests/ReflectionClass_isInternal_basic.phpt
@@ -12,7 +12,7 @@ $r4 = new ReflectionClass("Exception");
$r5 = new ReflectionClass("C");
var_dump($r1->isInternal(), $r2->isInternal(), $r3->isInternal(),
- $r4->isInternal(), $r5->isInternal());
+ $r4->isInternal(), $r5->isInternal());
?>
--EXPECT--
bool(true)
diff --git a/ext/reflection/tests/ReflectionClass_isIterateable_001.phpt b/ext/reflection/tests/ReflectionClass_isIterateable_001.phpt
index af4ce9d2f4..ca3e4a8e8f 100644
--- a/ext/reflection/tests/ReflectionClass_isIterateable_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_isIterateable_001.phpt
@@ -10,14 +10,14 @@ Interface ExtendsIterator extends Iterator {
Interface ExtendsIteratorAggregate extends IteratorAggregate {
}
Class IteratorImpl implements Iterator {
- public function next() {}
- public function key() {}
- public function rewind() {}
- public function current() {}
- public function valid() {}
+ public function next() {}
+ public function key() {}
+ public function rewind() {}
+ public function current() {}
+ public function valid() {}
}
Class IterarorAggregateImpl implements IteratorAggregate {
- public function getIterator() {}
+ public function getIterator() {}
}
Class ExtendsIteratorImpl extends IteratorImpl {
}
@@ -27,12 +27,12 @@ Class A {
}
$classes = array('Traversable', 'Iterator', 'IteratorAggregate', 'ExtendsIterator', 'ExtendsIteratorAggregate',
- 'IteratorImpl', 'IterarorAggregateImpl', 'ExtendsIteratorImpl', 'ExtendsIteratorAggregateImpl', 'A');
+ 'IteratorImpl', 'IterarorAggregateImpl', 'ExtendsIteratorImpl', 'ExtendsIteratorAggregateImpl', 'A');
foreach($classes as $class) {
- $rc = new ReflectionClass($class);
- echo "Is $class iterable? ";
- var_dump($rc->isIterateable());
+ $rc = new ReflectionClass($class);
+ echo "Is $class iterable? ";
+ var_dump($rc->isIterateable());
}
echo "\nTest static invocation:\n";
diff --git a/ext/reflection/tests/ReflectionClass_isIterateable_basic.phpt b/ext/reflection/tests/ReflectionClass_isIterateable_basic.phpt
index 8b65b9a0bd..f11433eced 100644
--- a/ext/reflection/tests/ReflectionClass_isIterateable_basic.phpt
+++ b/ext/reflection/tests/ReflectionClass_isIterateable_basic.phpt
@@ -6,25 +6,25 @@ Felix De Vliegher <felix.devliegher@gmail.com>, Marc Veldman <marc@ibuildings.nl
<?php
class IteratorClass implements Iterator {
- public function __construct() { }
- public function key() {}
- public function current() {}
- function next() {}
- function valid() {}
- function rewind() {}
+ public function __construct() { }
+ public function key() {}
+ public function current() {}
+ function next() {}
+ function valid() {}
+ function rewind() {}
}
class DerivedClass extends IteratorClass {}
class NonIterator {}
function dump_iterateable($class) {
- $reflection = new ReflectionClass($class);
- var_dump($reflection->isIterateable());
+ $reflection = new ReflectionClass($class);
+ var_dump($reflection->isIterateable());
}
$classes = array("ArrayObject", "IteratorClass", "DerivedClass", "NonIterator");
foreach ($classes as $class) {
- echo "Is $class iterateable? ";
- dump_iterateable($class);
+ echo "Is $class iterateable? ";
+ dump_iterateable($class);
}
?>
--EXPECT--
diff --git a/ext/reflection/tests/ReflectionClass_isIterateable_variation1.phpt b/ext/reflection/tests/ReflectionClass_isIterateable_variation1.phpt
index f6d0d5346a..839867893a 100644
--- a/ext/reflection/tests/ReflectionClass_isIterateable_variation1.phpt
+++ b/ext/reflection/tests/ReflectionClass_isIterateable_variation1.phpt
@@ -9,8 +9,8 @@ class BasicClass {}
function dump_iterateable($obj)
{
- $reflection = new ReflectionClass($obj);
- var_dump($reflection->isIterateable());
+ $reflection = new ReflectionClass($obj);
+ var_dump($reflection->isIterateable());
}
$basicClass = new BasicClass();
diff --git a/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt b/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt
index 03d17e223e..b86b70018d 100644
--- a/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt
@@ -10,29 +10,29 @@ $rc = new ReflectionClass('A');
echo "\n\nTest bad arguments:\n";
try {
- var_dump($rc->isSubclassOf());
+ var_dump($rc->isSubclassOf());
} catch (TypeError $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->isSubclassOf('C', 'C'));
+ var_dump($rc->isSubclassOf('C', 'C'));
} catch (TypeError $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->isSubclassOf(null));
+ var_dump($rc->isSubclassOf(null));
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->isSubclassOf('ThisClassDoesNotExist'));
+ var_dump($rc->isSubclassOf('ThisClassDoesNotExist'));
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->isSubclassOf(2));
+ var_dump($rc->isSubclassOf(2));
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
?>
--EXPECT--
diff --git a/ext/reflection/tests/ReflectionClass_isSubclassOf_basic.phpt b/ext/reflection/tests/ReflectionClass_isSubclassOf_basic.phpt
index c05ec27ccd..a52611fb21 100644
--- a/ext/reflection/tests/ReflectionClass_isSubclassOf_basic.phpt
+++ b/ext/reflection/tests/ReflectionClass_isSubclassOf_basic.phpt
@@ -12,17 +12,17 @@ class X implements I {}
$classNames = array('A', 'B', 'C', 'I', 'X');
foreach ($classNames as $className) {
- $rcs[$className] = new ReflectionClass($className);
+ $rcs[$className] = new ReflectionClass($className);
}
foreach ($rcs as $childName => $child) {
- foreach ($rcs as $parentName => $parent) {
- echo "Is " . $childName . " a subclass of " . $parentName . "? \n";
- echo " - Using object argument: ";
- var_dump($child->isSubclassOf($parent));
- echo " - Using string argument: ";
- var_dump($child->isSubclassOf($parentName));
- }
+ foreach ($rcs as $parentName => $parent) {
+ echo "Is " . $childName . " a subclass of " . $parentName . "? \n";
+ echo " - Using object argument: ";
+ var_dump($child->isSubclassOf($parent));
+ echo " - Using string argument: ";
+ var_dump($child->isSubclassOf($parentName));
+ }
}
?>
--EXPECT--
diff --git a/ext/reflection/tests/ReflectionClass_isUserDefined_basic.phpt b/ext/reflection/tests/ReflectionClass_isUserDefined_basic.phpt
index e9537c1e8a..ee2206177d 100644
--- a/ext/reflection/tests/ReflectionClass_isUserDefined_basic.phpt
+++ b/ext/reflection/tests/ReflectionClass_isUserDefined_basic.phpt
@@ -12,7 +12,7 @@ $r4 = new ReflectionClass("Exception");
$r5 = new ReflectionClass("C");
var_dump($r1->isUserDefined(), $r2->isUserDefined(), $r3->isUserDefined(),
- $r4->isUserDefined(), $r5->isUserDefined());
+ $r4->isUserDefined(), $r5->isUserDefined());
?>
--EXPECT--
bool(false)
diff --git a/ext/reflection/tests/ReflectionClass_modifiers_001.phpt b/ext/reflection/tests/ReflectionClass_modifiers_001.phpt
index 1370228f04..cb2a6555f1 100644
--- a/ext/reflection/tests/ReflectionClass_modifiers_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_modifiers_001.phpt
@@ -14,11 +14,11 @@ interface I {}
$classes = array("A", "B", "C", "D", "I");
foreach ($classes as $class) {
- $rc = new ReflectionClass($class);
- var_dump($rc->isFinal());
- var_dump($rc->isInterface());
- var_dump($rc->isAbstract());
- var_dump($rc->getModifiers());
+ $rc = new ReflectionClass($class);
+ var_dump($rc->isFinal());
+ var_dump($rc->isInterface());
+ var_dump($rc->isAbstract());
+ var_dump($rc->getModifiers());
}
?>
--EXPECT--
diff --git a/ext/reflection/tests/ReflectionClass_newInstanceArgs_001.phpt b/ext/reflection/tests/ReflectionClass_newInstanceArgs_001.phpt
index 9f721a4ad4..7dded54d3f 100644
--- a/ext/reflection/tests/ReflectionClass_newInstanceArgs_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_newInstanceArgs_001.phpt
@@ -7,21 +7,21 @@ Steve Seear <stevseea@php.net>
<?php
class B {
- public function __construct($a, $b) {
- echo "In constructor of class B with args $a, $b\n";
- }
+ public function __construct($a, $b) {
+ echo "In constructor of class B with args $a, $b\n";
+ }
}
class C {
- protected function __construct() {
- echo "In constructor of class C\n";
- }
+ protected function __construct() {
+ echo "In constructor of class C\n";
+ }
}
class D {
- private function __construct() {
- echo "In constructor of class D\n";
- }
+ private function __construct() {
+ echo "In constructor of class D\n";
+ }
}
class E {
}
@@ -33,35 +33,35 @@ $rcD = new ReflectionClass('D');
$rcE = new ReflectionClass('E');
try {
- $rcB->newInstanceArgs();
+ $rcB->newInstanceArgs();
} catch (Throwable $e) {
- echo "Exception: " . $e->getMessage() . "\n";
+ echo "Exception: " . $e->getMessage() . "\n";
}
var_dump($rcB->newInstanceArgs(array('x', 123)));
try {
- $rcC->newInstanceArgs();
- echo "you should not see this\n";
+ $rcC->newInstanceArgs();
+ echo "you should not see this\n";
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- $rcD->newInstanceArgs();
- echo "you should not see this\n";
+ $rcD->newInstanceArgs();
+ echo "you should not see this\n";
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
$e1 = $rcE->newInstanceArgs();
var_dump($e1);
try {
- $e2 = $rcE->newInstanceArgs(array('x'));
- echo "you should not see this\n";
+ $e2 = $rcE->newInstanceArgs(array('x'));
+ echo "you should not see this\n";
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
?>
--EXPECTF--
diff --git a/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt b/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt
index de4fe65ace..3295f06108 100644
--- a/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt
@@ -6,9 +6,9 @@ Steve Seear <stevseea@php.net>
--FILE--
<?php
class A {
- public function __construct($a, $b) {
- echo "In constructor of class B with arg $a\n";
- }
+ public function __construct($a, $b) {
+ echo "In constructor of class B with arg $a\n";
+ }
}
$rc = new ReflectionClass('A');
$a = $rc->newInstanceArgs('x');
diff --git a/ext/reflection/tests/ReflectionClass_newInstance_001.phpt b/ext/reflection/tests/ReflectionClass_newInstance_001.phpt
index bf68098a7d..22d06e3282 100644
--- a/ext/reflection/tests/ReflectionClass_newInstance_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_newInstance_001.phpt
@@ -7,21 +7,21 @@ Steve Seear <stevseea@php.net>
<?php
class B {
- public function __construct($a, $b) {
- echo "In constructor of class B with args $a, $b\n";
- }
+ public function __construct($a, $b) {
+ echo "In constructor of class B with args $a, $b\n";
+ }
}
class C {
- protected function __construct() {
- echo "In constructor of class C\n";
- }
+ protected function __construct() {
+ echo "In constructor of class C\n";
+ }
}
class D {
- private function __construct() {
- echo "In constructor of class D\n";
- }
+ private function __construct() {
+ echo "In constructor of class D\n";
+ }
}
class E {
@@ -33,38 +33,38 @@ $rcD = new ReflectionClass('D');
$rcE = new ReflectionClass('E');
try {
- var_dump($rcB->newInstance());
+ var_dump($rcB->newInstance());
} catch (Throwable $e) {
- echo "Exception: " . $e->getMessage() . "\n";
+ echo "Exception: " . $e->getMessage() . "\n";
}
try {
- var_dump($rcB->newInstance('x', 123));
+ var_dump($rcB->newInstance('x', 123));
} catch (Throwable $e) {
- echo "Exception: " . $e->getMessage() . "\n";
+ echo "Exception: " . $e->getMessage() . "\n";
}
try {
- $rcC->newInstance();
- echo "you should not see this\n";
+ $rcC->newInstance();
+ echo "you should not see this\n";
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- $rcD->newInstance();
- echo "you should not see this\n";
+ $rcD->newInstance();
+ echo "you should not see this\n";
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
$e1 = $rcE->newInstance();
var_dump($e1);
try {
- $e2 = $rcE->newInstance('x');
- echo "you should not see this\n";
+ $e2 = $rcE->newInstance('x');
+ echo "you should not see this\n";
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
?>
--EXPECTF--
diff --git a/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_001.phpt b/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_001.phpt
index bfefce369e..f51f4136b1 100644
--- a/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_001.phpt
@@ -6,15 +6,15 @@ Steve Seear <stevseea@php.net>
--FILE--
<?php
class A {
- static private $privateOverridden = "original private";
- static protected $protectedOverridden = "original protected";
- static public $publicOverridden = "original public";
+ static private $privateOverridden = "original private";
+ static protected $protectedOverridden = "original protected";
+ static public $publicOverridden = "original public";
}
class B extends A {
- static private $privateOverridden = "changed private";
- static protected $protectedOverridden = "changed protected";
- static public $publicOverridden = "changed public";
+ static private $privateOverridden = "changed private";
+ static protected $protectedOverridden = "changed protected";
+ static public $publicOverridden = "changed public";
}
echo "Set static values in A:\n";
@@ -35,17 +35,17 @@ print_r($rcB->getStaticProperties());
echo "\nSet non-existent values from A with no default value:\n";
try {
- var_dump($rcA->setStaticPropertyValue("protectedOverridden", "new value 8"));
- echo "you should not see this";
+ var_dump($rcA->setStaticPropertyValue("protectedOverridden", "new value 8"));
+ echo "you should not see this";
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rcA->setStaticPropertyValue("privateOverridden", "new value 9"));
- echo "you should not see this";
+ var_dump($rcA->setStaticPropertyValue("privateOverridden", "new value 9"));
+ echo "you should not see this";
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
?>
diff --git a/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt b/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt
index 6d3cf3a44f..9e4c69b489 100644
--- a/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt
@@ -6,39 +6,39 @@ Steve Seear <stevseea@php.net>
--FILE--
<?php
class C {
- public static $x;
+ public static $x;
}
$rc = new ReflectionClass('C');
try {
- var_dump($rc->setStaticPropertyValue("x", "default value", 'blah'));
+ var_dump($rc->setStaticPropertyValue("x", "default value", 'blah'));
} catch (TypeError $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->setStaticPropertyValue());
+ var_dump($rc->setStaticPropertyValue());
} catch (TypeError $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->setStaticPropertyValue(null));
+ var_dump($rc->setStaticPropertyValue(null));
} catch (TypeError $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->setStaticPropertyValue(null,null));
+ var_dump($rc->setStaticPropertyValue(null,null));
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->setStaticPropertyValue(1.5, 'def'));
+ var_dump($rc->setStaticPropertyValue(1.5, 'def'));
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($rc->setStaticPropertyValue(array(1,2,3), 'blah'));
+ var_dump($rc->setStaticPropertyValue(array(1,2,3), 'blah'));
} catch (TypeError $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
diff --git a/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_003.phpt b/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_003.phpt
index 352a79ece8..959cc1bea0 100644
--- a/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_003.phpt
+++ b/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_003.phpt
@@ -11,7 +11,7 @@ class Test {
$rc = new ReflectionClass('Test');
try {
- $rc->setStaticPropertyValue("y", "foo");
+ $rc->setStaticPropertyValue("y", "foo");
} catch (TypeError $e) { echo $e->getMessage(), "\n"; }
var_dump(Test::$y);
@@ -22,7 +22,7 @@ var_dump(Test::$y);
Test::$x =& Test::$y;
try {
- $rc->setStaticPropertyValue("x", "foo");
+ $rc->setStaticPropertyValue("x", "foo");
} catch (TypeError $e) { echo $e->getMessage(), "\n"; }
var_dump(Test::$y);
diff --git a/ext/reflection/tests/ReflectionClass_toString_002.phpt b/ext/reflection/tests/ReflectionClass_toString_002.phpt
index 5395ae66b9..a6824e540d 100644
--- a/ext/reflection/tests/ReflectionClass_toString_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_toString_002.phpt
@@ -6,21 +6,21 @@ Steve Seear <stevseea@php.net>
--FILE--
<?php
Class A {
- function f() {}
+ function f() {}
}
Class B extends A {
- function f() {}
+ function f() {}
}
Class C extends B {
}
Class D extends C {
- function f() {}
+ function f() {}
}
foreach (array('A', 'B', 'C', 'D') as $class) {
- echo "\n\n----( Reflection class $class: )----\n";
- $rc = new ReflectionClass($class);
- echo $rc;
+ echo "\n\n----( Reflection class $class: )----\n";
+ $rc = new ReflectionClass($class);
+ echo $rc;
}
?>
diff --git a/ext/reflection/tests/ReflectionClass_toString_003.phpt b/ext/reflection/tests/ReflectionClass_toString_003.phpt
index 1ce1fddf91..a67d0bfac5 100644
--- a/ext/reflection/tests/ReflectionClass_toString_003.phpt
+++ b/ext/reflection/tests/ReflectionClass_toString_003.phpt
@@ -6,21 +6,21 @@ Steve Seear <stevseea@php.net>
--FILE--
<?php
Class A {
- private function f() {}
+ private function f() {}
}
Class B extends A {
- private function f() {}
+ private function f() {}
}
Class C extends B {
}
Class D extends C {
- private function f() {}
+ private function f() {}
}
foreach (array('A', 'B', 'C', 'D') as $class) {
- echo "\n\n----( Reflection class $class: )----\n";
- $rc = new ReflectionClass($class);
- echo $rc;
+ echo "\n\n----( Reflection class $class: )----\n";
+ $rc = new ReflectionClass($class);
+ echo $rc;
}
?>
diff --git a/ext/reflection/tests/ReflectionExtension_constructor_error.phpt b/ext/reflection/tests/ReflectionExtension_constructor_error.phpt
index a0b920ac08..9f25858402 100644
--- a/ext/reflection/tests/ReflectionExtension_constructor_error.phpt
+++ b/ext/reflection/tests/ReflectionExtension_constructor_error.phpt
@@ -6,21 +6,21 @@ Leon Luijkx <leon@phpgg.nl>
--FILE--
<?php
try {
- $obj = new ReflectionExtension();
+ $obj = new ReflectionExtension();
} catch (TypeError $re) {
- echo "Ok - ".$re->getMessage().PHP_EOL;
+ echo "Ok - ".$re->getMessage().PHP_EOL;
}
try {
- $obj = new ReflectionExtension('foo', 'bar');
+ $obj = new ReflectionExtension('foo', 'bar');
} catch (TypeError $re) {
- echo "Ok - ".$re->getMessage().PHP_EOL;
+ echo "Ok - ".$re->getMessage().PHP_EOL;
}
try {
- $obj = new ReflectionExtension([]);
+ $obj = new ReflectionExtension([]);
} catch (TypeError $re) {
- echo "Ok - ".$re->getMessage().PHP_EOL;
+ echo "Ok - ".$re->getMessage().PHP_EOL;
}
diff --git a/ext/reflection/tests/ReflectionFunction_001.phpt b/ext/reflection/tests/ReflectionFunction_001.phpt
index 6785e5d0b1..4c0a58ca9d 100644
--- a/ext/reflection/tests/ReflectionFunction_001.phpt
+++ b/ext/reflection/tests/ReflectionFunction_001.phpt
@@ -10,10 +10,10 @@ Steve Seear <stevseea@php.net>
* my doc comment
*/
function foo () {
- static $c;
- static $a = 1;
- static $b = "hello";
- $d = 5;
+ static $c;
+ static $a = 1;
+ static $b = "hello";
+ $d = 5;
}
/***
@@ -23,13 +23,13 @@ function bar () {}
function dumpFuncInfo($name) {
- $funcInfo = new ReflectionFunction($name);
- var_dump($funcInfo->getName());
- var_dump($funcInfo->isInternal());
- var_dump($funcInfo->isUserDefined());
- var_dump($funcInfo->getStartLine());
- var_dump($funcInfo->getEndLine());
- var_dump($funcInfo->getStaticVariables());
+ $funcInfo = new ReflectionFunction($name);
+ var_dump($funcInfo->getName());
+ var_dump($funcInfo->isInternal());
+ var_dump($funcInfo->isUserDefined());
+ var_dump($funcInfo->getStartLine());
+ var_dump($funcInfo->getEndLine());
+ var_dump($funcInfo->getStaticVariables());
}
dumpFuncInfo('foo');
diff --git a/ext/reflection/tests/ReflectionFunction_construct.001.phpt b/ext/reflection/tests/ReflectionFunction_construct.001.phpt
index eab542e005..945060b073 100644
--- a/ext/reflection/tests/ReflectionFunction_construct.001.phpt
+++ b/ext/reflection/tests/ReflectionFunction_construct.001.phpt
@@ -7,30 +7,30 @@ Steve Seear <stevseea@php.net>
<?php
try {
- $a = new ReflectionFunction(array(1, 2, 3));
- echo "exception not thrown.".PHP_EOL;
+ $a = new ReflectionFunction(array(1, 2, 3));
+ echo "exception not thrown.".PHP_EOL;
} catch (TypeError $re) {
- echo "Ok - ".$re->getMessage().PHP_EOL;
+ echo "Ok - ".$re->getMessage().PHP_EOL;
}
try {
- $a = new ReflectionFunction('nonExistentFunction');
+ $a = new ReflectionFunction('nonExistentFunction');
} catch (ReflectionException $e) {
- echo $e->getMessage().PHP_EOL;
+ echo $e->getMessage().PHP_EOL;
}
try {
- $a = new ReflectionFunction();
+ $a = new ReflectionFunction();
} catch (TypeError $re) {
- echo "Ok - ".$re->getMessage().PHP_EOL;
+ echo "Ok - ".$re->getMessage().PHP_EOL;
}
try {
- $a = new ReflectionFunction(1, 2);
+ $a = new ReflectionFunction(1, 2);
} catch (TypeError $re) {
- echo "Ok - ".$re->getMessage().PHP_EOL;
+ echo "Ok - ".$re->getMessage().PHP_EOL;
}
try {
- $a = new ReflectionFunction([]);
+ $a = new ReflectionFunction([]);
} catch (TypeError $re) {
- echo "Ok - ".$re->getMessage().PHP_EOL;
+ echo "Ok - ".$re->getMessage().PHP_EOL;
}
?>
diff --git a/ext/reflection/tests/ReflectionFunction_getClosureScopeClass.phpt b/ext/reflection/tests/ReflectionFunction_getClosureScopeClass.phpt
index b8b969b0bc..f7cb6b36ec 100644
--- a/ext/reflection/tests/ReflectionFunction_getClosureScopeClass.phpt
+++ b/ext/reflection/tests/ReflectionFunction_getClosureScopeClass.phpt
@@ -7,9 +7,9 @@ $rf = new ReflectionFunction($closure);
var_dump($rf->getClosureScopeClass());
Class A {
- public static function getClosure() {
- return function($param) { return "this is a closure"; };
- }
+ public static function getClosure() {
+ return function($param) { return "this is a closure"; };
+ }
}
$closure = A::getClosure();
diff --git a/ext/reflection/tests/ReflectionFunction_getClosure_basic.phpt b/ext/reflection/tests/ReflectionFunction_getClosure_basic.phpt
index bb72137f69..7772da0509 100644
--- a/ext/reflection/tests/ReflectionFunction_getClosure_basic.phpt
+++ b/ext/reflection/tests/ReflectionFunction_getClosure_basic.phpt
@@ -12,12 +12,12 @@ echo "*** Testing ReflectionFunction::getClosure() : basic functionality ***\n";
function foo()
{
- var_dump( "Inside foo function" );
+ var_dump( "Inside foo function" );
}
function bar( $arg )
{
- var_dump( "Arg is " . $arg );
+ var_dump( "Arg is " . $arg );
}
$func = new ReflectionFunction( 'foo' );
diff --git a/ext/reflection/tests/ReflectionFunction_getDocComment.001.phpt b/ext/reflection/tests/ReflectionFunction_getDocComment.001.phpt
index 03cec2ee79..590f5cfa10 100644
--- a/ext/reflection/tests/ReflectionFunction_getDocComment.001.phpt
+++ b/ext/reflection/tests/ReflectionFunction_getDocComment.001.phpt
@@ -12,10 +12,10 @@ opcache.save_comments=1
* my doc comment
*/
function foo () {
- static $c;
- static $a = 1;
- static $b = "hello";
- $d = 5;
+ static $c;
+ static $a = 1;
+ static $b = "hello";
+ $d = 5;
}
/***
@@ -25,8 +25,8 @@ function bar () {}
function dumpFuncInfo($name) {
- $funcInfo = new ReflectionFunction($name);
- var_dump($funcInfo->getDocComment());
+ $funcInfo = new ReflectionFunction($name);
+ var_dump($funcInfo->getDocComment());
}
dumpFuncInfo('foo');
diff --git a/ext/reflection/tests/ReflectionFunction_getFileName.002.phpt b/ext/reflection/tests/ReflectionFunction_getFileName.002.phpt
index cd75418584..39fa48a3ff 100644
--- a/ext/reflection/tests/ReflectionFunction_getFileName.002.phpt
+++ b/ext/reflection/tests/ReflectionFunction_getFileName.002.phpt
@@ -10,10 +10,10 @@ Steve Seear <stevseea@php.net>
* my doc comment
*/
function foo () {
- static $c;
- static $a = 1;
- static $b = "hello";
- $d = 5;
+ static $c;
+ static $a = 1;
+ static $b = "hello";
+ $d = 5;
}
/***
@@ -23,8 +23,8 @@ function bar () {}
function dumpFuncInfo($name) {
- $funcInfo = new ReflectionFunction($name);
- var_dump($funcInfo->getFileName());
+ $funcInfo = new ReflectionFunction($name);
+ var_dump($funcInfo->getFileName());
}
dumpFuncInfo('foo');
diff --git a/ext/reflection/tests/ReflectionFunction_isGenerator_basic.phpt b/ext/reflection/tests/ReflectionFunction_isGenerator_basic.phpt
index 8bbbfa516f..b9a84d49c4 100644
--- a/ext/reflection/tests/ReflectionFunction_isGenerator_basic.phpt
+++ b/ext/reflection/tests/ReflectionFunction_isGenerator_basic.phpt
@@ -5,7 +5,7 @@ ReflectionFunction::isGenerator()
$closure1 = function() {return "this is a closure"; };
$closure2 = function($param) {
- yield $param;
+ yield $param;
};
$rf1 = new ReflectionFunction($closure1);
@@ -15,11 +15,11 @@ $rf2 = new ReflectionFunction($closure2);
var_dump($rf2->isGenerator());
function func1() {
- return 'func1';
+ return 'func1';
}
function func2() {
- yield 'func2';
+ yield 'func2';
}
$rf1 = new ReflectionFunction('func1');
@@ -30,17 +30,17 @@ var_dump($rf2->isGenerator());
class Foo {
- public function f1() {
- }
+ public function f1() {
+ }
- public function f2() {
- yield;
- }
+ public function f2() {
+ yield;
+ }
}
$rc = new ReflectionClass('Foo');
foreach($rc->getMethods() as $m) {
- var_dump($m->isGenerator());
+ var_dump($m->isGenerator());
}
?>
--EXPECT--
diff --git a/ext/reflection/tests/ReflectionGenerator_basic.phpt b/ext/reflection/tests/ReflectionGenerator_basic.phpt
index 6f35b6c244..f9ecc8e90e 100644
--- a/ext/reflection/tests/ReflectionGenerator_basic.phpt
+++ b/ext/reflection/tests/ReflectionGenerator_basic.phpt
@@ -4,33 +4,33 @@ ReflectionGenerator basic test
<?php
function foo() {
- yield;
+ yield;
}
$gens = [
- (new class() {
- function a() {
- yield from foo();
- }
- })->a(),
- (function() {
- yield;
- })(),
- foo(),
+ (new class() {
+ function a() {
+ yield from foo();
+ }
+ })->a(),
+ (function() {
+ yield;
+ })(),
+ foo(),
];
foreach ($gens as $gen) {
- var_dump($gen);
+ var_dump($gen);
- $gen->valid(); // start Generator
- $ref = new ReflectionGenerator($gen);
+ $gen->valid(); // start Generator
+ $ref = new ReflectionGenerator($gen);
- var_dump($ref->getTrace());
- var_dump($ref->getExecutingLine());
- var_dump($ref->getExecutingFile());
- var_dump($ref->getExecutingGenerator());
- var_dump($ref->getFunction());
- var_dump($ref->getThis());
+ var_dump($ref->getTrace());
+ var_dump($ref->getExecutingLine());
+ var_dump($ref->getExecutingFile());
+ var_dump($ref->getExecutingGenerator());
+ var_dump($ref->getFunction());
+ var_dump($ref->getThis());
}
?>
diff --git a/ext/reflection/tests/ReflectionGenerator_getTrace.phpt b/ext/reflection/tests/ReflectionGenerator_getTrace.phpt
index 05a46009e8..91b7160d4b 100644
--- a/ext/reflection/tests/ReflectionGenerator_getTrace.phpt
+++ b/ext/reflection/tests/ReflectionGenerator_getTrace.phpt
@@ -4,8 +4,8 @@ ReflectionGenerator::getTrace() over multiple Generators
<?php
function foo() {
- yield 1;
- yield 2;
+ yield 1;
+ yield 2;
}
function bar()
diff --git a/ext/reflection/tests/ReflectionGenerator_in_Generator.phpt b/ext/reflection/tests/ReflectionGenerator_in_Generator.phpt
index a227e1a213..a665d45c30 100644
--- a/ext/reflection/tests/ReflectionGenerator_in_Generator.phpt
+++ b/ext/reflection/tests/ReflectionGenerator_in_Generator.phpt
@@ -4,31 +4,31 @@ ReflectionGenerator while being currently executed
<?php
function call(ReflectionGenerator $ref, $method, $rec = true) {
- if ($rec) {
- call($ref, $method, false);
- return;
- }
- var_dump($ref->$method());
+ if ($rec) {
+ call($ref, $method, false);
+ return;
+ }
+ var_dump($ref->$method());
}
function doCalls(ReflectionGenerator $ref) {
- call($ref, "getTrace");
- call($ref, "getExecutingLine");
- call($ref, "getExecutingFile");
- call($ref, "getExecutingGenerator");
- call($ref, "getFunction");
- call($ref, "getThis");
+ call($ref, "getTrace");
+ call($ref, "getExecutingLine");
+ call($ref, "getExecutingFile");
+ call($ref, "getExecutingGenerator");
+ call($ref, "getFunction");
+ call($ref, "getThis");
}
($gen = (function() use (&$gen) {
- $ref = new ReflectionGenerator($gen);
+ $ref = new ReflectionGenerator($gen);
- doCalls($ref);
+ doCalls($ref);
- yield from (function() use ($ref) {
- doCalls($ref);
- yield; // Generator !
- })();
+ yield from (function() use ($ref) {
+ doCalls($ref);
+ yield; // Generator !
+ })();
})())->next();
?>
diff --git a/ext/reflection/tests/ReflectionMethod_006.phpt b/ext/reflection/tests/ReflectionMethod_006.phpt
index 81f8116d77..bb29b1cbed 100644
--- a/ext/reflection/tests/ReflectionMethod_006.phpt
+++ b/ext/reflection/tests/ReflectionMethod_006.phpt
@@ -7,14 +7,14 @@ Steve Seear <stevseea@php.net>
<?php
try {
- new ReflectionMethod();
+ new ReflectionMethod();
} catch (TypeError $re) {
- echo "Ok - ".$re->getMessage().PHP_EOL;
+ echo "Ok - ".$re->getMessage().PHP_EOL;
}
try {
- new ReflectionMethod('a', 'b', 'c');
+ new ReflectionMethod('a', 'b', 'c');
} catch (TypeError $re) {
- echo "Ok - ".$re->getMessage().PHP_EOL;
+ echo "Ok - ".$re->getMessage().PHP_EOL;
}
?>
diff --git a/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt b/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt
index 5c980536b9..186c61b2b0 100644
--- a/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt
+++ b/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt
@@ -14,52 +14,52 @@ class TestClass
try {
- echo "\nWrong type of argument (bool):\n";
- $methodInfo = new ReflectionMethod(true);
+ echo "\nWrong type of argument (bool):\n";
+ $methodInfo = new ReflectionMethod(true);
} catch (Exception $e) {
- print $e->__toString();
+ print $e->__toString();
}
try {
- echo "\nWrong type of argument (int):\n";
- $methodInfo = new ReflectionMethod(3);
+ echo "\nWrong type of argument (int):\n";
+ $methodInfo = new ReflectionMethod(3);
} catch (Exception $e) {
- print $e->__toString();
+ print $e->__toString();
}
try {
- echo "\nWrong type of argument (bool, string):\n";
- $methodInfo = new ReflectionMethod(true, "foo");
+ echo "\nWrong type of argument (bool, string):\n";
+ $methodInfo = new ReflectionMethod(true, "foo");
} catch (Exception $e) {
- print $e->__toString();
+ print $e->__toString();
}
try {
- echo "\nWrong type of argument (string, bool):\n";
- $methodInfo = new ReflectionMethod('TestClass', true);
+ echo "\nWrong type of argument (string, bool):\n";
+ $methodInfo = new ReflectionMethod('TestClass', true);
} catch (Exception $e) {
- print $e->__toString();
+ print $e->__toString();
}
try {
- echo "\nNo method given:\n";
- $methodInfo = new ReflectionMethod("TestClass");
+ echo "\nNo method given:\n";
+ $methodInfo = new ReflectionMethod("TestClass");
} catch (Exception $e) {
- print $e->__toString();
+ print $e->__toString();
}
try {
- echo "\nClass and Method in same string, bad method name:\n";
- $methodInfo = new ReflectionMethod("TestClass::foop::dedoop");
+ echo "\nClass and Method in same string, bad method name:\n";
+ $methodInfo = new ReflectionMethod("TestClass::foop::dedoop");
} catch (Exception $e) {
- print $e->__toString();
+ print $e->__toString();
}
try {
- echo "\nClass and Method in same string, bad class name:\n";
- $methodInfo = new ReflectionMethod("TestCla::foo");
+ echo "\nClass and Method in same string, bad class name:\n";
+ $methodInfo = new ReflectionMethod("TestCla::foo");
} catch (Exception $e) {
- print $e->__toString();
+ print $e->__toString();
}
try {
- echo "\nClass and Method in same string (ok):\n";
- $methodInfo = new ReflectionMethod("TestClass::foo");
+ echo "\nClass and Method in same string (ok):\n";
+ $methodInfo = new ReflectionMethod("TestClass::foo");
} catch (Exception $e) {
- print $e->__toString();
+ print $e->__toString();
}
?>
diff --git a/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt b/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt
index 723ab00f84..d84fa5dcff 100644
--- a/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt
+++ b/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt
@@ -14,39 +14,39 @@ class TestClass
try {
- echo "Too few arguments:\n";
- $methodInfo = new ReflectionMethod();
+ echo "Too few arguments:\n";
+ $methodInfo = new ReflectionMethod();
} catch (TypeError $re) {
- echo "Ok - ".$re->getMessage().PHP_EOL;
+ echo "Ok - ".$re->getMessage().PHP_EOL;
}
try {
- echo "\nToo many arguments:\n";
- $methodInfo = new ReflectionMethod("TestClass", "foo", true);
+ echo "\nToo many arguments:\n";
+ $methodInfo = new ReflectionMethod("TestClass", "foo", true);
} catch (TypeError $re) {
- echo "Ok - ".$re->getMessage().PHP_EOL;
+ echo "Ok - ".$re->getMessage().PHP_EOL;
}
try {
- //invalid class
- $methodInfo = new ReflectionMethod("InvalidClassName", "foo");
+ //invalid class
+ $methodInfo = new ReflectionMethod("InvalidClassName", "foo");
} catch (ReflectionException $re) {
- echo "Ok - ".$re->getMessage().PHP_EOL;
+ echo "Ok - ".$re->getMessage().PHP_EOL;
}
try {
- //invalid 1st param
- $methodInfo = new ReflectionMethod([], "foo");
+ //invalid 1st param
+ $methodInfo = new ReflectionMethod([], "foo");
} catch (ReflectionException $re) {
- echo "Ok - ".$re->getMessage().PHP_EOL;
+ echo "Ok - ".$re->getMessage().PHP_EOL;
}
try{
- //invalid 2nd param
- $methodInfo = new ReflectionMethod("TestClass", []);
+ //invalid 2nd param
+ $methodInfo = new ReflectionMethod("TestClass", []);
} catch (TypeError $re) {
- echo "Ok - ".$re->getMessage().PHP_EOL;
+ echo "Ok - ".$re->getMessage().PHP_EOL;
}
?>
diff --git a/ext/reflection/tests/ReflectionMethod_defaultArg.phpt b/ext/reflection/tests/ReflectionMethod_defaultArg.phpt
index 1c04cade5f..521f29da58 100644
--- a/ext/reflection/tests/ReflectionMethod_defaultArg.phpt
+++ b/ext/reflection/tests/ReflectionMethod_defaultArg.phpt
@@ -3,17 +3,17 @@ ReflectionMethod and RECV_INIT (bug #70957 and #70958)
--FILE--
<?php
Abstract class F {
- private function bar($a = self::class) {}
+ private function bar($a = self::class) {}
}
Trait T
{
- private function bar($a = self::class) {}
+ private function bar($a = self::class) {}
}
class B {
- use T;
+ use T;
}
echo new \ReflectionMethod('F', 'bar');
diff --git a/ext/reflection/tests/ReflectionMethod_getClosureThis.phpt b/ext/reflection/tests/ReflectionMethod_getClosureThis.phpt
index 3a931172f1..656fde814d 100644
--- a/ext/reflection/tests/ReflectionMethod_getClosureThis.phpt
+++ b/ext/reflection/tests/ReflectionMethod_getClosureThis.phpt
@@ -4,19 +4,19 @@ Reflection::getClosureThis()
<?php
class StaticExample
{
- static function foo()
- {
- var_dump( "Static Example class, Hello World!" );
- }
+ static function foo()
+ {
+ var_dump( "Static Example class, Hello World!" );
+ }
}
class Example
{
- public $bar = 42;
- public function foo()
- {
- var_dump( "Example class, bar: " . $this->bar );
- }
+ public $bar = 42;
+ public function foo()
+ {
+ var_dump( "Example class, bar: " . $this->bar );
+ }
}
// Initialize classes
diff --git a/ext/reflection/tests/ReflectionMethod_getClosure_basic.phpt b/ext/reflection/tests/ReflectionMethod_getClosure_basic.phpt
index 105df87e73..3b0074e5a9 100644
--- a/ext/reflection/tests/ReflectionMethod_getClosure_basic.phpt
+++ b/ext/reflection/tests/ReflectionMethod_getClosure_basic.phpt
@@ -12,19 +12,19 @@ echo "*** Testing ReflectionMethod::getClosure() : basic functionality ***\n";
class StaticExample
{
- static function foo()
- {
- var_dump( "Static Example class, Hello World!" );
- }
+ static function foo()
+ {
+ var_dump( "Static Example class, Hello World!" );
+ }
}
class Example
{
- public $bar = 42;
- public function foo()
- {
- var_dump( "Example class, bar: " . $this->bar );
- }
+ public $bar = 42;
+ public function foo()
+ {
+ var_dump( "Example class, bar: " . $this->bar );
+ }
}
// Initialize classes
diff --git a/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt b/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt
index 70c77895d0..728ddf9265 100644
--- a/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt
+++ b/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt
@@ -12,19 +12,19 @@ echo "*** Testing ReflectionMethod::getClosure() : error conditions ***\n";
class StaticExample
{
- static function foo()
- {
- var_dump( "Static Example class, Hello World!" );
- }
+ static function foo()
+ {
+ var_dump( "Static Example class, Hello World!" );
+ }
}
class Example
{
- public $bar = 42;
- public function foo()
- {
- var_dump( "Example class, bar: " . $this->bar );
- }
+ public $bar = 42;
+ public function foo()
+ {
+ var_dump( "Example class, bar: " . $this->bar );
+ }
}
// Initialize classes
diff --git a/ext/reflection/tests/ReflectionMethod_getDocComment_basic.phpt b/ext/reflection/tests/ReflectionMethod_getDocComment_basic.phpt
index f999b72812..7cda871c18 100644
--- a/ext/reflection/tests/ReflectionMethod_getDocComment_basic.phpt
+++ b/ext/reflection/tests/ReflectionMethod_getDocComment_basic.phpt
@@ -25,7 +25,7 @@ class A {
* My Doc Comment for A::finalStatPubf
*/
- final static public function finalStatPubf() {}
+ final static public function finalStatPubf() {}
}
diff --git a/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt b/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt
index d867993599..00c1514fd9 100644
--- a/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt
+++ b/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt
@@ -60,12 +60,12 @@ class TestClass
class DerivedClass extends TestClass {}
interface TestInterface {
- public function int();
- public function __clone();
+ public function int();
+ public function __clone();
}
abstract class AbstractClass {
- public abstract function foo();
+ public abstract function foo();
}
diff --git a/ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt b/ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt
index 156cc9db52..113cabbbeb 100644
--- a/ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt
+++ b/ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt
@@ -15,10 +15,10 @@ class TestClass {
public static function staticMethod() {
echo "Called staticMethod()\n";
try {
- var_dump($this);
- } catch (Throwable $e) {
- echo "Exception: " . $e->getMessage() . "\n";
- }
+ var_dump($this);
+ } catch (Throwable $e) {
+ echo "Exception: " . $e->getMessage() . "\n";
+ }
}
private static function privateMethod() {
diff --git a/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt b/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt
index 6711feb4ac..3ff1052a0a 100644
--- a/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt
+++ b/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt
@@ -23,10 +23,10 @@ class TestClass {
public static function staticMethod() {
echo "Called staticMethod()\n";
try {
- var_dump($this);
- } catch (Throwable $e) {
- echo "Exception: " . $e->getMessage() . "\n";
- }
+ var_dump($this);
+ } catch (Throwable $e) {
+ echo "Exception: " . $e->getMessage() . "\n";
+ }
}
private static function privateMethod() {
@@ -74,9 +74,9 @@ var_dump($staticMethod->invoke(new stdClass()));
echo "\nMethod that throws an exception:\n";
try {
- var_dump($methodThatThrows->invoke($testClassInstance));
+ var_dump($methodThatThrows->invoke($testClassInstance));
} catch (Exception $exc) {
- var_dump($exc->getMessage());
+ var_dump($exc->getMessage());
}
?>
diff --git a/ext/reflection/tests/ReflectionNamedType.phpt b/ext/reflection/tests/ReflectionNamedType.phpt
index 78fe1e8fd4..5677d22cf2 100644
--- a/ext/reflection/tests/ReflectionNamedType.phpt
+++ b/ext/reflection/tests/ReflectionNamedType.phpt
@@ -4,11 +4,11 @@ ReflectionNamedType::getName() and ReflectionNamedType::__toString()
<?php
function testInternalTypes(?Traversable $traversable): ?string {
- return 'test';
+ return 'test';
}
function testUserDefinedTypes(?Test $traversable): ?Test {
- return new Test;
+ return new Test;
}
$function = new ReflectionFunction('testInternalTypes');
diff --git a/ext/reflection/tests/ReflectionObject___toString_basic1.phpt b/ext/reflection/tests/ReflectionObject___toString_basic1.phpt
index 43210ea686..fdd25739bb 100644
--- a/ext/reflection/tests/ReflectionObject___toString_basic1.phpt
+++ b/ext/reflection/tests/ReflectionObject___toString_basic1.phpt
@@ -4,7 +4,7 @@ ReflectionObject::__toString() : very basic test with no dynamic properties
<?php
class Foo {
- public $bar = 1;
+ public $bar = 1;
}
$f = new foo;
diff --git a/ext/reflection/tests/ReflectionObject___toString_basic2.phpt b/ext/reflection/tests/ReflectionObject___toString_basic2.phpt
index 970d07b432..db119c92b6 100644
--- a/ext/reflection/tests/ReflectionObject___toString_basic2.phpt
+++ b/ext/reflection/tests/ReflectionObject___toString_basic2.phpt
@@ -4,7 +4,7 @@ ReflectionObject::__toString() : very basic test with dynamic properties
<?php
class Foo {
- public $bar = 1;
+ public $bar = 1;
}
$f = new foo;
$f->dynProp = 'hello';
diff --git a/ext/reflection/tests/ReflectionObject_export_basic1.phpt b/ext/reflection/tests/ReflectionObject_export_basic1.phpt
index 43210ea686..fdd25739bb 100644
--- a/ext/reflection/tests/ReflectionObject_export_basic1.phpt
+++ b/ext/reflection/tests/ReflectionObject_export_basic1.phpt
@@ -4,7 +4,7 @@ ReflectionObject::__toString() : very basic test with no dynamic properties
<?php
class Foo {
- public $bar = 1;
+ public $bar = 1;
}
$f = new foo;
diff --git a/ext/reflection/tests/ReflectionObject_export_basic2.phpt b/ext/reflection/tests/ReflectionObject_export_basic2.phpt
index 970d07b432..db119c92b6 100644
--- a/ext/reflection/tests/ReflectionObject_export_basic2.phpt
+++ b/ext/reflection/tests/ReflectionObject_export_basic2.phpt
@@ -4,7 +4,7 @@ ReflectionObject::__toString() : very basic test with dynamic properties
<?php
class Foo {
- public $bar = 1;
+ public $bar = 1;
}
$f = new foo;
$f->dynProp = 'hello';
diff --git a/ext/reflection/tests/ReflectionObject_export_basic3.phpt b/ext/reflection/tests/ReflectionObject_export_basic3.phpt
index a92c2d4921..612bfa5916 100644
--- a/ext/reflection/tests/ReflectionObject_export_basic3.phpt
+++ b/ext/reflection/tests/ReflectionObject_export_basic3.phpt
@@ -3,7 +3,7 @@ ReflectionObject::__toString() - ensure dynamic property with same name as inher
--FILE--
<?php
class C {
- private $p = 1;
+ private $p = 1;
}
class D extends C{
diff --git a/ext/reflection/tests/ReflectionObject_getConstant_basic.phpt b/ext/reflection/tests/ReflectionObject_getConstant_basic.phpt
index 9e61ee90da..c132f1121a 100644
--- a/ext/reflection/tests/ReflectionObject_getConstant_basic.phpt
+++ b/ext/reflection/tests/ReflectionObject_getConstant_basic.phpt
@@ -3,24 +3,24 @@ ReflectionObject::getConstant() basic function test
--FILE--
<?php
class C {
- const a = 'hello from C';
+ const a = 'hello from C';
}
class D extends C {
}
class E extends D {
}
class F extends E {
- const a = 'hello from F';
+ const a = 'hello from F';
}
class X {
}
$classes = array("C", "D", "E", "F", "X");
foreach($classes as $class) {
- echo "Reflecting on instance of class $class: \n";
- $rc = new ReflectionObject(new $class);
- var_dump($rc->getConstant('a'));
- var_dump($rc->getConstant('doesNotexist'));
+ echo "Reflecting on instance of class $class: \n";
+ $rc = new ReflectionObject(new $class);
+ var_dump($rc->getConstant('a'));
+ var_dump($rc->getConstant('doesNotexist'));
}
?>
--EXPECT--
diff --git a/ext/reflection/tests/ReflectionObject_getConstants_basic.phpt b/ext/reflection/tests/ReflectionObject_getConstants_basic.phpt
index 0ecbde7991..f5acde8be4 100644
--- a/ext/reflection/tests/ReflectionObject_getConstants_basic.phpt
+++ b/ext/reflection/tests/ReflectionObject_getConstants_basic.phpt
@@ -3,23 +3,23 @@ ReflectionObject::getConstants() - basic function test
--FILE--
<?php
class C {
- const a = 'hello from C';
+ const a = 'hello from C';
}
class D extends C {
}
class E extends D {
}
class F extends E {
- const a = 'hello from F';
+ const a = 'hello from F';
}
class X {
}
$classes = array("C", "D", "E", "F", "X");
foreach($classes as $class) {
- echo "Reflecting on instance of class $class: \n";
- $rc = new ReflectionObject(new $class);
- var_dump($rc->getConstants());
+ echo "Reflecting on instance of class $class: \n";
+ $rc = new ReflectionObject(new $class);
+ var_dump($rc->getConstants());
}
?>
diff --git a/ext/reflection/tests/ReflectionObject_getConstructor_basic.phpt b/ext/reflection/tests/ReflectionObject_getConstructor_basic.phpt
index fee873fe01..0401ed1e0c 100644
--- a/ext/reflection/tests/ReflectionObject_getConstructor_basic.phpt
+++ b/ext/reflection/tests/ReflectionObject_getConstructor_basic.phpt
@@ -3,45 +3,45 @@ ReflectionObject::getConstructor() - basic function test
--FILE--
<?php
class NewCtor {
- function __construct() {}
+ function __construct() {}
}
class ExtendsNewCtor extends NewCtor {
}
class X {
- function Y() {}
+ function Y() {}
}
class Y extends X {
}
class B {
- function B() {}
+ function B() {}
}
class C extends B {
- function C() {}
+ function C() {}
}
class D1 extends C {
- function __construct() {}
+ function __construct() {}
}
class D2 extends C {
}
$classes = array('NewCtor', 'ExtendsNewCtor',
- 'B', 'C', 'D1', 'D2', 'X', 'Y');
+ 'B', 'C', 'D1', 'D2', 'X', 'Y');
foreach ($classes as $class) {
- $rc = new ReflectionObject(new $class);
- $rm = $rc->getConstructor();
- if ($rm != null) {
- echo "Constructor of $class: " . $rm->getName() . "\n";
- } else {
- echo "No constructor for $class\n";
- }
+ $rc = new ReflectionObject(new $class);
+ $rm = $rc->getConstructor();
+ if ($rm != null) {
+ echo "Constructor of $class: " . $rm->getName() . "\n";
+ } else {
+ echo "No constructor for $class\n";
+ }
}
diff --git a/ext/reflection/tests/ReflectionObject_isInstance_basic.phpt b/ext/reflection/tests/ReflectionObject_isInstance_basic.phpt
index ff310df09b..146ac5ccd9 100644
--- a/ext/reflection/tests/ReflectionObject_isInstance_basic.phpt
+++ b/ext/reflection/tests/ReflectionObject_isInstance_basic.phpt
@@ -9,15 +9,15 @@ class X {}
$classes = array("A", "B", "X");
$instances = array( "myA" => new A,
- "myB" => new B,
- "myX" => new X );
+ "myB" => new B,
+ "myX" => new X );
foreach ($classes as $class) {
- $ro = new ReflectionObject(new $class);
- foreach ($instances as $name => $instance) {
- echo "is $name a $class? ";
- var_dump($ro->isInstance($instance));
- }
+ $ro = new ReflectionObject(new $class);
+ foreach ($instances as $name => $instance) {
+ echo "is $name a $class? ";
+ var_dump($ro->isInstance($instance));
+ }
}
?>
diff --git a/ext/reflection/tests/ReflectionObject_isInstantiable_basic.phpt b/ext/reflection/tests/ReflectionObject_isInstantiable_basic.phpt
index 982580fc56..1b30debc9d 100644
--- a/ext/reflection/tests/ReflectionObject_isInstantiable_basic.phpt
+++ b/ext/reflection/tests/ReflectionObject_isInstantiable_basic.phpt
@@ -6,28 +6,28 @@ class C {
}
interface iface {
- function f1();
+ function f1();
}
class ifaceImpl implements iface {
- function f1() {}
+ function f1() {}
}
abstract class abstractClass {
- function f1() {}
- abstract function f2();
+ function f1() {}
+ abstract function f2();
}
class D extends abstractClass {
- function f2() {}
+ function f2() {}
}
$classes = array("C", "ifaceImpl", "D");
foreach($classes as $class ) {
- $ro = new ReflectionObject(new $class);
- echo "Is $class instantiable? ";
- var_dump($ro->IsInstantiable());
+ $ro = new ReflectionObject(new $class);
+ echo "Is $class instantiable? ";
+ var_dump($ro->IsInstantiable());
}
?>
--EXPECT--
diff --git a/ext/reflection/tests/ReflectionObject_isInstantiable_variation.phpt b/ext/reflection/tests/ReflectionObject_isInstantiable_variation.phpt
index 3baa8a0950..dada6ffc78 100644
--- a/ext/reflection/tests/ReflectionObject_isInstantiable_variation.phpt
+++ b/ext/reflection/tests/ReflectionObject_isInstantiable_variation.phpt
@@ -4,43 +4,43 @@ ReflectionObject::IsInstantiable() - variation - constructors
<?php
class noCtor {
- public static function reflectionObjectFactory() {
- return new ReflectionObject(new self);
- }
+ public static function reflectionObjectFactory() {
+ return new ReflectionObject(new self);
+ }
}
class publicCtorNew {
- public function __construct() {}
- public static function reflectionObjectFactory() {
- return new ReflectionObject(new self);
- }
+ public function __construct() {}
+ public static function reflectionObjectFactory() {
+ return new ReflectionObject(new self);
+ }
}
class protectedCtorNew {
- protected function __construct() {}
- public static function reflectionObjectFactory() {
- return new ReflectionObject(new self);
- }
+ protected function __construct() {}
+ public static function reflectionObjectFactory() {
+ return new ReflectionObject(new self);
+ }
}
class privateCtorNew {
- private function __construct() {}
- public static function reflectionObjectFactory() {
- return new ReflectionObject(new self);
- }
+ private function __construct() {}
+ public static function reflectionObjectFactory() {
+ return new ReflectionObject(new self);
+ }
}
$reflectionObjects = array(
- noCtor::reflectionObjectFactory(),
- publicCtorNew::reflectionObjectFactory(),
- protectedCtorNew::reflectionObjectFactory(),
- privateCtorNew::reflectionObjectFactory(),
- );
+ noCtor::reflectionObjectFactory(),
+ publicCtorNew::reflectionObjectFactory(),
+ protectedCtorNew::reflectionObjectFactory(),
+ privateCtorNew::reflectionObjectFactory(),
+ );
foreach ($reflectionObjects as $reflectionObject) {
- $name = $reflectionObject->getName();
- echo "Is $name instantiable? ";
- var_dump($reflectionObject->IsInstantiable());
+ $name = $reflectionObject->getName();
+ echo "Is $name instantiable? ";
+ var_dump($reflectionObject->IsInstantiable());
}
?>
--EXPECT--
diff --git a/ext/reflection/tests/ReflectionObject_isInternal_basic.phpt b/ext/reflection/tests/ReflectionObject_isInternal_basic.phpt
index 234b8eb27e..8f1c6fc841 100644
--- a/ext/reflection/tests/ReflectionObject_isInternal_basic.phpt
+++ b/ext/reflection/tests/ReflectionObject_isInternal_basic.phpt
@@ -12,7 +12,7 @@ $r4 = new ReflectionObject(new Exception);
$r5 = new ReflectionObject(new C);
var_dump($r1->isInternal(), $r2->isInternal(), $r3->isInternal(),
- $r4->isInternal(), $r5->isInternal());
+ $r4->isInternal(), $r5->isInternal());
?>
--EXPECT--
diff --git a/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt b/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt
index a2484f9dc2..5cebd43016 100644
--- a/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt
+++ b/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt
@@ -10,29 +10,29 @@ $ro = new ReflectionObject(new C);
echo "\n\nTest bad arguments:\n";
try {
- var_dump($ro->isSubclassOf());
+ var_dump($ro->isSubclassOf());
} catch (TypeError $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($ro->isSubclassOf('C', 'C'));
+ var_dump($ro->isSubclassOf('C', 'C'));
} catch (TypeError $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($ro->isSubclassOf(null));
+ var_dump($ro->isSubclassOf(null));
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($ro->isSubclassOf('ThisClassDoesNotExist'));
+ var_dump($ro->isSubclassOf('ThisClassDoesNotExist'));
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- var_dump($ro->isSubclassOf(2));
+ var_dump($ro->isSubclassOf(2));
} catch (Exception $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
?>
--EXPECT--
diff --git a/ext/reflection/tests/ReflectionObject_isSubclassOf_basic.phpt b/ext/reflection/tests/ReflectionObject_isSubclassOf_basic.phpt
index 25c29c7534..095c59fa34 100644
--- a/ext/reflection/tests/ReflectionObject_isSubclassOf_basic.phpt
+++ b/ext/reflection/tests/ReflectionObject_isSubclassOf_basic.phpt
@@ -13,28 +13,28 @@ $classNames = array('A', 'B', 'C', 'I', 'X');
//Create ReflectionClasses
foreach ($classNames as $className) {
- $rcs[$className] = new ReflectionClass($className);
+ $rcs[$className] = new ReflectionClass($className);
}
//Create ReflectionObjects
foreach ($classNames as $className) {
- if ($rcs[$className]->isInstantiable()) {
- $ros[$className] = new ReflectionObject(new $className);
- }
+ if ($rcs[$className]->isInstantiable()) {
+ $ros[$className] = new ReflectionObject(new $className);
+ }
}
foreach ($ros as $childName => $child) {
- foreach ($rcs as $parentName => $parent) {
- echo "Is " . $childName . " a subclass of " . $parentName . "? \n";
- echo " - Using ReflectionClass object argument: ";
- var_dump($child->isSubclassOf($parent));
- if ($parent->isInstantiable()) {
- echo " - Using ReflectionObject object argument: ";
- var_dump($child->isSubclassOf($ros[$parentName]));
- }
- echo " - Using string argument: ";
- var_dump($child->isSubclassOf($parentName));
- }
+ foreach ($rcs as $parentName => $parent) {
+ echo "Is " . $childName . " a subclass of " . $parentName . "? \n";
+ echo " - Using ReflectionClass object argument: ";
+ var_dump($child->isSubclassOf($parent));
+ if ($parent->isInstantiable()) {
+ echo " - Using ReflectionObject object argument: ";
+ var_dump($child->isSubclassOf($ros[$parentName]));
+ }
+ echo " - Using string argument: ";
+ var_dump($child->isSubclassOf($parentName));
+ }
}
?>
--EXPECT--
diff --git a/ext/reflection/tests/ReflectionObject_isUserDefined_basic.phpt b/ext/reflection/tests/ReflectionObject_isUserDefined_basic.phpt
index 1a9dea3aba..f561b909e4 100644
--- a/ext/reflection/tests/ReflectionObject_isUserDefined_basic.phpt
+++ b/ext/reflection/tests/ReflectionObject_isUserDefined_basic.phpt
@@ -12,7 +12,7 @@ $r4 = new ReflectionObject(new Exception);
$r5 = new ReflectionObject(new C);
var_dump($r1->isUserDefined(), $r2->isUserDefined(), $r3->isUserDefined(),
- $r4->isUserDefined(), $r5->isUserDefined());
+ $r4->isUserDefined(), $r5->isUserDefined());
?>
--EXPECT--
diff --git a/ext/reflection/tests/ReflectionParameter_001.phpt b/ext/reflection/tests/ReflectionParameter_001.phpt
index 822da2fe9a..b2b5218724 100644
--- a/ext/reflection/tests/ReflectionParameter_001.phpt
+++ b/ext/reflection/tests/ReflectionParameter_001.phpt
@@ -11,11 +11,11 @@ class ReflectTestClass {
}
public function oneArgNonStatic($theParam) {
- $theParam--;
+ $theParam--;
}
public function noArgs() {
- echo "No arg function\n";
+ echo "No arg function\n";
}
}
@@ -25,18 +25,18 @@ $method = new ReflectionMethod('ReflectTestClass', 'twoArgFunction');
$parameters = $method->getParameters();
echo "Parameters from twoArgMethod:\n\n";
foreach($parameters as $parameter) {
- var_dump($parameter);
- $name = $parameter->getName();
- echo "\n";
+ var_dump($parameter);
+ $name = $parameter->getName();
+ echo "\n";
}
$method = new ReflectionMethod('ReflectTestClass', 'oneArgNonStatic');
$parameters = $method->getParameters();
echo "Parameters from oneArgNonStatic:\n\n";
foreach($parameters as $parameter) {
- var_dump($parameter);
- $name = $parameter->getName();
- echo "\n";
+ var_dump($parameter);
+ $name = $parameter->getName();
+ echo "\n";
}
@@ -45,9 +45,9 @@ $parameters = $method->getParameters();
echo "Parameters from noArgs:\n\n";
var_dump($parameters);
foreach($parameters as $parameter) {
- var_dump($parameter);
- $name = $parameter->getName();
- echo "\n";
+ var_dump($parameter);
+ $name = $parameter->getName();
+ echo "\n";
}
echo "done\n";
diff --git a/ext/reflection/tests/ReflectionParameter_002.phpt b/ext/reflection/tests/ReflectionParameter_002.phpt
index 571edac7a9..7ff12c2d33 100644
--- a/ext/reflection/tests/ReflectionParameter_002.phpt
+++ b/ext/reflection/tests/ReflectionParameter_002.phpt
@@ -21,11 +21,11 @@ $method = new ReflectionMethod('ReflectTestClass', 'staticMethod');
$parameters = $method->getParameters();
echo "Parameters from staticMethod:\n\n";
foreach($parameters as $parameter) {
- var_dump($parameter);
+ var_dump($parameter);
if($parameter->isPassedByReference()) {
- echo "This param is passed by reference\n";
+ echo "This param is passed by reference\n";
} else {
- echo "This param is not passed by reference\n";
+ echo "This param is not passed by reference\n";
}
echo "\n";
}
@@ -36,11 +36,11 @@ $method = new ReflectionMethod('ReflectTestClass', 'instanceMethod');
$parameters = $method->getParameters();
echo "Parameters from instanceMethod:\n\n";
foreach($parameters as $parameter) {
- var_dump($parameter);
+ var_dump($parameter);
if($parameter->isPassedByReference()) {
- echo "This param is passed by reference\n";
+ echo "This param is passed by reference\n";
} else {
- echo "This param is not passed by reference\n";
+ echo "This param is not passed by reference\n";
}
echo "\n";
}
diff --git a/ext/reflection/tests/ReflectionParameter_003.phpt b/ext/reflection/tests/ReflectionParameter_003.phpt
index 581c486f62..8396eeb97c 100644
--- a/ext/reflection/tests/ReflectionParameter_003.phpt
+++ b/ext/reflection/tests/ReflectionParameter_003.phpt
@@ -24,31 +24,31 @@ $refParameters = $refMethod->getParameters();
echo "parameter names from staticMethod method:\n\n";
foreach($refParameters as $parameter) {
- var_dump($parameter);
- if($parameter->isOptional()) {
- echo "this parameter is optional\n";
- } else {
- echo "this parameter is not optional\n";
- }
+ var_dump($parameter);
+ if($parameter->isOptional()) {
+ echo "this parameter is optional\n";
+ } else {
+ echo "this parameter is not optional\n";
+ }
- if($parameter->isDefaultValueAvailable()) {
- echo "this parameter has a default value\n";
- } else {
- echo "this parameter has no default value\n";
- }
+ if($parameter->isDefaultValueAvailable()) {
+ echo "this parameter has a default value\n";
+ } else {
+ echo "this parameter has no default value\n";
+ }
- /*
- $val = 0;
- try {
- $val = $parameter->getDefaultValue();
- var_dump($val);
- } catch (ReflectionException $e) {
- print $e->getMessage();
- echo "\n";
- }
- */
+ /*
+ $val = 0;
+ try {
+ $val = $parameter->getDefaultValue();
+ var_dump($val);
+ } catch (ReflectionException $e) {
+ print $e->getMessage();
+ echo "\n";
+ }
+ */
- echo "\n";
+ echo "\n";
}
?>
diff --git a/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic1.phpt b/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic1.phpt
index 7a92edc4cc..4f3f114bad 100644
--- a/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic1.phpt
+++ b/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic1.phpt
@@ -6,30 +6,30 @@ ReflectionParameter::isDefaultValueConstant() && getDefaultValueConstantName()
define("CONST_TEST_1", "const1");
function ReflectionParameterTest($test1=array(), $test2 = CONST_TEST_1, $test3 = CASE_LOWER) {
- echo $test;
+ echo $test;
}
$reflect = new ReflectionFunction('ReflectionParameterTest');
foreach($reflect->getParameters() as $param) {
- if($param->getName() == 'test1') {
- var_dump($param->isDefaultValueConstant());
- }
- if($param->getName() == 'test2') {
- var_dump($param->isDefaultValueConstant());
- }
- if($param->isDefaultValueAvailable() && $param->isDefaultValueConstant()) {
- var_dump($param->getDefaultValueConstantName());
- }
+ if($param->getName() == 'test1') {
+ var_dump($param->isDefaultValueConstant());
+ }
+ if($param->getName() == 'test2') {
+ var_dump($param->isDefaultValueConstant());
+ }
+ if($param->isDefaultValueAvailable() && $param->isDefaultValueConstant()) {
+ var_dump($param->getDefaultValueConstantName());
+ }
}
class Foo2 {
- const bar = 'Foo2::bar';
+ const bar = 'Foo2::bar';
}
class Foo {
- const bar = 'Foo::bar';
+ const bar = 'Foo::bar';
- public function baz($param1 = self::bar, $param2=Foo2::bar, $param3=CONST_TEST_1) {
- }
+ public function baz($param1 = self::bar, $param2=Foo2::bar, $param3=CONST_TEST_1) {
+ }
}
$method = new ReflectionMethod('Foo', 'baz');
diff --git a/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic2.phpt b/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic2.phpt
index 1ee9e93735..28aeceeb2f 100644
--- a/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic2.phpt
+++ b/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic2.phpt
@@ -4,24 +4,24 @@ ReflectionParameter::isDefaultValueConstant() && getDefaultValueConstantName() f
<?php
namespace ReflectionTestNamespace {
- CONST TEST_CONST_1 = "Test Const 1";
+ CONST TEST_CONST_1 = "Test Const 1";
- class TestClass {
- const TEST_CONST_2 = "Test Const 2 in class";
- }
+ class TestClass {
+ const TEST_CONST_2 = "Test Const 2 in class";
+ }
}
namespace {
- function ReflectionParameterTest($test=ReflectionTestNamespace\TestClass::TEST_CONST_2, $test2 = ReflectionTestNamespace\CONST_TEST_1) {
- echo $test;
- }
- $reflect = new ReflectionFunction('ReflectionParameterTest');
- foreach($reflect->getParameters() as $param) {
- if($param->isDefaultValueAvailable() && $param->isDefaultValueConstant()) {
- echo $param->getDefaultValueConstantName() . "\n";
- }
- }
- echo "==DONE==";
+ function ReflectionParameterTest($test=ReflectionTestNamespace\TestClass::TEST_CONST_2, $test2 = ReflectionTestNamespace\CONST_TEST_1) {
+ echo $test;
+ }
+ $reflect = new ReflectionFunction('ReflectionParameterTest');
+ foreach($reflect->getParameters() as $param) {
+ if($param->isDefaultValueAvailable() && $param->isDefaultValueConstant()) {
+ echo $param->getDefaultValueConstantName() . "\n";
+ }
+ }
+ echo "==DONE==";
}
?>
--EXPECT--
diff --git a/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_error.phpt b/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_error.phpt
index a2c2d24582..7f1451bbdb 100644
--- a/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_error.phpt
+++ b/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_error.phpt
@@ -6,16 +6,16 @@ ReflectionParameter::getDefaultValueConstant() should raise exception on non opt
define("CONST_TEST_1", "const1");
function ReflectionParameterTest($test, $test2 = CONST_TEST_1) {
- echo $test;
+ echo $test;
}
$reflect = new ReflectionFunction('ReflectionParameterTest');
foreach($reflect->getParameters() as $param) {
- try {
- echo $param->getDefaultValueConstantName() . "\n";
- }
- catch(ReflectionException $e) {
- echo $e->getMessage() . "\n";
- }
+ try {
+ echo $param->getDefaultValueConstantName() . "\n";
+ }
+ catch(ReflectionException $e) {
+ echo $e->getMessage() . "\n";
+ }
}
?>
--EXPECT--
diff --git a/ext/reflection/tests/ReflectionParameter_export_basic.phpt b/ext/reflection/tests/ReflectionParameter_export_basic.phpt
index 8286078135..22b25de663 100644
--- a/ext/reflection/tests/ReflectionParameter_export_basic.phpt
+++ b/ext/reflection/tests/ReflectionParameter_export_basic.phpt
@@ -5,11 +5,11 @@ Stefan Koopmanschap <stefan@stefankoopmanschap.nl>
--FILE--
<?php
function ReflectionParameterTest($test, $test2 = null) {
- echo $test;
+ echo $test;
}
$reflect = new ReflectionFunction('ReflectionParameterTest');
foreach($reflect->getParameters() as $key => $value) {
- echo new ReflectionParameter('ReflectionParameterTest', $key), "\n";
+ echo new ReflectionParameter('ReflectionParameterTest', $key), "\n";
}
?>
--EXPECTF--
diff --git a/ext/reflection/tests/ReflectionParameter_export_error2.phpt b/ext/reflection/tests/ReflectionParameter_export_error2.phpt
index 38cd99171b..3def577e06 100644
--- a/ext/reflection/tests/ReflectionParameter_export_error2.phpt
+++ b/ext/reflection/tests/ReflectionParameter_export_error2.phpt
@@ -5,25 +5,25 @@ Stefan Koopmanschap <stefan@stefankoopmanschap.nl>
--FILE--
<?php
function ReflectionParameterTest($test, $test2 = null) {
- echo $test;
+ echo $test;
}
$reflect = new ReflectionFunction('ReflectionParameterTest');
$params = $reflect->getParameters();
try {
- foreach($params as $key => $value) {
- ReflectionParameter::export($reflect, $key);
- }
+ foreach($params as $key => $value) {
+ ReflectionParameter::export($reflect, $key);
+ }
}
catch (ReflectionException $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
try {
- foreach($params as $key => $value) {
- ReflectionParameter::export(42, $key);
- }
+ foreach($params as $key => $value) {
+ ReflectionParameter::export(42, $key);
+ }
}
catch (ReflectionException $e) {
- echo $e->getMessage() . "\n";
+ echo $e->getMessage() . "\n";
}
?>
--EXPECTF--
diff --git a/ext/reflection/tests/ReflectionParameter_export_error3.phpt b/ext/reflection/tests/ReflectionParameter_export_error3.phpt
index b098a9251d..822fca0032 100644
--- a/ext/reflection/tests/ReflectionParameter_export_error3.phpt
+++ b/ext/reflection/tests/ReflectionParameter_export_error3.phpt
@@ -5,12 +5,12 @@ Stefan Koopmanschap <stefan@stefankoopmanschap.nl>
--FILE--
<?php
function ReflectionParameterTest($test, $test2 = null) {
- echo $test;
+ echo $test;
}
$reflect = new ReflectionFunction('ReflectionParameterTest');
$params = $reflect->getParameters();
foreach($params as $key => $value) {
- ReflectionParameter::export('ReflectionParameterTest', 'incorrect_parameter');
+ ReflectionParameter::export('ReflectionParameterTest', 'incorrect_parameter');
}
--EXPECTF--
Deprecated: Function ReflectionParameter::export() is deprecated in %s on line %d
diff --git a/ext/reflection/tests/ReflectionParameter_getDeclaringFunction_basic.phpt b/ext/reflection/tests/ReflectionParameter_getDeclaringFunction_basic.phpt
index 18d4eb69a4..7cbef67292 100644
--- a/ext/reflection/tests/ReflectionParameter_getDeclaringFunction_basic.phpt
+++ b/ext/reflection/tests/ReflectionParameter_getDeclaringFunction_basic.phpt
@@ -6,12 +6,12 @@ Stefan Koopmanschap <stefan@stefankoopmanschap.nl>
--FILE--
<?php
function ReflectionParameterTest($test, $test2 = null) {
- echo $test;
+ echo $test;
}
$reflect = new ReflectionFunction('ReflectionParameterTest');
$params = $reflect->getParameters();
foreach($params as $key => $value) {
- echo $value->getDeclaringFunction() . "\n";
+ echo $value->getDeclaringFunction() . "\n";
}
?>
--EXPECTF--
diff --git a/ext/reflection/tests/ReflectionParameter_getPosition_basic.phpt b/ext/reflection/tests/ReflectionParameter_getPosition_basic.phpt
index c5df520c42..485ca37a2b 100644
--- a/ext/reflection/tests/ReflectionParameter_getPosition_basic.phpt
+++ b/ext/reflection/tests/ReflectionParameter_getPosition_basic.phpt
@@ -6,12 +6,12 @@ Stefan Koopmanschap <stefan@stefankoopmanschap.nl>
--FILE--
<?php
function ReflectionParameterTest($test, $test2 = null) {
- echo $test;
+ echo $test;
}
$reflect = new ReflectionFunction('ReflectionParameterTest');
$params = $reflect->getParameters();
foreach($params as $key => $value) {
- var_dump($value->getPosition());
+ var_dump($value->getPosition());
}
?>
--EXPECT--
diff --git a/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt b/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt
index eb6d4644a0..ee6ae86cba 100644
--- a/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt
+++ b/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt
@@ -5,17 +5,17 @@ ReflectionParameter::__construct(): Invalid method as constructor
// Invalid class name
try {
- new ReflectionParameter (array ('A', 'b'), 0);
+ new ReflectionParameter (array ('A', 'b'), 0);
} catch (ReflectionException $e) { echo $e->getMessage()."\n"; }
// Invalid class method
try {
- new ReflectionParameter (array ('C', 'b'), 0);
+ new ReflectionParameter (array ('C', 'b'), 0);
} catch (ReflectionException $e) { echo $e->getMessage ()."\n"; }
// Invalid object method
try {
- new ReflectionParameter (array (new C, 'b'), 0);
+ new ReflectionParameter (array (new C, 'b'), 0);
} catch (ReflectionException $e) { echo $e->getMessage ()."\n"; }
@@ -23,17 +23,17 @@ class C {
}
try {
- new ReflectionParameter(array ('A', 'b'));
+ new ReflectionParameter(array ('A', 'b'));
}
catch(TypeError $e) {
- printf( "Ok - %s\n", $e->getMessage());
+ printf( "Ok - %s\n", $e->getMessage());
}
try {
- new ReflectionParameter(0, 0);
+ new ReflectionParameter(0, 0);
}
catch(ReflectionException $e) {
- printf( "Ok - %s\n", $e->getMessage());
+ printf( "Ok - %s\n", $e->getMessage());
}
echo "Done.\n";
diff --git a/ext/reflection/tests/ReflectionParameter_toString_basic.phpt b/ext/reflection/tests/ReflectionParameter_toString_basic.phpt
index 35134b7e2d..053c3918db 100644
--- a/ext/reflection/tests/ReflectionParameter_toString_basic.phpt
+++ b/ext/reflection/tests/ReflectionParameter_toString_basic.phpt
@@ -5,12 +5,12 @@ Stefan Koopmanschap <stefan@stefankoopmanschap.nl>
--FILE--
<?php
function ReflectionParameterTest($test, $test2 = null, ...$test3) {
- echo $test;
+ echo $test;
}
$reflect = new ReflectionFunction('ReflectionParameterTest');
$params = $reflect->getParameters();
foreach($params as $key => $value) {
- echo $value->__toString() . "\n";
+ echo $value->__toString() . "\n";
}
?>
--EXPECT--
diff --git a/ext/reflection/tests/ReflectionProperty_constructor_variation1.phpt b/ext/reflection/tests/ReflectionProperty_constructor_variation1.phpt
index 6f39f9db6c..4456960dc7 100644
--- a/ext/reflection/tests/ReflectionProperty_constructor_variation1.phpt
+++ b/ext/reflection/tests/ReflectionProperty_constructor_variation1.phpt
@@ -4,27 +4,27 @@ ReflectionProperty::__construct(): ensure inherited private props can't be acces
<?php
class C {
- private $p = 1;
-
- static function testFromC() {
- try {
- $rp = new ReflectionProperty("D", "p");
- var_dump($rp);
- } catch (Exception $e) {
- echo $e->getMessage();
- }
- }
+ private $p = 1;
+
+ static function testFromC() {
+ try {
+ $rp = new ReflectionProperty("D", "p");
+ var_dump($rp);
+ } catch (Exception $e) {
+ echo $e->getMessage();
+ }
+ }
}
class D extends C{
- static function testFromD() {
- try {
- $rp = new ReflectionProperty("D", "p");
- var_dump($rp);
- } catch (Exception $e) {
- echo $e->getMessage();
- }
- }
+ static function testFromD() {
+ try {
+ $rp = new ReflectionProperty("D", "p");
+ var_dump($rp);
+ } catch (Exception $e) {
+ echo $e->getMessage();
+ }
+ }
}
echo "--> Reflect inherited private from global scope:\n";
@@ -32,7 +32,7 @@ try {
$rp = new ReflectionProperty("D", "p");
var_dump($rp);
} catch (Exception $e) {
- echo $e->getMessage();
+ echo $e->getMessage();
}
echo "\n\n--> Reflect inherited private from declaring scope:\n";
diff --git a/ext/reflection/tests/ReflectionProperty_error.phpt b/ext/reflection/tests/ReflectionProperty_error.phpt
index a7fdff5000..052bfcb97c 100644
--- a/ext/reflection/tests/ReflectionProperty_error.phpt
+++ b/ext/reflection/tests/ReflectionProperty_error.phpt
@@ -8,20 +8,20 @@ class C {
}
try {
- new ReflectionProperty();
+ new ReflectionProperty();
} catch (TypeError $re) {
- echo "Ok - ".$re->getMessage().PHP_EOL;
+ echo "Ok - ".$re->getMessage().PHP_EOL;
}
try {
- new ReflectionProperty('C::p');
+ new ReflectionProperty('C::p');
} catch (TypeError $re) {
- echo "Ok - ".$re->getMessage().PHP_EOL;
+ echo "Ok - ".$re->getMessage().PHP_EOL;
}
try {
- new ReflectionProperty('C', 'p', 'x');
+ new ReflectionProperty('C', 'p', 'x');
} catch (TypeError $re) {
- echo "Ok - ".$re->getMessage().PHP_EOL;
+ echo "Ok - ".$re->getMessage().PHP_EOL;
}
?>
diff --git a/ext/reflection/tests/ReflectionProperty_getModifiers.001.phpt b/ext/reflection/tests/ReflectionProperty_getModifiers.001.phpt
index a297a10436..da6cf71b9c 100644
--- a/ext/reflection/tests/ReflectionProperty_getModifiers.001.phpt
+++ b/ext/reflection/tests/ReflectionProperty_getModifiers.001.phpt
@@ -7,15 +7,15 @@ Steve Seear <stevseea@php.net>
<?php
function reflectProperty($class, $property) {
- $propInfo = new ReflectionProperty($class, $property);
+ $propInfo = new ReflectionProperty($class, $property);
- echo "**********************************\n";
- echo "Reflecting on property $class::$property\n\n";
+ echo "**********************************\n";
+ echo "Reflecting on property $class::$property\n\n";
- echo "getModifiers():\n";
- var_dump($propInfo->getModifiers());
+ echo "getModifiers():\n";
+ var_dump($propInfo->getModifiers());
- echo "\n**********************************\n";
+ echo "\n**********************************\n";
}
class TestClass
@@ -23,8 +23,8 @@ class TestClass
public $pub;
static public $stat = "static property";
/**
- * This property has a comment.
- */
+ * This property has a comment.
+ */
protected $prot = 4;
private $priv = "keepOut";
}
diff --git a/ext/reflection/tests/ReflectionProperty_isInitialized.phpt b/ext/reflection/tests/ReflectionProperty_isInitialized.phpt
index f1f6e53ebd..260084fae4 100644
--- a/ext/reflection/tests/ReflectionProperty_isInitialized.phpt
+++ b/ext/reflection/tests/ReflectionProperty_isInitialized.phpt
@@ -4,12 +4,12 @@ Test ReflectionProperty::isInitialized()
<?php
class A {
- public static ?string $ssv = null;
- public static ?string $ss;
- public static $s;
- public ?int $iv = null;
- public ?int $i;
- public $n;
+ public static ?string $ssv = null;
+ public static ?string $ss;
+ public static $s;
+ public ?int $iv = null;
+ public ?int $i;
+ public $n;
private int $p;
}
diff --git a/ext/reflection/tests/ReflectionType_001.phpt b/ext/reflection/tests/ReflectionType_001.phpt
index 1eb521317c..e31dc11348 100644
--- a/ext/reflection/tests/ReflectionType_001.phpt
+++ b/ext/reflection/tests/ReflectionType_001.phpt
@@ -77,22 +77,22 @@ foreach ([
echo "\n*** property types\n";
class PropTypeTest {
- public int $int;
- public string $string;
- public array $arr;
- public iterable $iterable;
- public stdClass $std;
- public OtherThing $other;
- public $mixed;
+ public int $int;
+ public string $string;
+ public array $arr;
+ public iterable $iterable;
+ public stdClass $std;
+ public OtherThing $other;
+ public $mixed;
}
$reflector = new ReflectionClass(PropTypeTest::class);
foreach ($reflector->getProperties() as $name => $property) {
- if ($property->hasType()) {
- printf("public %s $%s;\n",
- $property->getType()->getName(), $property->getName());
- } else printf("public $%s;\n", $property->getName());
+ if ($property->hasType()) {
+ printf("public %s $%s;\n",
+ $property->getType()->getName(), $property->getName());
+ } else printf("public $%s;\n", $property->getName());
}
echo "*** resolved property types\n";
diff --git a/ext/reflection/tests/bug26640.phpt b/ext/reflection/tests/bug26640.phpt
index 8a93d72247..203785f1dc 100644
--- a/ext/reflection/tests/bug26640.phpt
+++ b/ext/reflection/tests/bug26640.phpt
@@ -4,19 +4,19 @@ Reflection Bug #26640 (__autoload() not invoked by Reflection classes)
<?php
spl_autoload_register(function ($c) {
- class autoload_class
- {
- public function __construct()
- {
- print "autoload success\n";
- }
- }
+ class autoload_class
+ {
+ public function __construct()
+ {
+ print "autoload success\n";
+ }
+ }
});
$a = new ReflectionClass('autoload_class');
if (is_object($a)) {
- echo "OK\n";
+ echo "OK\n";
}
?>
diff --git a/ext/reflection/tests/bug29268.phpt b/ext/reflection/tests/bug29268.phpt
index 9166bd3aa9..596d3aba1e 100644
--- a/ext/reflection/tests/bug29268.phpt
+++ b/ext/reflection/tests/bug29268.phpt
@@ -3,21 +3,21 @@ Reflection Bug #29268 (__autoload() not called with reflectionProperty->getClass
--FILE--
<?php
spl_autoload_register(function ($classname) {
- echo "__autoload($classname)\n";
- eval("class $classname {}");
+ echo "__autoload($classname)\n";
+ eval("class $classname {}");
});
class B{
- public function doit(A $a){
- }
+ public function doit(A $a){
+ }
}
$ref = new reflectionMethod('B','doit');
$parameters = $ref->getParameters();
foreach($parameters as $parameter)
{
- $class = $parameter->getClass();
- echo $class->name."\n";
+ $class = $parameter->getClass();
+ echo $class->name."\n";
}
echo "ok\n";
?>
diff --git a/ext/reflection/tests/bug29523.phpt b/ext/reflection/tests/bug29523.phpt
index fafc93ef40..a85612935e 100644
--- a/ext/reflection/tests/bug29523.phpt
+++ b/ext/reflection/tests/bug29523.phpt
@@ -16,15 +16,15 @@ $numberOfNotOptionalParameters = 0;
$numberOfOptionalParameters = 0;
foreach($function->getParameters() as $parameter)
{
- var_dump($parameter->isOptional());
- if ($parameter->isOptional())
- {
- ++$numberOfOptionalParameters;
- }
- else
- {
- ++$numberOfNotOptionalParameters;
- }
+ var_dump($parameter->isOptional());
+ if ($parameter->isOptional())
+ {
+ ++$numberOfOptionalParameters;
+ }
+ else
+ {
+ ++$numberOfNotOptionalParameters;
+ }
}
var_dump($function->getNumberOfRequiredParameters());
var_dump($numberOfNotOptionalParameters);
diff --git a/ext/reflection/tests/bug29828.phpt b/ext/reflection/tests/bug29828.phpt
index a5f3e30c6f..15c1229cc0 100644
--- a/ext/reflection/tests/bug29828.phpt
+++ b/ext/reflection/tests/bug29828.phpt
@@ -5,15 +5,15 @@ Reflection Bug #29828 (Interfaces no longer work)
interface Bla
{
- function bla();
+ function bla();
}
class BlaMore implements Bla
{
- function bla()
- {
- echo "Hello\n";
- }
+ function bla()
+ {
+ echo "Hello\n";
+ }
}
$r = new ReflectionClass('BlaMore');
diff --git a/ext/reflection/tests/bug30209.phpt b/ext/reflection/tests/bug30209.phpt
index 27b546d1cd..0dc453e6c0 100644
--- a/ext/reflection/tests/bug30209.phpt
+++ b/ext/reflection/tests/bug30209.phpt
@@ -5,20 +5,20 @@ Reflection Bug #30209 (ReflectionClass::getMethod() lowercases attribute)
class Foo
{
- private $name = 'testBAR';
+ private $name = 'testBAR';
- public function testBAR()
- {
- try
- {
- $class = new ReflectionClass($this);
- var_dump($this->name);
- $method = $class->getMethod($this->name);
- var_dump($this->name);
- }
+ public function testBAR()
+ {
+ try
+ {
+ $class = new ReflectionClass($this);
+ var_dump($this->name);
+ $method = $class->getMethod($this->name);
+ var_dump($this->name);
+ }
- catch (Exception $e) {}
- }
+ catch (Exception $e) {}
+ }
}
$foo = new Foo;
diff --git a/ext/reflection/tests/bug31651.phpt b/ext/reflection/tests/bug31651.phpt
index 59f19eae5d..e356baf148 100644
--- a/ext/reflection/tests/bug31651.phpt
+++ b/ext/reflection/tests/bug31651.phpt
@@ -5,7 +5,7 @@ Reflection Bug #31651 (ReflectionClass::getDefaultProperties segfaults with arra
class Test
{
- public $a = array('a' => 1);
+ public $a = array('a' => 1);
}
$ref = new ReflectionClass('Test');
diff --git a/ext/reflection/tests/bug32981.phpt b/ext/reflection/tests/bug32981.phpt
index 0e3b721a64..fc6960866f 100644
--- a/ext/reflection/tests/bug32981.phpt
+++ b/ext/reflection/tests/bug32981.phpt
@@ -5,17 +5,17 @@ Reflection Bug #32981 (ReflectionMethod::getStaticVariables() causes apache2.0.5
class TestClass
{
- static function test()
- {
- static $enabled = true;
- }
+ static function test()
+ {
+ static $enabled = true;
+ }
}
$class = new ReflectionClass('TestClass');
foreach ($class->getMethods() as $method)
{
- var_dump($method->getName());
- $arr_static_vars[] = $method->getStaticVariables();
+ var_dump($method->getName());
+ $arr_static_vars[] = $method->getStaticVariables();
}
var_dump($arr_static_vars);
diff --git a/ext/reflection/tests/bug36434.phpt b/ext/reflection/tests/bug36434.phpt
index 502ac741a9..04cdcbf01d 100644
--- a/ext/reflection/tests/bug36434.phpt
+++ b/ext/reflection/tests/bug36434.phpt
@@ -5,24 +5,24 @@ Reflection Bug #36434 (Properties from parent class fail to indetify their true
class ancester
{
public $ancester = 0;
- function __construct()
- {
- return $this->ancester;
- }
+ function __construct()
+ {
+ return $this->ancester;
+ }
}
class foo extends ancester
{
public $bar = "1";
- function __construct()
- {
- return $this->bar;
- }
+ function __construct()
+ {
+ return $this->bar;
+ }
}
$r = new ReflectionClass('foo');
foreach ($r->GetProperties() as $p)
{
- echo $p->getName(). " ". $p->getDeclaringClass()->getName()."\n";
+ echo $p->getName(). " ". $p->getDeclaringClass()->getName()."\n";
}
?>
diff --git a/ext/reflection/tests/bug37816.phpt b/ext/reflection/tests/bug37816.phpt
index 3942265a0e..eec6f09411 100644
--- a/ext/reflection/tests/bug37816.phpt
+++ b/ext/reflection/tests/bug37816.phpt
@@ -5,7 +5,7 @@ Bug #37816 (ReflectionProperty does not throw exception when accessing protected
class TestClass
{
- protected $p = 2;
+ protected $p = 2;
}
$o = new TestClass;
@@ -14,11 +14,11 @@ $r = new ReflectionProperty($o, 'p');
try
{
- $x = $r->getValue($o);
+ $x = $r->getValue($o);
}
catch (Exception $e)
{
- echo 'Caught: ' . $e->getMessage() . "\n";
+ echo 'Caught: ' . $e->getMessage() . "\n";
}
?>
diff --git a/ext/reflection/tests/bug37964.phpt b/ext/reflection/tests/bug37964.phpt
index f3ebe9f72a..59b5f85590 100644
--- a/ext/reflection/tests/bug37964.phpt
+++ b/ext/reflection/tests/bug37964.phpt
@@ -4,19 +4,19 @@ Reflection Bug #37964 (Reflection shows private methods of parent class)
<?php
abstract class foobar {
- private function test2() {
- }
+ private function test2() {
+ }
}
class foo extends foobar {
- private $foo = 1;
- private function test() {
- }
- protected function test3() {
- }
+ private $foo = 1;
+ private function test() {
+ }
+ protected function test3() {
+ }
}
class bar extends foo {
- private function foobar() {
- }
+ private function foobar() {
+ }
}
echo new ReflectionClass(new bar);
diff --git a/ext/reflection/tests/bug38132.phpt b/ext/reflection/tests/bug38132.phpt
index 16e56411f2..e500616604 100644
--- a/ext/reflection/tests/bug38132.phpt
+++ b/ext/reflection/tests/bug38132.phpt
@@ -3,8 +3,8 @@ Reflection Bug #38132 (ReflectionClass::getStaticProperties() retains \0 in key
--FILE--
<?php
class foo {
- static protected $bar = 'baz';
- static public $a = 'a';
+ static protected $bar = 'baz';
+ static public $a = 'a';
}
$class = new ReflectionClass('foo');
diff --git a/ext/reflection/tests/bug38217.phpt b/ext/reflection/tests/bug38217.phpt
index 46f2dc3e0e..cc7525c813 100644
--- a/ext/reflection/tests/bug38217.phpt
+++ b/ext/reflection/tests/bug38217.phpt
@@ -4,24 +4,24 @@ Bug #38217 (ReflectionClass::newInstanceArgs() tries to allocate too much memory
<?php
class ObjectOne {
- public function __construct() {
- }
+ public function __construct() {
+ }
}
$class= new ReflectionClass('ObjectOne');
var_dump($class->newInstanceArgs());
class ObjectTwo {
- public function __construct($var) {
- var_dump($var);
- }
+ public function __construct($var) {
+ var_dump($var);
+ }
}
$class= new ReflectionClass('ObjectTwo');
try {
- var_dump($class->newInstanceArgs());
+ var_dump($class->newInstanceArgs());
} catch (Throwable $e) {
- echo "Exception: " . $e->getMessage() . "\n";
+ echo "Exception: " . $e->getMessage() . "\n";
}
var_dump($class->newInstanceArgs(array('test')));
diff --git a/ext/reflection/tests/bug38653.phpt b/ext/reflection/tests/bug38653.phpt
index 64b1aad15b..36504e7c7b 100644
--- a/ext/reflection/tests/bug38653.phpt
+++ b/ext/reflection/tests/bug38653.phpt
@@ -4,9 +4,9 @@ Bug #38653 (memory leak in ReflectionClass::getConstant())
<?php
class foo {
- const cons = 10;
- const cons1 = "";
- const cons2 = "test";
+ const cons = 10;
+ const cons1 = "";
+ const cons2 = "test";
}
class bar extends foo {
diff --git a/ext/reflection/tests/bug39001.phpt b/ext/reflection/tests/bug39001.phpt
index ec4b7a5d1b..1e390341e7 100644
--- a/ext/reflection/tests/bug39001.phpt
+++ b/ext/reflection/tests/bug39001.phpt
@@ -7,8 +7,8 @@ class Meta {
}
class CParent extends Meta {
- public $publicVar;
- protected $protectedVar;
+ public $publicVar;
+ protected $protectedVar;
}
class Child extends CParent {
diff --git a/ext/reflection/tests/bug39067.phpt b/ext/reflection/tests/bug39067.phpt
index f549f794e0..05ce90be46 100644
--- a/ext/reflection/tests/bug39067.phpt
+++ b/ext/reflection/tests/bug39067.phpt
@@ -4,15 +4,15 @@ Bug #39067 (getDeclaringClass() and private properties)
<?php
class A {
- private $x;
+ private $x;
}
class B extends A {
- private $x;
+ private $x;
}
class C extends B {
- private $x;
+ private $x;
}
$rc = new ReflectionClass('C');
@@ -25,11 +25,11 @@ $rc = new ReflectionClass('A');
var_dump($rc->getProperty('x')->getDeclaringClass()->getName());
class Test {
- private $x;
+ private $x;
}
class Test2 extends Test {
- public $x;
+ public $x;
}
$rc = new ReflectionClass('Test2');
diff --git a/ext/reflection/tests/bug40431.phpt b/ext/reflection/tests/bug40431.phpt
index 637b1457cd..41620a3926 100644
--- a/ext/reflection/tests/bug40431.phpt
+++ b/ext/reflection/tests/bug40431.phpt
@@ -56,7 +56,7 @@ var_dump($props[0]->isProtected());
echo "=== 4th test ===\n";
class test5 {
- private $value = 1;
+ private $value = 1;
}
class test4 extends test5{
diff --git a/ext/reflection/tests/bug40794.phpt b/ext/reflection/tests/bug40794.phpt
index c1830ddcd2..1f1bb61c58 100644
--- a/ext/reflection/tests/bug40794.phpt
+++ b/ext/reflection/tests/bug40794.phpt
@@ -13,7 +13,7 @@ $reflect = new ReflectionObject($obj);
$array = array();
foreach($reflect->getProperties() as $prop)
{
- $array[$prop->getName()] = $prop->getValue($obj);
+ $array[$prop->getName()] = $prop->getValue($obj);
}
var_dump($array);
diff --git a/ext/reflection/tests/bug41884.phpt b/ext/reflection/tests/bug41884.phpt
index 25d2b7cb74..ae9655765e 100644
--- a/ext/reflection/tests/bug41884.phpt
+++ b/ext/reflection/tests/bug41884.phpt
@@ -5,8 +5,8 @@ Bug #41884 (ReflectionClass::getDefaultProperties() does not handle static attri
class Foo
{
- protected static $fooStatic = 'foo';
- protected $foo = 'foo';
+ protected static $fooStatic = 'foo';
+ protected $foo = 'foo';
}
$class = new ReflectionClass('Foo');
diff --git a/ext/reflection/tests/bug42976.phpt b/ext/reflection/tests/bug42976.phpt
index 0b147aa811..d8ab797b92 100644
--- a/ext/reflection/tests/bug42976.phpt
+++ b/ext/reflection/tests/bug42976.phpt
@@ -4,9 +4,9 @@ Bug #42976 (Crash when constructor for newInstance() or newInstanceArgs() fails)
<?php
Class C {
- function __construct(&$x) {
- $x = "x.changed";
- }
+ function __construct(&$x) {
+ $x = "x.changed";
+ }
}
$x = "x.original";
diff --git a/ext/reflection/tests/bug45139.phpt b/ext/reflection/tests/bug45139.phpt
index 6aa84263c6..5a8f62d0cd 100644
--- a/ext/reflection/tests/bug45139.phpt
+++ b/ext/reflection/tests/bug45139.phpt
@@ -4,19 +4,19 @@ Bug #45139 (ReflectionProperty returns incorrect declaring class)
<?php
class A {
- private $foo;
+ private $foo;
}
class B extends A {
- protected $bar;
- private $baz;
- private $quux;
+ protected $bar;
+ private $baz;
+ private $quux;
}
class C extends B {
- public $foo;
- private $baz;
- protected $quux;
+ public $foo;
+ private $baz;
+ protected $quux;
}
$rc = new ReflectionClass('C');
diff --git a/ext/reflection/tests/bug45571.phpt b/ext/reflection/tests/bug45571.phpt
index 74245fc24c..aa482193a7 100644
--- a/ext/reflection/tests/bug45571.phpt
+++ b/ext/reflection/tests/bug45571.phpt
@@ -4,12 +4,12 @@ Bug #45571 (ReflectionClass::__toString() shows superclasses' private static met
<?php
Class A {
- static private $a = 0;
- static protected $b = 1;
- static public $c = 2;
+ static private $a = 0;
+ static protected $b = 1;
+ static public $c = 2;
- private function f() {}
- private static function sf() {}
+ private function f() {}
+ private static function sf() {}
}
Class C extends A { }
diff --git a/ext/reflection/tests/bug45765.phpt b/ext/reflection/tests/bug45765.phpt
index 5c33faca2b..af8dd9b47a 100644
--- a/ext/reflection/tests/bug45765.phpt
+++ b/ext/reflection/tests/bug45765.phpt
@@ -4,23 +4,23 @@ Fixed bug #45765 (ReflectionObject with default parameters of self::xxx cause an
<?php
class foo2 {
- const BAR = 'foobar';
+ const BAR = 'foobar';
}
class foo extends foo2 {
- const BAR = "foo's bar";
+ const BAR = "foo's bar";
- function test($a = self::BAR) {
- }
+ function test($a = self::BAR) {
+ }
- function test2($a = parent::BAR) {
- }
+ function test2($a = parent::BAR) {
+ }
- function test3($a = foo::BAR) {
- }
+ function test3($a = foo::BAR) {
+ }
- function test4($a = foo2::BAR) {
- }
+ function test4($a = foo2::BAR) {
+ }
}
echo new ReflectionObject(new foo);
diff --git a/ext/reflection/tests/bug46064.phpt b/ext/reflection/tests/bug46064.phpt
index f11de98733..4a97b3b22a 100644
--- a/ext/reflection/tests/bug46064.phpt
+++ b/ext/reflection/tests/bug46064.phpt
@@ -4,7 +4,7 @@ Bug #46064 (Exception when creating ReflectionProperty object on dynamicly creat
<?php
class x {
- public $zzz = 2;
+ public $zzz = 2;
}
$o = new x;
@@ -21,25 +21,25 @@ var_dump($h->getValue($o));
print "---------------------------\n";
try {
- var_dump(new reflectionproperty($o, 'zz'));
+ var_dump(new reflectionproperty($o, 'zz'));
} catch (Exception $e) {
- var_dump($e->getMessage());
+ var_dump($e->getMessage());
}
var_dump(new reflectionproperty($o, 'zzz'));
class test {
- protected $a = 1;
+ protected $a = 1;
}
class bar extends test {
- public function __construct() {
- $this->foobar = 2;
- $this->a = 200;
+ public function __construct() {
+ $this->foobar = 2;
+ $this->a = 200;
- $p = new reflectionproperty($this, 'foobar');
- var_dump($p->getValue($this), $p->isDefault(), $p->isPublic());
- }
+ $p = new reflectionproperty($this, 'foobar');
+ var_dump($p->getValue($this), $p->isDefault(), $p->isPublic());
+ }
}
new bar;
diff --git a/ext/reflection/tests/bug46064_2.phpt b/ext/reflection/tests/bug46064_2.phpt
index 9e10167d30..f1aac5b5c0 100644
--- a/ext/reflection/tests/bug46064_2.phpt
+++ b/ext/reflection/tests/bug46064_2.phpt
@@ -15,22 +15,22 @@ var_dump($p->getProperty('test'));
class bar {
- public function __construct() {
- $this->a = 1;
- }
+ public function __construct() {
+ $this->a = 1;
+ }
}
class test extends bar {
- private $b = 2;
+ private $b = 2;
- public function __construct() {
- parent::__construct();
+ public function __construct() {
+ parent::__construct();
- $p = new reflectionobject($this);
- var_dump($h = $p->getProperty('a'));
- var_dump($h->isDefault(), $h->isProtected(), $h->isPrivate(), $h->isPublic(), $h->isStatic());
- var_dump($p->getProperties());
- }
+ $p = new reflectionobject($this);
+ var_dump($h = $p->getProperty('a'));
+ var_dump($h->isDefault(), $h->isProtected(), $h->isPrivate(), $h->isPublic(), $h->isStatic());
+ var_dump($p->getProperties());
+ }
}
new test;
diff --git a/ext/reflection/tests/bug46205.phpt b/ext/reflection/tests/bug46205.phpt
index 5ca8ac1cd0..78e381370e 100644
--- a/ext/reflection/tests/bug46205.phpt
+++ b/ext/reflection/tests/bug46205.phpt
@@ -6,7 +6,7 @@ $x = new reflectionmethod('reflectionparameter', 'export');
$y = function() { };
try {
- $x->invokeArgs(new reflectionparameter('trim', 'str'), array($y, 1));
+ $x->invokeArgs(new reflectionparameter('trim', 'str'), array($y, 1));
} catch (Exception $e) { }
?>
ok
diff --git a/ext/reflection/tests/bug47254.phpt b/ext/reflection/tests/bug47254.phpt
index b6f33fcfc6..6330d6603f 100644
--- a/ext/reflection/tests/bug47254.phpt
+++ b/ext/reflection/tests/bug47254.phpt
@@ -8,13 +8,13 @@ Testfest 2009 Munich
<?php
class A
{
- protected function a() {}
+ protected function a() {}
}
class B extends A
{
- public function b() {}
+ public function b() {}
}
$B = new B();
diff --git a/ext/reflection/tests/bug48757.phpt b/ext/reflection/tests/bug48757.phpt
index a5ced91d3a..45393470d3 100644
--- a/ext/reflection/tests/bug48757.phpt
+++ b/ext/reflection/tests/bug48757.phpt
@@ -3,11 +3,11 @@ Bug #48757 (ReflectionFunction::invoke() parameter issues)
--FILE--
<?php
function test() {
- echo "Hello World\n";
+ echo "Hello World\n";
}
function another_test($parameter) {
- var_dump($parameter);
+ var_dump($parameter);
}
$func = new ReflectionFunction('test');
diff --git a/ext/reflection/tests/bug49074.phpt b/ext/reflection/tests/bug49074.phpt
index 7ce23b41e4..b39814cdf6 100644
--- a/ext/reflection/tests/bug49074.phpt
+++ b/ext/reflection/tests/bug49074.phpt
@@ -3,13 +3,13 @@ Bug #49074 (private class static fields can be modified by using reflection)
--FILE--
<?php
class Test {
- private static $data1 = 1;
- private static $data4 = 4;
+ private static $data1 = 1;
+ private static $data4 = 4;
}
class Test2 extends Test {
- private static $data2 = 2;
- public static $data3 = 3;
+ private static $data2 = 2;
+ public static $data3 = 3;
}
$r = new ReflectionClass('Test2');
diff --git a/ext/reflection/tests/bug49719.phpt b/ext/reflection/tests/bug49719.phpt
index 6211b6b543..37f6ae38af 100644
--- a/ext/reflection/tests/bug49719.phpt
+++ b/ext/reflection/tests/bug49719.phpt
@@ -4,30 +4,30 @@ Bug #49719 (ReflectionClass::hasProperty returns true for a private property in
<?php
class A {
- private $a;
+ private $a;
}
class B extends A {
- private $b;
+ private $b;
}
try {
- $b = new B;
- $ref = new ReflectionClass($b);
+ $b = new B;
+ $ref = new ReflectionClass($b);
- var_dump(property_exists('b', 'a'));
- var_dump(property_exists($b, 'a'));
- var_dump($ref->hasProperty('a'));
- var_dump($ref->getProperty('a'));
+ var_dump(property_exists('b', 'a'));
+ var_dump(property_exists($b, 'a'));
+ var_dump($ref->hasProperty('a'));
+ var_dump($ref->getProperty('a'));
} catch (Exception $e) {
- var_dump($e->getMessage());
+ var_dump($e->getMessage());
}
class A2 {
- private $a = 1;
+ private $a = 1;
}
class B2 extends A2 {
- private $a = 2;
+ private $a = 2;
}
$b2 = new ReflectionClass('B2');
diff --git a/ext/reflection/tests/bug51905.phpt b/ext/reflection/tests/bug51905.phpt
index 8969924e45..2d956386a5 100644
--- a/ext/reflection/tests/bug51905.phpt
+++ b/ext/reflection/tests/bug51905.phpt
@@ -4,12 +4,12 @@ Bug #51905 (ReflectionParameter fails if default value is an array with an acces
<?php
class Bar {
- const Y = 20;
+ const Y = 20;
}
class Foo extends Bar {
- const X = 12;
- public function x($x = 1, $y = array(self::X), $z = parent::Y) {}
+ const X = 12;
+ public function x($x = 1, $y = array(self::X), $z = parent::Y) {}
}
$clazz = new ReflectionClass('Foo');
diff --git a/ext/reflection/tests/bug52854.phpt b/ext/reflection/tests/bug52854.phpt
index 255522de5d..2d174bc11e 100644
--- a/ext/reflection/tests/bug52854.phpt
+++ b/ext/reflection/tests/bug52854.phpt
@@ -11,9 +11,9 @@ var_dump($c->newInstance());
var_dump($c->newInstanceArgs(array()));
try {
- var_dump($c->newInstanceArgs(array(1)));
+ var_dump($c->newInstanceArgs(array(1)));
} catch(ReflectionException $e) {
- echo $e->getMessage()."\n";
+ echo $e->getMessage()."\n";
}
?>
--EXPECTF--
diff --git a/ext/reflection/tests/bug53915.phpt b/ext/reflection/tests/bug53915.phpt
index f2f2ae5675..f4df7cc839 100644
--- a/ext/reflection/tests/bug53915.phpt
+++ b/ext/reflection/tests/bug53915.phpt
@@ -4,8 +4,8 @@ Bug #53915 - ReflectionClass::getConstant(s) emits fatal error on selfreferencin
<?php
Class Foo
{
- const A = 1;
- const B = self::A;
+ const A = 1;
+ const B = self::A;
}
$rc = new ReflectionClass('Foo');
diff --git a/ext/reflection/tests/bug60367.phpt b/ext/reflection/tests/bug60367.phpt
index 3834445733..afc67ccc47 100644
--- a/ext/reflection/tests/bug60367.phpt
+++ b/ext/reflection/tests/bug60367.phpt
@@ -4,17 +4,17 @@ Bug #60367 (Reflection and Late Static Binding)
<?php
abstract class A {
- const WHAT = 'A';
+ const WHAT = 'A';
- public static function call() {
- echo static::WHAT;
- }
+ public static function call() {
+ echo static::WHAT;
+ }
}
class B extends A {
- const WHAT = 'B';
+ const WHAT = 'B';
}
diff --git a/ext/reflection/tests/bug64239.phpt b/ext/reflection/tests/bug64239.phpt
index 9acdc1987b..100c09d2eb 100644
--- a/ext/reflection/tests/bug64239.phpt
+++ b/ext/reflection/tests/bug64239.phpt
@@ -3,11 +3,11 @@ Bug #64239 (ReflectionClass::getMethods() changed behavior)
--FILE--
<?php
class A {
- use T2 { t2method as Bmethod; }
+ use T2 { t2method as Bmethod; }
}
trait T2 {
- public function t2method() {
- }
+ public function t2method() {
+ }
}
class B extends A{
diff --git a/ext/reflection/tests/bug64936.phpt b/ext/reflection/tests/bug64936.phpt
index 71be47f65b..ae63d43008 100644
--- a/ext/reflection/tests/bug64936.phpt
+++ b/ext/reflection/tests/bug64936.phpt
@@ -9,8 +9,8 @@ opcache.save_comments=1
function strip_doc_comment($c)
{
- if (!strlen($c) || $c === false) return $c;
- return trim(substr($c, 3, -2));
+ if (!strlen($c) || $c === false) return $c;
+ return trim(substr($c, 3, -2));
}
token_get_all("<?php\n/**\n * Foo\n */"); // doc_comment compiler global now contains this Foo comment
diff --git a/ext/reflection/tests/bug66430.phpt b/ext/reflection/tests/bug66430.phpt
index 921e2c99d8..bd3100b47b 100644
--- a/ext/reflection/tests/bug66430.phpt
+++ b/ext/reflection/tests/bug66430.phpt
@@ -4,11 +4,11 @@ Bug #66430: ReflectionFunction::invoke does not invoke closure with object scope
<?php
class Alpha {
- public $message = "Valid representation";
+ public $message = "Valid representation";
- public function bravo() {
- return $this->message;
- }
+ public function bravo() {
+ return $this->message;
+ }
}
$alpha = new Alpha();
diff --git a/ext/reflection/tests/bug70982.phpt b/ext/reflection/tests/bug70982.phpt
index d530846f64..644531e373 100644
--- a/ext/reflection/tests/bug70982.phpt
+++ b/ext/reflection/tests/bug70982.phpt
@@ -3,11 +3,11 @@ Bug #70982 (setStaticPropertyValue behaviors inconsistently with 5.6)
--FILE--
<?php
class Foo {
- static $abc;
- function __construct()
- {
- var_dump(self::$abc);
- }
+ static $abc;
+ function __construct()
+ {
+ var_dump(self::$abc);
+ }
}
class Bar extends Foo {
diff --git a/ext/reflection/tests/bug74454.inc b/ext/reflection/tests/bug74454.inc
index 5136591367..e668e88643 100644
--- a/ext/reflection/tests/bug74454.inc
+++ b/ext/reflection/tests/bug74454.inc
@@ -1,4 +1,4 @@
<?php
class A {
- if (wrongsyntax)
+ if (wrongsyntax)
}
diff --git a/ext/reflection/tests/bug74454.phpt b/ext/reflection/tests/bug74454.phpt
index 0c85baa7c3..e311ab3beb 100644
--- a/ext/reflection/tests/bug74454.phpt
+++ b/ext/reflection/tests/bug74454.phpt
@@ -4,13 +4,13 @@ Bug #74454 (Wrong exception being thrown when using ReflectionMethod)
<?php
spl_autoload_register('load_file');
try {
- $x = new ReflectionMethod('A', 'b');
+ $x = new ReflectionMethod('A', 'b');
} catch (\Throwable $e) {
- echo get_class($e), ': ', $e->getMessage(), PHP_EOL;
+ echo get_class($e), ': ', $e->getMessage(), PHP_EOL;
}
function load_file() {
- require __DIR__ . '/bug74454.inc';
+ require __DIR__ . '/bug74454.inc';
}
?>
--EXPECT--
diff --git a/ext/reflection/tests/bug74673.phpt b/ext/reflection/tests/bug74673.phpt
index 42675f263e..321195c16e 100644
--- a/ext/reflection/tests/bug74673.phpt
+++ b/ext/reflection/tests/bug74673.phpt
@@ -5,9 +5,9 @@ Bug #74673 (Segfault when cast Reflection object to string with undefined consta
class A
{
- public function method($test = PHP_SELF + 1)
- {
- }
+ public function method($test = PHP_SELF + 1)
+ {
+ }
}
$class = new ReflectionClass('A');
diff --git a/ext/reflection/tests/bug74949.phpt b/ext/reflection/tests/bug74949.phpt
index 2970c5911f..20e0fc00e1 100644
--- a/ext/reflection/tests/bug74949.phpt
+++ b/ext/reflection/tests/bug74949.phpt
@@ -12,9 +12,9 @@ unset($f);
echo $r, "\n";
try {
- echo $r->getPrototype();
+ echo $r->getPrototype();
} catch (Exception $e) {
- echo $e->getMessage(), "\n";
+ echo $e->getMessage(), "\n";
}
?>
--EXPECT--
diff --git a/ext/reflection/tests/bug77882.phpt b/ext/reflection/tests/bug77882.phpt
index ff1d212861..71e430d178 100644
--- a/ext/reflection/tests/bug77882.phpt
+++ b/ext/reflection/tests/bug77882.phpt
@@ -7,7 +7,7 @@ class Test {
public function __construct() {
throw new Exception();
}
-
+
public function __destruct() {
echo "__destruct\n";
}
diff --git a/ext/reflection/tests/bug78895.phpt b/ext/reflection/tests/bug78895.phpt
index 7e616c4456..b5f84e2d02 100644
--- a/ext/reflection/tests/bug78895.phpt
+++ b/ext/reflection/tests/bug78895.phpt
@@ -3,18 +3,18 @@ Fixed bug #78895 (Reflection detects abstract non-static class as abstract stati
--FILE--
<?php
abstract class Foo {
- abstract public function f1();
+ abstract public function f1();
}
interface I {
- public function f2();
+ public function f2();
}
trait T {
- abstract public function f2();
+ abstract public function f2();
}
class Bar extends Foo implements I {
- use T;
- function f1() {}
- function f2() {}
+ use T;
+ function f1() {}
+ function f2() {}
}
$ref = new ReflectionClass(Foo::class);
var_dump(Reflection::getModifierNames($ref->getModifiers()));
diff --git a/ext/reflection/tests/closures_001.phpt b/ext/reflection/tests/closures_001.phpt
index 926951eef2..56581c05b8 100644
--- a/ext/reflection/tests/closures_001.phpt
+++ b/ext/reflection/tests/closures_001.phpt
@@ -11,10 +11,10 @@ var_dump($rm->getNumberOfParameters());
var_dump($rm->getNumberOfRequiredParameters());
$rms = $ro->getMethods();
foreach($rms as $rm) {
- if ($rm->getName() == '__invoke') {
- var_dump($rm->getNumberOfParameters());
- var_dump($rm->getNumberOfRequiredParameters());
- }
+ if ($rm->getName() == '__invoke') {
+ var_dump($rm->getNumberOfParameters());
+ var_dump($rm->getNumberOfRequiredParameters());
+ }
}
echo "---\n";
diff --git a/ext/reflection/tests/closures_002.phpt b/ext/reflection/tests/closures_002.phpt
index 4b127810fb..9e606857b6 100644
--- a/ext/reflection/tests/closures_002.phpt
+++ b/ext/reflection/tests/closures_002.phpt
@@ -4,7 +4,7 @@ Reflection on invocable objects
<?php
class Test {
- function __invoke($a, $b = 0) { }
+ function __invoke($a, $b = 0) { }
}
$rm = new ReflectionMethod(new Test, '__invoke');
diff --git a/ext/reflection/tests/included4.inc b/ext/reflection/tests/included4.inc
index 313fc5feca..7b64eb29cf 100644
--- a/ext/reflection/tests/included4.inc
+++ b/ext/reflection/tests/included4.inc
@@ -3,7 +3,7 @@ echo __FILE__ . "\n";
echo __LINE__ . "\n";
function g() {
- echo __FILE__ . "\n";
- echo __LINE__ . "\n";
+ echo __FILE__ . "\n";
+ echo __LINE__ . "\n";
}
?>
diff --git a/ext/reflection/tests/parameters_001.phpt b/ext/reflection/tests/parameters_001.phpt
index 92869a2faf..6c57b2c307 100644
--- a/ext/reflection/tests/parameters_001.phpt
+++ b/ext/reflection/tests/parameters_001.phpt
@@ -4,8 +4,8 @@ ReflectionParameter Check for parameter being optional
<?php
class Test {
- function func($x, $y = NULL){
- }
+ function func($x, $y = NULL){
+ }
}
@@ -20,11 +20,11 @@ $p = new ReflectionParameter(array('Test', 'func'), 'y');
var_dump($p->isOptional());
try {
- $p = new ReflectionParameter(array('Test', 'func'), 'z');
- var_dump($p->isOptional());
+ $p = new ReflectionParameter(array('Test', 'func'), 'z');
+ var_dump($p->isOptional());
}
catch (Exception $e) {
- var_dump($e->getMessage());
+ var_dump($e->getMessage());
}
?>
diff --git a/ext/reflection/tests/parameters_002.phpt b/ext/reflection/tests/parameters_002.phpt
index aed8d7afa0..14cb7fdefb 100644
--- a/ext/reflection/tests/parameters_002.phpt
+++ b/ext/reflection/tests/parameters_002.phpt
@@ -10,61 +10,61 @@ function test($nix, Array $ar, &$ref, stdClass $std,
class test
{
- function method($nix, Array $ar, &$ref, stdClass $std,
+ function method($nix, Array $ar, &$ref, stdClass $std,
NonExistingClass $na, stdClass $opt = NULL, $def = "FooBar")
- {
- }
+ {
+ }
}
function check_params_decl_func($r, $f)
{
- $c = $r->$f();
+ $c = $r->$f();
$sep = $c instanceof ReflectionMethod ? $c->class . '::' : '';
- echo $f . ': ' . ($c ? $sep . $c->name : 'NULL') . "()\n";
+ echo $f . ': ' . ($c ? $sep . $c->name : 'NULL') . "()\n";
}
function check_params_decl_class($r, $f)
{
- $c = $r->$f();
- echo $f . ': ' . ($c ? $c->name : 'NULL') . "\n";
+ $c = $r->$f();
+ echo $f . ': ' . ($c ? $c->name : 'NULL') . "\n";
}
function check_params_func($r, $f)
{
- echo $f . ': ';
- $v = $r->$f();
- var_dump($v);
+ echo $f . ': ';
+ $v = $r->$f();
+ var_dump($v);
}
function check_params($r)
{
- echo "#####" . ($r instanceof ReflectionMethod ? $r->class . '::' : '') . $r->name . "()#####\n";
- $i = 0;
- foreach($r->getParameters() as $p)
- {
- echo "===" . $i . "===\n";
- $i++;
- check_params_func($p, 'getName');
- check_params_func($p, 'isPassedByReference');
- try
- {
- check_params_decl_class($p, 'getClass');
- }
- catch(ReflectionException $e)
- {
- echo $e->getMessage() . "\n";
- }
- check_params_decl_class($p, 'getDeclaringClass');
+ echo "#####" . ($r instanceof ReflectionMethod ? $r->class . '::' : '') . $r->name . "()#####\n";
+ $i = 0;
+ foreach($r->getParameters() as $p)
+ {
+ echo "===" . $i . "===\n";
+ $i++;
+ check_params_func($p, 'getName');
+ check_params_func($p, 'isPassedByReference');
+ try
+ {
+ check_params_decl_class($p, 'getClass');
+ }
+ catch(ReflectionException $e)
+ {
+ echo $e->getMessage() . "\n";
+ }
+ check_params_decl_class($p, 'getDeclaringClass');
// check_params_decl_func($p, 'getDeclaringFunction');
- check_params_func($p, 'isArray');
- check_params_func($p, 'allowsNull');
- check_params_func($p, 'isOptional');
- check_params_func($p, 'isDefaultValueAvailable');
- if ($p->isOptional())
- {
- check_params_func($p, 'getDefaultValue');
- }
- }
+ check_params_func($p, 'isArray');
+ check_params_func($p, 'allowsNull');
+ check_params_func($p, 'isOptional');
+ check_params_func($p, 'isDefaultValueAvailable');
+ if ($p->isOptional())
+ {
+ check_params_func($p, 'getDefaultValue');
+ }
+ }
}
check_params(new ReflectionFunction('test'));
diff --git a/ext/reflection/tests/property_exists.phpt b/ext/reflection/tests/property_exists.phpt
index 002ece12b3..a740589bab 100644
--- a/ext/reflection/tests/property_exists.phpt
+++ b/ext/reflection/tests/property_exists.phpt
@@ -5,54 +5,54 @@ Reflection and property_exists()
class A
{
- public $a = 1;
- protected $b = 2;
- private $c = 3;
+ public $a = 1;
+ protected $b = 2;
+ private $c = 3;
- public $empty;
- public $init = 1;
+ public $empty;
+ public $init = 1;
- function __toString()
- {
- return 'obj(' . get_class($this) . ')';
- }
+ function __toString()
+ {
+ return 'obj(' . get_class($this) . ')';
+ }
- static function test($oc, $props)
- {
- echo '===' . __CLASS__ . "===\n";
- foreach($props as $p2) {
- echo $oc, '::$' , $p2, "\n";
- var_dump(property_exists($oc, $p2));
- }
- }
+ static function test($oc, $props)
+ {
+ echo '===' . __CLASS__ . "===\n";
+ foreach($props as $p2) {
+ echo $oc, '::$' , $p2, "\n";
+ var_dump(property_exists($oc, $p2));
+ }
+ }
}
class B extends A
{
- private $c = 4;
+ private $c = 4;
- static function test($oc, $props)
- {
- echo '===' . __CLASS__ . "===\n";
- foreach($props as $p2) {
- echo $oc, '::$' , $p2, "\n";
- var_dump(property_exists($oc, $p2));
- }
- }
+ static function test($oc, $props)
+ {
+ echo '===' . __CLASS__ . "===\n";
+ foreach($props as $p2) {
+ echo $oc, '::$' , $p2, "\n";
+ var_dump(property_exists($oc, $p2));
+ }
+ }
}
class C extends B
{
- private $d = 5;
+ private $d = 5;
- static function test($oc, $props)
- {
- echo '===' . __CLASS__ . "===\n";
- foreach($props as $p2) {
- echo $oc, '::$' , $p2, "\n";
- var_dump(property_exists($oc, $p2));
- }
- }
+ static function test($oc, $props)
+ {
+ echo '===' . __CLASS__ . "===\n";
+ foreach($props as $p2) {
+ echo $oc, '::$' , $p2, "\n";
+ var_dump(property_exists($oc, $p2));
+ }
+ }
}
$oA = new A;
@@ -64,17 +64,17 @@ $pc = array($oA, 'A', 'B', 'C', $oC);
$pr = array('a', 'b', 'c', 'd', 'e');
foreach($pc as $p1) {
- if (is_object($p1)) {
- $p1->test($p1, $pr);
- } else {
- $r = new ReflectionMethod($p1, 'test');
- $r->invoke(NULL, $p1, $pr);
- }
- echo "===GLOBAL===\n";
- foreach($pr as $p2) {
- echo $p1, '::$' , $p2, "\n";
- var_dump(property_exists($p1, $p2));
- }
+ if (is_object($p1)) {
+ $p1->test($p1, $pr);
+ } else {
+ $r = new ReflectionMethod($p1, 'test');
+ $r->invoke(NULL, $p1, $pr);
+ }
+ echo "===GLOBAL===\n";
+ foreach($pr as $p2) {
+ echo $p1, '::$' , $p2, "\n";
+ var_dump(property_exists($p1, $p2));
+ }
}
echo "===PROBLEMS===\n";
diff --git a/ext/reflection/tests/static_properties_002.phpt b/ext/reflection/tests/static_properties_002.phpt
index 0e3baa9530..126aa784a0 100644
--- a/ext/reflection/tests/static_properties_002.phpt
+++ b/ext/reflection/tests/static_properties_002.phpt
@@ -4,29 +4,29 @@ Reflection and inheriting static properties
<?php
class base {
- static protected $prop = 2;
+ static protected $prop = 2;
- static function show() {
- echo __METHOD__ . '(' . self::$prop . ")\n";
- }
+ static function show() {
+ echo __METHOD__ . '(' . self::$prop . ")\n";
+ }
- static function inc() {
- base::$prop++;
- echo __METHOD__ . "()\n";
- }
+ static function inc() {
+ base::$prop++;
+ echo __METHOD__ . "()\n";
+ }
}
class derived extends base {
- static public $prop = 2;
+ static public $prop = 2;
- static function show() {
- echo __METHOD__ . '(' . self::$prop . ")\n";
- }
+ static function show() {
+ echo __METHOD__ . '(' . self::$prop . ")\n";
+ }
- static function inc() {
- derived::$prop++;
- echo __METHOD__ . "()\n";
- }
+ static function inc() {
+ derived::$prop++;
+ echo __METHOD__ . "()\n";
+ }
}
base::show();
diff --git a/ext/reflection/tests/union_types.phpt b/ext/reflection/tests/union_types.phpt
index bb568a0cf4..042ba0759d 100644
--- a/ext/reflection/tests/union_types.phpt
+++ b/ext/reflection/tests/union_types.phpt
@@ -14,7 +14,7 @@ function dumpType(ReflectionUnionType $rt) {
echo " Allows Null: " . ($type->allowsNull() ? "true" : "false") . "\n";
}
}
-
+
function test1(): X|Y|int|float|false|null { }
function test2(): X|iterable|bool { }