コード例 #1
0
ファイル: Method.php プロジェクト: tpunt/phan
 /**
  * @return bool
  * True if this is an abstract class
  */
 public function isAbstract() : bool
 {
     return Flags::bitVectorHasState($this->getFlags(), \ast\flags\MODIFIER_ABSTRACT);
 }
コード例 #2
0
ファイル: Parameter.php プロジェクト: etsy/phan
 /**
  * @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);
 }
コード例 #3
0
ファイル: ClassElement.php プロジェクト: tpunt/phan
 /**
  * @return bool
  * True if this is a static method
  */
 public function isStatic() : bool
 {
     return Flags::bitVectorHasState($this->getFlags(), \ast\flags\MODIFIER_STATIC);
 }
コード例 #4
0
ファイル: Method.php プロジェクト: black-silence/phan
 /**
  * @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));
 }
コード例 #5
0
ファイル: AddressableElement.php プロジェクト: ablyler/phan
 /**
  * @return bool
  * True if this is a private property
  */
 public function isPrivate() : bool
 {
     return Flags::bitVectorHasState($this->getFlags(), \ast\flags\MODIFIER_PRIVATE);
 }
コード例 #6
0
ファイル: Clazz.php プロジェクト: etsy/phan
 /**
  * @return bool
  * True if this class is a trait
  */
 public function isTrait() : bool
 {
     return Flags::bitVectorHasState($this->getFlags(), \ast\flags\CLASS_TRAIT);
 }
コード例 #7
0
ファイル: TypedElement.php プロジェクト: nagyistge/phan
 /**
  * @return void
  */
 private function setIsInternal(bool $is_internal)
 {
     $this->setFlags(Flags::bitVectorWithState($this->getFlags(), Flags::IS_INTERNAL, $is_internal));
 }
コード例 #8
0
ファイル: Method.php プロジェクト: etsy/phan
 /**
  * @return bool
  * True if this method returns reference
  */
 public function returnsRef() : bool
 {
     return Flags::bitVectorHasState($this->getFlags(), \ast\flags\RETURNS_REF);
 }
コード例 #9
0
ファイル: FunctionTrait.php プロジェクト: ablyler/phan
 /**
  * @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));
 }
コード例 #10
0
ファイル: FunctionTrait.php プロジェクト: etsy/phan
 /**
  * @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));
 }