Code cleanup.

This commit is contained in:
James Cole
2015-05-05 10:23:01 +02:00
parent 67fdd27499
commit 23a09b7081
37 changed files with 112 additions and 62 deletions

View File

@@ -84,9 +84,11 @@ class Amount
}
/**
* @return string
*
* @param TransactionJournal $journal
* @param bool $coloured
*
* @return string
*/
public function formatJournal(TransactionJournal $journal, $coloured = true)
{
@@ -167,6 +169,9 @@ class Amount
return 'EUR';
}
/**
* @return mixed|static
*/
public function getDefaultCurrency()
{
$currencyPreference = Prefs::get('currencyPreference', 'EUR');

View File

@@ -240,8 +240,8 @@ class ExpandedForm
*
* Takes any collection and tries to make a sensible select list compatible array of it.
*
* @param Collection $set
* @param bool $addEmpty
* @param \Illuminate\Support\Collection $set
* @param bool $addEmpty
*
* @return mixed
*/
@@ -288,10 +288,12 @@ class ExpandedForm
/**
* @param $name
* @param null $value
* @param array $list
* @param null $selected
* @param array $options
*
* @return string
* @internal param null $value
*/
public function multiRadio($name, array $list = [], $selected = null, array $options = [])
{

View File

@@ -15,7 +15,7 @@ class Navigation
/**
* @param Carbon $theDate
* @param \Carbon\Carbon $theDate
* @param $repeatFreq
* @param $skip
*
@@ -64,10 +64,10 @@ class Navigation
}
/**
* @param Carbon $theCurrentEnd
* @param \Carbon\Carbon $theCurrentEnd
* @param $repeatFreq
*
* @return Carbon
* @return \Carbon\Carbon
* @throws FireflyException
*/
public function endOfPeriod(Carbon $theCurrentEnd, $repeatFreq)
@@ -301,10 +301,10 @@ class Navigation
}
/**
* @param Carbon $theDate
* @param \Carbon\Carbon $theDate
* @param $repeatFreq
*
* @return Carbon
* @return \Carbon\Carbon
* @throws FireflyException
*/
public function startOfPeriod(Carbon $theDate, $repeatFreq)
@@ -388,9 +388,9 @@ class Navigation
/**
* @param $range
* @param Carbon $start
* @param \Carbon\Carbon $start
*
* @return Carbon
* @return \Carbon\Carbon
* @throws FireflyException
*/
public function updateEndDate($range, Carbon $start)
@@ -423,10 +423,10 @@ class Navigation
}
/**
* @param $range
* @param Carbon $start
* @param $range
* @param \Carbon\Carbon $start
*
* @return Carbon
* @return \Carbon\Carbon
* @throws FireflyException
*/
public function updateStartDate($range, Carbon $start)

View File

@@ -16,7 +16,7 @@ class Preferences
* @param $name
* @param null $default
*
* @return null|Preference
* @return null|\FireflyIII\Models\Preference
*/
public function get($name, $default = null)
{

View File

@@ -121,6 +121,7 @@ class Search implements SearchInterface
return $journal;
}
}
return null;
}
);

View File

@@ -17,8 +17,8 @@ class Steam
{
/**
*
* @param Account $account
* @param Carbon $date
* @param \FireflyIII\Models\Account $account
* @param \Carbon\Carbon $date
* @param bool $ignoreVirtualBalance
*
* @return float
@@ -91,7 +91,7 @@ class Steam
* Turns a collection into an array. Needs the field 'id' for the key,
* and saves only 'name' and 'amount' as a sub array.
*
* @param Collection $collection
* @param \Illuminate\Support\Collection $collection
*
* @return array
*/

View File

@@ -39,7 +39,7 @@ class Journal extends Twig_Extension
if ($type == 'Opening balance') {
return '<span class="glyphicon glyphicon-ban-circle" title="Opening balance"></span>';
}
return '';
}, ['is_safe' => ['html']]
);