Home
last modified time | relevance | path

Searched refs:slice (Results 1 – 6 of 6) sorted by relevance

/PHP-Parser/test/PhpParser/Node/
H A DNameTest.php40 $this->assertEquals(new Name('bar\baz'), $name->slice(1));
41 $this->assertNull($name->slice(3));
45 $this->assertNull($name->slice(0, -3));
46 $this->assertEquals(new Name('bar'), $name->slice(1, -1));
47 $this->assertNull($name->slice(1, -2));
50 $this->assertNull($name->slice(-2, -2));
56 (new Name('foo\bar\baz'))->slice(4);
62 (new Name('foo\bar\baz'))->slice(-4);
68 (new Name('foo\bar\baz'))->slice(0, 4);
74 (new Name('foo\bar\baz'))->slice(0, -4);
[all …]
/PHP-Parser/lib/PhpParser/Node/
H A DName.php175 public function slice(int $offset, ?int $length = null) { function in PhpParser\\Node\\Name
/PHP-Parser/
H A DUPGRADE-2.0.md62 deprecated. Instead `Name::concat()` and `Name->slice()` should be used.
H A DUPGRADE-3.0.md136 Use `Name::concat()` in combination with `Name::slice()` instead.
159 * The `Name::slice()` method now returns `null` for empty slices, previously `new Name([])` was
H A DCHANGELOG.md283 * Fixed bounds check in `Name::slice()`.
1009 * The `Name::slice()` method now returns `null` for empty slices, previously `new Name([])` was
1063 * `Name::slice()` now supports lengths and negative offsets. This brings it in line with
1224 * Added `Name->slice()` which takes a subslice of a name.
1232 deprecated in favor of `Name::concat()` and `Name->slice()`.
/PHP-Parser/lib/PhpParser/
H A DNameContext.php237 return FullyQualified::concat($alias, $name->slice(1), $name->getAttributes());

Completed in 42 milliseconds