Phan\Analysis\PostOrderAnalysisVisitor::declOnlyThrows PHP Method

declOnlyThrows() private method

private declOnlyThrows ( ast\Node\Decl $node ) : boolean
$node ast\Node\Decl A decl to check to see if it's only effect is the throw an exception
return boolean True when the decl can only throw an exception
    private function declOnlyThrows(Decl $node)
    {
        return isset($node->children['stmts']) && $node->children['stmts']->kind === \ast\AST_STMT_LIST && count($node->children['stmts']->children) === 1 && $node->children['stmts']->children[0]->kind === \ast\AST_THROW;
    }