Skip to content

Commit

Permalink
Fix docblock
Browse files Browse the repository at this point in the history
and remove stupidity check
  • Loading branch information
dvdoug committed Jan 24, 2016
1 parent c5b5734 commit c1e62b8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Packer.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,17 @@ public function addItem(Item $item, $qty = 1)

/**
* Set a list of items all at once
* @param \Traversable $items
* @param \Traversable|array $items
*/
public function setItems($items)
{
if ($items instanceof ItemList) {
$this->items = clone $items;
} elseif (is_array($items)) {
} else {
$this->items = new ItemList();
foreach ($items as $item) {
$this->items->insert($item);
}
} else {
throw new \RuntimeException('Not a valid list of items');
}
}

Expand Down

0 comments on commit c1e62b8

Please sign in to comment.