mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 14:12:15 +00:00
Reformat various code.
This commit is contained in:
@@ -30,6 +30,15 @@ use Log;
|
||||
*/
|
||||
trait AppendsLocationData
|
||||
{
|
||||
/**
|
||||
* Abstract method.
|
||||
*
|
||||
* @param $key
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
abstract public function has($key);
|
||||
|
||||
/**
|
||||
* Read the submitted Request data and add new or updated Location data to the array.
|
||||
*
|
||||
@@ -148,25 +157,6 @@ trait AppendsLocationData
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract method stolen from "InteractsWithInput".
|
||||
*
|
||||
* @param null $key
|
||||
* @param bool $default
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
abstract public function boolean($key = null, $default = false);
|
||||
|
||||
/**
|
||||
* Abstract method.
|
||||
*
|
||||
* @param $key
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
abstract public function has($key);
|
||||
|
||||
/**
|
||||
* Abstract method.
|
||||
*
|
||||
@@ -183,6 +173,16 @@ trait AppendsLocationData
|
||||
*/
|
||||
abstract public function routeIs(...$patterns);
|
||||
|
||||
/**
|
||||
* Abstract method stolen from "InteractsWithInput".
|
||||
*
|
||||
* @param null $key
|
||||
* @param bool $default
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
abstract public function boolean($key = null, $default = false);
|
||||
|
||||
/**
|
||||
* @param string|null $prefix
|
||||
*
|
||||
|
||||
@@ -42,7 +42,7 @@ trait GetRecurrenceData
|
||||
$return['amount'] = $transaction['amount'];
|
||||
}
|
||||
if (array_key_exists('currency_id', $transaction)) {
|
||||
$return['currency_id'] = (int)$transaction['currency_id'];
|
||||
$return['currency_id'] = (int) $transaction['currency_id'];
|
||||
}
|
||||
if (array_key_exists('currency_code', $transaction)) {
|
||||
$return['currency_code'] = $transaction['currency_code'];
|
||||
@@ -53,17 +53,17 @@ trait GetRecurrenceData
|
||||
$return['foreign_amount'] = $transaction['foreign_amount'];
|
||||
}
|
||||
if (array_key_exists('foreign_currency_id', $transaction)) {
|
||||
$return['foreign_currency_id'] = (int)$transaction['foreign_currency_id'];
|
||||
$return['foreign_currency_id'] = (int) $transaction['foreign_currency_id'];
|
||||
}
|
||||
if (array_key_exists('foreign_currency_code', $transaction)) {
|
||||
$return['foreign_currency_code'] = $transaction['foreign_currency_code'];
|
||||
}
|
||||
// source + dest
|
||||
if (array_key_exists('source_id', $transaction)) {
|
||||
$return['source_id'] = (int)$transaction['source_id'];
|
||||
$return['source_id'] = (int) $transaction['source_id'];
|
||||
}
|
||||
if (array_key_exists('destination_id', $transaction)) {
|
||||
$return['destination_id'] = (int)$transaction['destination_id'];
|
||||
$return['destination_id'] = (int) $transaction['destination_id'];
|
||||
}
|
||||
// description
|
||||
if (array_key_exists('description', $transaction)) {
|
||||
@@ -71,17 +71,17 @@ trait GetRecurrenceData
|
||||
}
|
||||
|
||||
if (array_key_exists('piggy_bank_id', $transaction)) {
|
||||
$return['piggy_bank_id'] = (int)$transaction['piggy_bank_id'];
|
||||
$return['piggy_bank_id'] = (int) $transaction['piggy_bank_id'];
|
||||
}
|
||||
|
||||
if (array_key_exists('tags', $transaction)) {
|
||||
$return['tags'] = $transaction['tags'];
|
||||
}
|
||||
if (array_key_exists('budget_id', $transaction)) {
|
||||
$return['budget_id'] = (int)$transaction['budget_id'];
|
||||
$return['budget_id'] = (int) $transaction['budget_id'];
|
||||
}
|
||||
if (array_key_exists('category_id', $transaction)) {
|
||||
$return['category_id'] = (int)$transaction['category_id'];
|
||||
$return['category_id'] = (int) $transaction['category_id'];
|
||||
}
|
||||
|
||||
return $return;
|
||||
|
||||
Reference in New Issue
Block a user