PhpParser\Node\Stmt\ClassMethod::isStatic PHP Method

isStatic() public method

public isStatic ( )
    public function isStatic() {
        return (bool) ($this->flags & Class_::MODIFIER_STATIC);
    }

Usage Example

Example #1
0
 /**
  * @param ClassMethod $node
  *
  * @return RefMethod
  */
 private function createMethod(ClassMethod $node)
 {
     $ref = new RefMethod();
     $ref->class = $this->class;
     $ref->name = $node->name;
     if ($node->isPrivate()) {
         $ref->visibility = Visibility::IS_PRIVATE;
     } elseif ($node->isProtected()) {
         $ref->visibility = Visibility::IS_PROTECTED;
     } elseif ($node->isPublic()) {
         $ref->visibility = Visibility::IS_PUBLIC;
     }
     $ref->isStatic = $node->isStatic();
     $ref->isAbstract = $node->isAbstract();
     $ref->isFinal = $node->isFinal();
     $ref->startLine = $node->getLine();
     $ref->docComment = $this->createDocComment($node);
     $ref->returnType = $this->getTypeName($node->getReturnType());
     foreach ($node->getParams() as $param) {
         $param = $this->createParam($param, $ref->docComment);
         $ref->params[$param->name] = $param;
     }
     return $ref;
 }
All Usage Examples Of PhpParser\Node\Stmt\ClassMethod::isStatic