Skip to content

Commit f71b99f

Browse files
author
Sandro Keil
committed
optimized code
1 parent da97e3e commit f71b99f

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
.settings
2-
.buildpath
3-
.project
41
vendor
52
composer.lock
63
_build
7-
.idea

src/Hydrator/AddressListStrategy.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
use Sake\BlockchainWalletApi\Exception\RuntimeException;
1313
use Zend\Stdlib\Hydrator\Strategy\StrategyInterface;
14-
use \Sake\BlockchainWalletApi\Response;
1514

1615
/**
1716
* Strategy for a list of addresses from request

src/Service/BlockchainWalletOptions.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
namespace Sake\BlockchainWalletApi\Service;
1111

12-
use Sake\BlockchainWalletApi\Hydrator;
1312
use Zend\Http\Request;
1413
use Zend\ServiceManager\ServiceLocatorInterface;
1514
use Zend\Stdlib\AbstractOptions;

src/Validator/BitcoinAddress.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ protected function decode($address)
8484
$chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
8585
$return = '0';
8686

87-
for ($i = 0; $i < strlen($address); $i++) {
87+
$length = strlen($address);
88+
89+
for ($i = 0; $i < $length; $i++) {
8890
$current = (string) strpos($chars, $address[$i]);
8991
$return = (string) bcmul($return, '58', 0);
9092
$return = (string) bcadd($return, $current, 0);

0 commit comments

Comments
 (0)