diff --git a/Makefile b/Makefile index c3d61c37..696d737e 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ setup: - composer.phar install + ./composer.phar install npm install test: diff --git a/VERSION b/VERSION index 21bb5e15..0d3ad67a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.2.5 +2.2.10 diff --git a/composer.json b/composer.json index c554a0fc..06033dff 100644 --- a/composer.json +++ b/composer.json @@ -29,17 +29,17 @@ "ext-json": "*", "ext-openssl": "*", "ext-mcrypt": "*", - "symfony/config": "2.5.*", - "symfony/dependency-injection": "2.5.*" + "symfony/config": "^2.3 || ^3.0", + "symfony/dependency-injection": "^2.3 || ^3.0" }, "require-dev": { - "behat/behat": "2.5.*@stable", - "behat/mink": "1.6.1", - "behat/mink-extension": "1.3.*", + "behat/behat": "master-dev", + "behat/mink": "master-dev", + "behat/mink-extension": "master-dev", "behat/mink-selenium2-driver": "1.2.0", "fabpot/goutte": "~1.0.4", "behat/mink-goutte-driver": "1.*", - "phpmd/phpmd": "~2.1.3", + "phpmd/phpmd": "master-dev", "phpunit/phpunit": "~4.3.1", "fzaninotto/faker": "~1.4.0", "mikey179/vfsStream": "~1.4.0", diff --git a/src/Bitpay/DependencyInjection/services.xml b/src/Bitpay/DependencyInjection/services.xml index a38e440d..36e81995 100644 --- a/src/Bitpay/DependencyInjection/services.xml +++ b/src/Bitpay/DependencyInjection/services.xml @@ -1,7 +1,7 @@ @@ -31,7 +31,7 @@ - + %bitpay.key_storage_password% @@ -39,11 +39,11 @@ - + %bitpay.public_key% - + %bitpay.private_key% diff --git a/src/Bitpay/Invoice.php b/src/Bitpay/Invoice.php index fcb18c89..a660cb42 100644 --- a/src/Bitpay/Invoice.php +++ b/src/Bitpay/Invoice.php @@ -151,8 +151,8 @@ public function getPrice() */ public function setPrice($price) { - if (is_float($price)) { - $this->getItem()->setPrice($price); + if (is_numeric($price)) { + $this->getItem()->setPrice(floatval($price)); } return $this; @@ -438,9 +438,7 @@ public function getBtcPrice() */ public function setBtcPrice($btcPrice) { - if (is_float($btcPrice)) { - $this->btcPrice = $btcPrice; - } else if (is_numeric($btcPrice)) { + if (is_numeric($btcPrice)) { $this->btcPrice = floatval($btcPrice); } @@ -677,7 +675,7 @@ public function getBtcPaid() */ public function setBtcPaid($btcPaid) { - if (is_float($btcPaid)) { + if (is_numeric($btcPaid)) { $this->btcPaid = $btcPaid; } @@ -699,8 +697,8 @@ public function getRate() */ public function setRate($rate) { - if (is_float($rate)) { - $this->rate = $rate; + if (is_numeric($rate)) { + $this->rate = floatval($rate); } return $this;