Skip to content

Commit a910f6a

Browse files
committed
Remove $separator arg from Name::toString()
1 parent caa5c0c commit a910f6a

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

lib/PhpParser/Node/Name.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,13 @@ public function isRelative() {
8383
}
8484

8585
/**
86-
* Returns a string representation of the name by imploding the namespace parts with a separator.
87-
*
88-
* @param string $separator The separator to use (defaults to the namespace separator \)
86+
* Returns a string representation of the name by imploding the namespace parts with the
87+
* namespace separator.
8988
*
9089
* @return string String representation
9190
*/
92-
public function toString($separator = '\\') {
93-
return implode($separator, $this->parts);
91+
public function toString() {
92+
return implode('\\', $this->parts);
9493
}
9594

9695
/**

test/PhpParser/Node/NameTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ public function testToString() {
2727

2828
$this->assertSame('foo\bar', (string) $name);
2929
$this->assertSame('foo\bar', $name->toString());
30-
$this->assertSame('foo_bar', $name->toString('_'));
3130
}
3231

3332
public function testAppend() {

0 commit comments

Comments
 (0)