コード例 #1
0
ファイル: GetSetCode.php プロジェクト: oncesk/runkit
 /**
  * @return Code
  */
 public function getCode()
 {
     if ($this->code === null) {
         $this->code = Factory::createCode($this->getReflection());
     }
     return $this->code;
 }
コード例 #2
0
ファイル: RunkitFactoryTest.php プロジェクト: oncesk/runkit
 public function testCreateCode()
 {
     $code = Factory::createCode();
     $this->assertInstanceOf('Runkit\\Code', $code);
     $reflection = new ReflectionFunction('testFunctionForFactory');
     $code = Factory::createCode($reflection);
     $this->assertInstanceOf('Runkit\\Code', $code);
 }