mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 12:11:19 +00:00
Various code cleanup.
This commit is contained in:
@@ -208,7 +208,7 @@ trait CalculateXOccurrencesSince
|
||||
$date->year = $mutator->year;
|
||||
if ($mutator > $date) {
|
||||
Log::debug(
|
||||
sprintf('mutator (%s) > date (%s), so add a year to date (%s)', $mutator->format('Y-m-d'), $date->format('Y-m-d'), $date->format('Y-m-d'),)
|
||||
sprintf('mutator (%s) > date (%s), so add a year to date (%s)', $mutator->format('Y-m-d'), $date->format('Y-m-d'), $date->format('Y-m-d'))
|
||||
);
|
||||
$date->addYear();
|
||||
Log::debug(sprintf('Date is now %s', $date->format('Y-m-d')));
|
||||
@@ -223,7 +223,7 @@ trait CalculateXOccurrencesSince
|
||||
$return[] = clone $obj;
|
||||
$total++;
|
||||
}
|
||||
$obj->addYears(1);
|
||||
$obj->addYears();
|
||||
$attempts++;
|
||||
}
|
||||
|
||||
|
@@ -156,7 +156,7 @@ trait ConvertsDataTypes
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
* @param string|null $value
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
@@ -55,6 +55,7 @@ class AccountSearch implements GenericSearchInterface
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function search(): Collection
|
||||
{
|
||||
|
@@ -39,7 +39,7 @@ trait GeneratesInstallationId
|
||||
protected function generateInstallationId(): void
|
||||
{
|
||||
try {
|
||||
$config = app('fireflyconfig')->get('installation_id', null);
|
||||
$config = app('fireflyconfig')->get('installation_id');
|
||||
} catch (FireflyException $e) {
|
||||
Log::info('Could not create or generate installation ID. Do not continue.');
|
||||
|
||||
|
@@ -280,7 +280,7 @@ class General extends AbstractExtension
|
||||
$args = func_get_args();
|
||||
$route = $args[0]; // name of the route.
|
||||
$name = Route::getCurrentRoute()->getName() ?? '';
|
||||
if (false !== strpos($name, $route)) {
|
||||
if (str_contains($name, $route)) {
|
||||
return 'active';
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ class General extends AbstractExtension
|
||||
$args = func_get_args();
|
||||
$route = $args[0]; // name of the route.
|
||||
$name = Route::getCurrentRoute()->getName() ?? '';
|
||||
if (false !== strpos($name, $route)) {
|
||||
if (str_contains($name, $route)) {
|
||||
return 'menu-open';
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user