1
0
mirror of synced 2025-01-29 19:41:45 +03:00

Bumped Common dependency to RC1, fixing related issues in the test suite.

This commit is contained in:
Roman S. Borschel 2010-09-01 20:43:23 +02:00
parent 7ff9976b3c
commit 207d624f5f
3 changed files with 10 additions and 11 deletions

@ -1 +1 @@
Subproject commit 3b5123434e979c7adfd42061484b5a8f10a3431b
Subproject commit 0bd0fa68bbdc4d81c7742f2c972b5ed0c02b0640

View File

@ -73,8 +73,8 @@ class ECommerceCategory
public function removeProduct(ECommerceProduct $product)
{
$removed = $this->products->removeElement($product);
if ($removed !== null) {
$removed->removeCategory($this);
if ($removed) {
$product->removeCategory($this);
}
}
@ -114,8 +114,8 @@ class ECommerceCategory
public function removeChild(ECommerceCategory $child)
{
$removed = $this->children->removeElement($child);
if ($removed !== null) {
$removed->removeParent();
if ($removed) {
$child->removeParent();
}
}

View File

@ -112,11 +112,10 @@ class ECommerceProduct
public function removeFeature(ECommerceFeature $feature)
{
$removed = $this->features->removeElement($feature);
if ($removed !== null) {
$removed->removeProduct();
return true;
if ($removed) {
$feature->removeProduct();
}
return false;
return $removed;
}
public function addCategory(ECommerceCategory $category)
@ -130,8 +129,8 @@ class ECommerceProduct
public function removeCategory(ECommerceCategory $category)
{
$removed = $this->categories->removeElement($category);
if ($removed !== null) {
$removed->removeProduct($this);
if ($removed) {
$category->removeProduct($this);
}
}