BagInterface::remove()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
c 0
b 0
f 0
1
<?php
2
3
namespace Chadicus\Spl\DataStructures;
4
5
/**
6
 * Defines the interface for Bad data structures.
7
 */
8
interface BagInterface extends CollectionInterface
9
{
10
    /**
11
     * Adds a new element to the bag.
12
     *
13
     * @param mixed $element The element to add.
14
     *
15
     * @return Bag
16
     */
17
    public function add($element);
18
19
    /**
20
     * Removes a random element from the bag.
21
     *
22
     * @return mixed
23
     *
24
     * @throws \RuntimeException Thrown if remove is called on an empty bag.
25
     */
26
    public function remove();
27
}
28