Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

revert BaseOrder addItem

  • Loading branch information...
commit d5037fe541537752deedeb35b86be16f7fee667b 1 parent 48d189e
@iampersistent iampersistent authored
Showing with 1 addition and 15 deletions.
  1. +1 −15 lib/Vespolina/Entity/Order/BaseOrder.php
View
16 lib/Vespolina/Entity/Order/BaseOrder.php
@@ -182,21 +182,7 @@ public function isEmpty()
public function addItem(ItemInterface $item)
{
$item->setParent($this);
-
- if (!$this->items) {
- $this->clearItems();
- }
- $found = false;
- foreach ($this->items as $existingItem) {
- if ($item == $existingItem) {
- $found = true;
- break;
- }
- }
-
- if (!$found) {
- $this->items[] = $item;
- }
+ $this->items[] = $item;
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.