Skip to content
This repository was archived by the owner on Jan 22, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
setup:
composer.phar install
./composer.phar install
npm install

test:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.5
2.2.10
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions src/Bitpay/DependencyInjection/services.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
/**
* @license Copyright 2011-2014 BitPay Inc., MIT License
* @license Copyright 2011-2016 BitPay Inc., MIT License
* see https://github.com/bitpay/php-bitpay-client/blob/master/LICENSE
*/
-->
Expand Down Expand Up @@ -31,19 +31,19 @@
</call>
</service>

<service id="key_storage" class="%key_storage.class%" public="false">
<service id="key_storage" class="%key_storage.class%">
<argument>%bitpay.key_storage_password%</argument>
</service>

<service id="key_manager" class="%key_manager.class%">
<argument type="service" id="key_storage" />
</service>

<service id="public_key" class="Bitpay\PublicKey" factory-service="key_storage" factory-method="load">
<service id="public_key" class="Bitpay\PublicKey">
<argument>%bitpay.public_key%</argument>
</service>

<service id="private_key" class="Bitpay\PrivateKey" factory-service="key_storage" factory-method="load">
<service id="private_key" class="Bitpay\PrivateKey">
<argument>%bitpay.private_key%</argument>
</service>
</services>
Expand Down
14 changes: 6 additions & 8 deletions src/Bitpay/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -677,7 +675,7 @@ public function getBtcPaid()
*/
public function setBtcPaid($btcPaid)
{
if (is_float($btcPaid)) {
if (is_numeric($btcPaid)) {
$this->btcPaid = $btcPaid;
}

Expand All @@ -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;
Expand Down