src/Factory/LocationFactory.php
public static function fromNode(Node $node): Location
    {
        $range = PositionUtilities::getRangeFromPosition(
            $node->getStart(),
            $node->getWidth(),
            $node->getFileContents()
        );

        return new Location($node->getUri(), new Range(
            new Position($range->start->line, $range->start->character),
            new Position($range->end->line, $range->end->character)
        ));
    }
public static function fromNode(Node $node): Location
    {
        $range = PositionUtilities::getRangeFromPosition(
            $node->getStart(),
            $node->getWidth(),
            $node->getFileContents()
        );

        return new Location($node->getUri(), new Range(
            new Position($range->start->line, $range->start->character),
            new Position($range->end->line, $range->end->character)
        ));
    }
public static function fromNode ( Node $ node ) : Location { $ range = PositionUtilities :: getRangeFromPosition ( $ node -> getStart ( ) , $ node -> getWidth ( ) , $ node -> getFileContents ( ) ) ; return new Location ( $ node -> getUri ( ) , new Range ( new Position ( $ range -> start -> line , $ range -> start -> character ) , new Position ( $ range -> end -> line , $ range -> end -> character ) ) ) ; }
Returns the location of the node

@param Node $node
@return self
Returns the location of the node