From 01147039d4650b238d6fccfdbd5b5b177830ff10 Mon Sep 17 00:00:00 2001 From: romanb Date: Wed, 1 Jul 2009 13:08:24 +0000 Subject: [PATCH] [2.0] Simplifying code. --- tests/Doctrine/Tests/Models/ECommerce/ECommerceCart.php | 4 +--- tests/Doctrine/Tests/Models/ECommerce/ECommerceCustomer.php | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/Doctrine/Tests/Models/ECommerce/ECommerceCart.php b/tests/Doctrine/Tests/Models/ECommerce/ECommerceCart.php index 803f4c313..14457b699 100644 --- a/tests/Doctrine/Tests/Models/ECommerce/ECommerceCart.php +++ b/tests/Doctrine/Tests/Models/ECommerce/ECommerceCart.php @@ -61,9 +61,7 @@ class ECommerceCart if ($this->customer !== null) { $customer = $this->customer; $this->customer = null; - if ($customer->getCart() !== null) { - $customer->removeCart(); - } + $customer->removeCart(); } } diff --git a/tests/Doctrine/Tests/Models/ECommerce/ECommerceCustomer.php b/tests/Doctrine/Tests/Models/ECommerce/ECommerceCustomer.php index d872ade99..f393ab3a1 100644 --- a/tests/Doctrine/Tests/Models/ECommerce/ECommerceCustomer.php +++ b/tests/Doctrine/Tests/Models/ECommerce/ECommerceCustomer.php @@ -68,9 +68,7 @@ class ECommerceCustomer if ($this->cart !== null) { $cart = $this->cart; $this->cart = null; - if ($cart->getCustomer() !== null) { - $cart->removeCustomer(); - } + $cart->removeCustomer(); } } }