src/Datastructure/Maps/HashMap.php
public function size(): int {
        $size = 0;
        /**
         * @var string $hash
         * @var  AbstractLinkedList $list
         */
        foreach ($this->bucket as $hash => $list) {
            $size += $list->size();
        }
        return $size;
    }
public function size(): int {
        $size = 0;
        /**
         * @var string $hash
         * @var  AbstractLinkedList $list
         */
        foreach ($this->bucket as $hash => $list) {
            $size += $list->size();
        }
        return $size;
    }
public function size ( ) : int { $ size = 0 ; /**
         * @var string $hash
         * @var  AbstractLinkedList $list
         */ foreach ( $ this -> bucket as $ hash => $ list ) { $ size += $ list -> size ( ) ; } return $ size ; }
returns the number of elements in the map


@return int
returns the number of elements in the map