Esempio n. 1
0
 /**
 * Creates a partial code for class method.
 *
 ` @param  Stagehand_PHP_Class_Method $method
 * @return string
 */
 protected function _createMethodCode($method)
 {
     if ($method->isFinal()) {
         return;
     }
     return $method->render();
 }
Esempio n. 2
0
 /**
  * @test
  */
 public function createAFinalMethod()
 {
     $method = new Stagehand_PHP_Class_Method('method');
     $finalMethod = new Stagehand_PHP_Class_Method('finalMethod');
     $finalMethod->defineFinal();
     $this->assertFalse($method->isFinal());
     $this->assertTrue($finalMethod->isFinal());
 }