1 | <?php |
||
7 | abstract class ListAbstract implements ListInterface { |
||
8 | protected $size; |
||
9 | |||
10 | /** |
||
11 | * Binds to count() method. This is equal to make $this->tree->size(). |
||
12 | * |
||
13 | * @return integer the tree size. 0 if it is empty. |
||
14 | */ |
||
15 | public function count() { |
||
18 | |||
19 | /** |
||
20 | * Returns the array size. |
||
21 | * |
||
22 | * @return int the length |
||
23 | */ |
||
24 | public function size() : int { |
||
27 | |||
28 | /** |
||
29 | * Checks if the list is empty. |
||
30 | * |
||
31 | * @return boolean true if is empty, else false. |
||
32 | */ |
||
33 | public function empty() : bool { |
||
36 | } |