mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 22:21:42 +00:00
Various code fixes.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 . '"!');
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user