Skip to content

Commit

Permalink
remove hard dependency on guzzle 6 and some minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ojhaujjwal committed Nov 11, 2017
1 parent 19f4b19 commit fdc5db8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"zendframework/zend-cache": "To use Zend Cache component for caching"
},
"require": {
"guzzlehttp/guzzle": "^6.3"
"guzzlehttp/guzzle": "5.* || 6.*"
}
}
2 changes: 1 addition & 1 deletion examples/filesystem-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
$cacheAdapter = new CurrencyConverter\Cache\Adapter\FileSystem(__DIR__ . '/cache/');
$cacheAdapter->setCacheTimeout(DateInterval::createFromDateString('10 second'));
$converter->setCacheAdapter($cacheAdapter);
echo $converter->convert('USD', 'NPR');
echo $converter->convert('USD', 'EUR');
2 changes: 1 addition & 1 deletion examples/simple.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
require __DIR__ . '/../vendor/autoload.php';

$converter = new CurrencyConverter\CurrencyConverter;
echo $converter->convert('USD', 'NPR');
echo $converter->convert('USD', 'EUR');
// or you can do $amount = $converter->convert(array('country' => 'US'), array('country' => 'NP'));
2 changes: 1 addition & 1 deletion examples/zend-cache-adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@

$cacheAdapter = new CurrencyConverter\Cache\Adapter\ZendAdapter($zendCache);
$converter->setCacheAdapter($cacheAdapter);
echo $converter->convert('USD', 'NPR');
echo $converter->convert('USD', 'EUR');
8 changes: 4 additions & 4 deletions src/Provider/FixerApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ class FixerApi implements ProviderInterface

/**
* FixerApi constructor.
* @param Client $httpClient
* @param Client|null $httpClient
*/
public function __construct(Client $httpClient=null)
public function __construct(Client $httpClient = null)
{
$this->httpClient = ($httpClient) ?: new Client();
$this->httpClient = $httpClient ?: new Client();
}

/**
* @inheritdoc
* {@inheritdoc}
*/
public function getRate($fromCurrency, $toCurrency)
{
Expand Down

0 comments on commit fdc5db8

Please sign in to comment.