Skip to content

Commit 478eef8

Browse files
committed
Remove no longer used methods.
1 parent 552c0ea commit 478eef8

File tree

3 files changed

+0
-30
lines changed

3 files changed

+0
-30
lines changed

spec/drupol/phptree/Node/NodeSpec.php

-14
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,6 @@ public function it_can_get_its_children()
9898
->shouldYield(new \ArrayIterator([$node, $node]));
9999
}
100100

101-
public function it_can_get_the_last_children()
102-
{
103-
$this
104-
->lastChild()
105-
->shouldReturn(null);
106-
107-
$node = new Node();
108-
109-
$this
110-
->add($node)
111-
->lastChild()
112-
->shouldReturn($node);
113-
}
114-
115101
public function it_can_check_if_its_a_leaf()
116102
{
117103
$this

src/Node/Node.php

-8
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,6 @@ public function children(): \Traversable
8686
yield from $this->storage['children'];
8787
}
8888

89-
/**
90-
* {@inheritdoc}
91-
*/
92-
public function lastChild(): ?NodeInterface
93-
{
94-
return $this->storage['children'][$this->storage['children']->count() - 1] ?? null;
95-
}
96-
9789
/**
9890
* {@inheritdoc}
9991
*/

src/Node/NodeInterface.php

-8
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,4 @@ public function depth(): int;
116116
* The new object.
117117
*/
118118
public function withChildren(NodeInterface ...$nodes): NodeInterface;
119-
120-
/**
121-
* Get the last child if any.
122-
*
123-
* @return \drupol\phptree\Node\NodeInterface|null
124-
* The last child if any, null otherwise.
125-
*/
126-
public function lastChild(): ?NodeInterface;
127119
}

0 commit comments

Comments
 (0)