예제 #1
0
 /**
  * @param  Prop   $prop
  * @param  string $namespace
  * @return string
  */
 protected static function getPhpDocHint(Prop $prop, $namespace)
 {
     if ($prop->hasMethod(Add::PREFIX) || $prop->hasMethod(Remove::PREFIX)) {
         return 'array ';
     }
     $hint = $prop->getPhpDocHint($namespace);
     return '' === $hint ? $hint : $hint . ' ';
 }
예제 #2
0
 public function testRegisterMethods()
 {
     $prop = new Prop('test');
     $prop->method(Get::PREFIX);
     $prop->method(Is::PREFIX);
     $prop->method(Set::PREFIX);
     $this->assertTrue($prop->hasMethod(Get::PREFIX));
     $this->assertTrue($prop->hasMethod(Is::PREFIX));
     $this->assertTrue($prop->hasMethod(Set::PREFIX));
 }