for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace MrPrompt\ShipmentCommon\Base;
use ArrayObject;
/**
* Cart
*
* @author Thiago Paes <[email protected]>
*/
class Cart extends ArrayObject
{
* @param mixed $item
public function addItem($item)
$this->append($item);
}
public function removeItem($item)
if (!$this->offsetExists($item)) {
throw new \InvalidArgumentException(sprintf('Item "%s" not exists', $item));
$this->offsetUnset($item);