public function hasFinal() { $reflection = new ReflectionClass($this->interface); foreach ($reflection->getMethods() as $method) { if ($method->isFinal()) { return true; } } return false; }
function testDetectionOfFinalMethods() { $reflection = new SimpleReflection('AnyOldClass'); $this->assertFalse($reflection->hasFinal()); $reflection = new SimpleReflection('AnyOldLeafClassWithAFinal'); $this->assertTrue($reflection->hasFinal()); }