protected function spaceBefore(Node $node) {
    $prev = $node->previousToken();
    if ($prev instanceof WhitespaceNode) {
      $prev->setText(' ');
    }
    else {
      $node->before(Token::space());
    }
  }
protected function spaceBefore(Node $node) {
    $prev = $node->previousToken();
    if ($prev instanceof WhitespaceNode) {
      $prev->setText(' ');
    }
    else {
      $node->before(Token::space());
    }
  }
protected function spaceBefore ( Node $ node ) { $ prev = $ node -> previousToken ( ) ; if ( $ prev instanceof WhitespaceNode ) { $ prev -> setText ( ' ' ) ; } else { $ node -> before ( Token :: space ( ) ) ; } }
Set a single space before a node.

@param Node $node
Node to set space before.
Set a single space before a node .