Example #1
0
 /**
  * @return bool
  * True if this is an abstract class
  */
 public function isAbstract() : bool
 {
     return Flags::bitVectorHasState($this->getFlags(), \ast\flags\MODIFIER_ABSTRACT);
 }
Example #2
0
 /**
  * @return bool
  * True if this parameter is pass-by-reference
  * i.e. prefixed with '&'.
  */
 public function isPassByReference() : bool
 {
     return Flags::bitVectorHasState($this->getFlags(), \ast\flags\PARAM_REF);
 }
Example #3
0
 /**
  * @return bool
  * True if this is a static method
  */
 public function isStatic() : bool
 {
     return Flags::bitVectorHasState($this->getFlags(), \ast\flags\MODIFIER_STATIC);
 }
Example #4
0
 /**
  * @param bool $is_override
  * True if this method overrides another method
  *
  * @return void
  */
 public function setIsOverride(bool $is_override)
 {
     $this->setFlags(Flags::bitVectorWithState($this->getFlags(), Flags::IS_OVERRIDE, $is_override));
 }
Example #5
0
 /**
  * @return bool
  * True if this is a private property
  */
 public function isPrivate() : bool
 {
     return Flags::bitVectorHasState($this->getFlags(), \ast\flags\MODIFIER_PRIVATE);
 }
Example #6
0
File: Clazz.php Project: etsy/phan
 /**
  * @return bool
  * True if this class is a trait
  */
 public function isTrait() : bool
 {
     return Flags::bitVectorHasState($this->getFlags(), \ast\flags\CLASS_TRAIT);
 }
Example #7
0
 /**
  * @return void
  */
 private function setIsInternal(bool $is_internal)
 {
     $this->setFlags(Flags::bitVectorWithState($this->getFlags(), Flags::IS_INTERNAL, $is_internal));
 }
Example #8
0
File: Method.php Project: etsy/phan
 /**
  * @return bool
  * True if this method returns reference
  */
 public function returnsRef() : bool
 {
     return Flags::bitVectorHasState($this->getFlags(), \ast\flags\RETURNS_REF);
 }
Example #9
0
 /**
  * @param bool $has_return
  * Set to true to mark this method as having a
  * return value
  *
  * @return void
  */
 public function setHasReturn(bool $has_return)
 {
     $this->setFlags(Flags::bitVectorWithState($this->getFlags(), Flags::HAS_RETURN, $has_return));
 }
Example #10
0
 /**
  * @param bool $has_yield
  * Set to true to mark this method as having a
  * yield value
  *
  * @return void
  */
 public function setHasYield(bool $has_yield)
 {
     $this->setPhanFlags(Flags::bitVectorWithState($this->getPhanFlags(), Flags::HAS_YIELD, $has_yield));
 }