Пример #1
0
 /**
  * This method will return the declared default value for this parameter.
  * Please note that this method will return <b>null</b> when no default
  * value was declared, therefore you should combine calls to this method and
  * {@link PHP_Depend_Code_Parameter::isDefaultValueAvailable()} to detect a
  * NULL-value.
  *
  * @return mixed
  * @since 0.9.5
  */
 public function getDefaultValue()
 {
     $value = $this->_variableDeclarator->getValue();
     if ($value === null) {
         return null;
     }
     return $value->getValue();
 }
Пример #2
0
 /**
  * testGetValueReturnsInjectedValueInstance
  *
  * @return void
  * @group pdepend
  * @group pdepend::ast
  * @group unittest
  */
 public function testGetValueReturnsInjectedValueInstance()
 {
     $declarator = new PHP_Depend_Code_ASTVariableDeclarator();
     $declarator->setValue(new PHP_Depend_Code_Value());
     self::assertType(PHP_Depend_Code_Value::CLAZZ, $declarator->getValue());
 }