File tree 3 files changed +0
-30
lines changed
3 files changed +0
-30
lines changed Original file line number Diff line number Diff line change @@ -98,20 +98,6 @@ public function it_can_get_its_children()
98
98
->shouldYield (new \ArrayIterator ([$ node , $ node ]));
99
99
}
100
100
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
-
115
101
public function it_can_check_if_its_a_leaf ()
116
102
{
117
103
$ this
Original file line number Diff line number Diff line change @@ -86,14 +86,6 @@ public function children(): \Traversable
86
86
yield from $ this ->storage ['children ' ];
87
87
}
88
88
89
- /**
90
- * {@inheritdoc}
91
- */
92
- public function lastChild (): ?NodeInterface
93
- {
94
- return $ this ->storage ['children ' ][$ this ->storage ['children ' ]->count () - 1 ] ?? null ;
95
- }
96
-
97
89
/**
98
90
* {@inheritdoc}
99
91
*/
Original file line number Diff line number Diff line change @@ -116,12 +116,4 @@ public function depth(): int;
116
116
* The new object.
117
117
*/
118
118
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 ;
127
119
}
You can’t perform that action at this time.
0 commit comments