Code cleanup.

This commit is contained in:
James Cole
2021-03-28 11:43:07 +02:00
parent 5abbb8a807
commit 2c575f3ca5
379 changed files with 304 additions and 1727 deletions

View File

@@ -62,7 +62,5 @@ trait TransactionFilter
];
return $types[$type] ?? $types['default'];
}
}

View File

@@ -198,8 +198,6 @@ trait AugumentData
/** @var BudgetLimitRepositoryInterface $blRepository */
$blRepository = app(BudgetLimitRepositoryInterface::class);
// properties for cache
$cache = new CacheProperties;
$cache->addProperty($start);

View File

@@ -29,8 +29,6 @@ namespace FireflyIII\Support\Http\Controllers;
*/
trait BasicDataSupport
{
/**
* Find the ID in a given array. Return '0' of not there (amount).
*
@@ -43,6 +41,4 @@ trait BasicDataSupport
{
return $array[$entryId] ?? '0';
}
}

View File

@@ -32,8 +32,6 @@ use Laravel\Passport\Passport;
use Log;
use phpseclib\Crypt\RSA as LegacyRSA;
use phpseclib3\Crypt\RSA;
/**
* Trait CreateStuff
*
@@ -106,8 +104,6 @@ trait CreateStuff
*/
protected function createOAuthKeys(): void // create stuff
{
[$publicKey, $privateKey] = [
Passport::keyPath('oauth-public.key'),
Passport::keyPath('oauth-private.key'),

View File

@@ -99,8 +99,6 @@ trait DateCalculation
return $step;
}
/**
* Get a list of the periods that will occur after this date. For example,
* March 2018, April 2018, etc.
@@ -130,8 +128,6 @@ trait DateCalculation
'start' => clone $currentStart,
'end' => clone $current,
];
++$count;
$current->addDay();
}

View File

@@ -22,8 +22,6 @@
declare(strict_types=1);
namespace FireflyIII\Support\Http\Controllers;
use Carbon\Carbon;
use Log;

View File

@@ -308,8 +308,6 @@ trait PeriodOverview
$collector->setRange($start, $end);
$collector->setTypes([TransactionType::TRANSFER]);
$transferSet = $collector->getExtractedJournals();
foreach ($dates as $currentDate) {
$spent = $this->filterJournalsByDate($spentSet, $currentDate['start'], $currentDate['end']);
$earned = $this->filterJournalsByDate($earnedSet, $currentDate['start'], $currentDate['end']);
@@ -362,8 +360,6 @@ trait PeriodOverview
/** @var array $dates */
$dates = app('navigation')->blockPeriods($start, $end, $range);
$entries = [];
// get all expenses without a budget.
/** @var GroupCollectorInterface $collector */
$collector = app(GroupCollectorInterface::class);
@@ -590,8 +586,6 @@ trait PeriodOverview
if ('transfer' === $transactionType || 'transfers' === $transactionType) {
$transferred = $this->filterJournalsByDate($genericSet, $currentDate['start'], $currentDate['end']);
}
$entries[]
= [
'title' => $title,

View File

@@ -320,8 +320,6 @@ trait RenderPartialViews
}
}
asort($triggers);
$index = 0;
$renderedEntries = [];
// todo must be repos

View File

@@ -43,8 +43,6 @@ use Route as RouteFacade;
*/
trait RequestInformation
{
/**
* Get the domain of FF system.
*
@@ -169,8 +167,6 @@ trait RequestInformation
{
$page = $this->getPageName();
$specificPage = $this->getSpecificPageName();
// indicator if user has seen the help for this page ( + special page):
$key = sprintf('shown_demo_%s%s', $page, $specificPage);
// is there an intro for this route?