This commit is contained in:
Antonio Spinelli
2014-04-16 17:59:03 -03:00
parent da35c96b90
commit fc3b6a1608
25 changed files with 65 additions and 64 deletions

View File

@@ -31,17 +31,17 @@ class PriceSpecification extends AbstractSpecification
/**
* Checks if Item price falls between bounds
*
*
* @param Item $item
*
*
* @return bool
*/
public function isSatisfiedBy(Item $item)
{
if ( !empty($this->maxPrice) && $item->getPrice() > $this->maxPrice) {
if (!empty($this->maxPrice) && $item->getPrice() > $this->maxPrice) {
return false;
}
if ( !empty($this->minPrice) && $item->getPrice() < $this->minPrice) {
if (!empty($this->minPrice) && $item->getPrice() < $this->minPrice) {
return false;
}