Code cleanup.

This commit is contained in:
James Cole
2015-07-06 16:52:18 +02:00
parent 6bdb6db330
commit 3fb14b4708
31 changed files with 59 additions and 49 deletions

View File

@@ -1,8 +1,9 @@
<?php
namespace FireflyIII\Helpers\Csv\PostProcessing;
use Preferences;
use FireflyIII\Models\TransactionCurrency;
use Preferences;
/**
* Class Currency
@@ -23,8 +24,8 @@ class Currency implements PostProcessorInterface
// fix currency
if (is_null($this->data['currency'])) {
$currencyPreference = Preferences::get('currencyPreference', 'EUR');
$this->data['currency'] = TransactionCurrency::whereCode($currencyPreference->data)->first();
$currencyPreference = Preferences::get('currencyPreference', 'EUR');
$this->data['currency'] = TransactionCurrency::whereCode($currencyPreference->data)->first();
}
return $this->data;

View File

@@ -14,15 +14,16 @@ namespace FireflyIII\Helpers\Csv\PostProcessing;
*
* @package FireflyIII\Helpers\Csv\PostProcessing
*/
interface PostProcessorInterface {
/**
* @param array $data
*/
public function setData(array $data);
interface PostProcessorInterface
{
/**
* @return array
*/
public function process();
/**
* @param array $data
*/
public function setData(array $data);
}