From 1f600d535c3f05845f281aff346fc10139e1669c Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 16 Nov 2017 14:07:27 +0100 Subject: [PATCH] Fix some incomplete tests --- Math/Matrix/Vector.php | 2 -- Math/Number/Irrational.php | 21 --------------------- Math/Number/Rational.php | 21 --------------------- Math/Number/Real.php | 21 --------------------- Utils/TestUtils.php | 10 +++++----- 5 files changed, 5 insertions(+), 70 deletions(-) delete mode 100644 Math/Number/Irrational.php delete mode 100644 Math/Number/Rational.php delete mode 100644 Math/Number/Real.php diff --git a/Math/Matrix/Vector.php b/Math/Matrix/Vector.php index bd0da5754..5def2d31f 100644 --- a/Math/Matrix/Vector.php +++ b/Math/Matrix/Vector.php @@ -37,6 +37,4 @@ class Vector extends Matrix { parent::__construct($m); } - - // todo: maybe overwrite setMatrix since only one column (is only a visual improvement) } \ No newline at end of file diff --git a/Math/Number/Irrational.php b/Math/Number/Irrational.php deleted file mode 100644 index 7de55fce8..000000000 --- a/Math/Number/Irrational.php +++ /dev/null @@ -1,21 +0,0 @@ -hasProperty($name)) { return false; @@ -63,16 +63,16 @@ class TestUtils /** * Get private object member * - * @param object $obj Object to read + * @param object||string $obj Object to read * @param string $name Member name to read * * @return mixed Returns the member variable value * * @since 1.0.0 */ - public static function getMember(/* object */ $obj, string $name) + public static function getMember($obj, string $name) { - $reflectionClass = new \ReflectionClass(get_class($obj)); + $reflectionClass = new \ReflectionClass(is_string($obj) ? $obj : get_class($obj)); if (!$reflectionClass->hasProperty($name)) { return null;