Various code fixes.

This commit is contained in:
James Cole
2016-02-10 16:23:37 +01:00
parent 426351bb54
commit 3e502db772
6 changed files with 12 additions and 14 deletions

View File

@@ -228,7 +228,7 @@ class TestData
Budget::firstOrCreateEncrypted(['name' => 'Car', 'user_id' => $user->id]);
// some empty budgets.
foreach (['A', 'B', 'C', 'D', "E"] as $letter) {
foreach (['A', 'B', 'C', 'D', 'E'] as $letter) {
Budget::firstOrCreateEncrypted(['name' => 'Empty budget ' . $letter, 'user_id' => $user->id]);
}
@@ -984,7 +984,6 @@ class TestData
foreach (Budget::get() as $budget) {
if ($budget->name == $name && $user->id == $budget->user_id) {
return $budget;
break;
}
}

View File

@@ -185,7 +185,7 @@ class Navigation
if (isset($formatMap[$repeatFrequency])) {
return $date->formatLocalized($formatMap[$repeatFrequency]);
return $date->formatLocalized(strval($formatMap[$repeatFrequency]));
}
throw new FireflyException('No date formats for frequency "' . $repeatFrequency . '"!');
}

View File

@@ -17,7 +17,6 @@ use Twig_SimpleFunction;
* @codeCoverageIgnore
*
* Class TwigSupport
* @todo these functions should be parameterized.
*
* @package FireflyIII\Support
*/
@@ -99,7 +98,7 @@ class General extends Twig_Extension
protected function activeRoutePartialWhat(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
'activeRoutePartialWhat', function ($context) : string {
'activeRoutePartialWhat', function ($context) : string {
$args = func_get_args();
$route = $args[1]; // name of the route.
$what = $args[2]; // name of the route.