Total Lines | 20 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
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 |