Skip to content

Commit

Permalink
fix php 5.3 code and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
drealecs committed Dec 15, 2016
1 parent a696f51 commit 39ebc3b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/PayU/Alu/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

class Product
{
const PRICE_TYPE_NET = 'NET';
const PRICE_TYPE_GROSS = 'GROSS';

/**
* @var string
Expand Down Expand Up @@ -123,7 +125,7 @@ public function withPrice($price)
*/
public function withPriceType($priceType = self::PRICE_TYPE_NET)
{
if(!in_array($priceType, [self::PRICE_TYPE_NET, self::PRICE_TYPE_GROSS])){
if(!in_array($priceType, array(self::PRICE_TYPE_NET, self::PRICE_TYPE_GROSS))){
throw new \Exception("Price type is not valid.");
}

Expand Down

0 comments on commit 39ebc3b

Please sign in to comment.