public function add($item) { if ($item instanceof ItemInterface) { $this->items[] = $item; } else { $this->items[] = new PayPalItem($item); } }