Permalink
Browse files

Fix fatal errors when classes have static or final methods

  • Loading branch information...
1 parent 47b426d commit 5050b874665810fb4919edd3d6cb5dea764e8c58 Daniel Howlett committed Oct 3, 2012
Showing with 20 additions and 0 deletions.
  1. +5 −0 src/Doubles/Core/Subject.php
  2. +15 −0 tests/src/Doubles/Test/Dummy.php
@@ -46,6 +46,11 @@ public function getMethodNames()
$methodNames = array();
foreach ($methods as $method) {
+
+ if ($method->isStatic() || $method->isFinal()) {
+ continue;
+ }
+
$methodNames[] = $method->name;
}
@@ -19,6 +19,21 @@ protected function getProtectedValue()
return 'bar';
}
+ /**
+ * Static functions are currently ignored. Including this ensures they don't
+ * cause any bugs when included.
+ */
+ public static function getStaticValue()
+ {
+ }
+
+ /**
+ * See getStaticValue()
+ */
+ final public function getFinalValue()
+ {
+ }
+
public function getConstructedValue()
{
return $this->constructedValue;

0 comments on commit 5050b87

Please sign in to comment.