Various code fixes

This commit is contained in:
James Cole
2022-12-31 13:32:42 +01:00
parent 5878b2c427
commit 7722ca2bf0
34 changed files with 106 additions and 174 deletions

View File

@@ -26,7 +26,6 @@ namespace FireflyIII\Generator\Report\Budget;
use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Generator\Report\ReportGeneratorInterface;
use FireflyIII\Generator\Report\Support;
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
use FireflyIII\Models\TransactionType;
use Illuminate\Support\Collection;

View File

@@ -26,7 +26,6 @@ namespace FireflyIII\Generator\Report\Category;
use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Generator\Report\ReportGeneratorInterface;
use FireflyIII\Generator\Report\Support;
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
use FireflyIII\Models\TransactionType;
use Illuminate\Support\Collection;
@@ -41,26 +40,20 @@ use Throwable;
*/
class MonthReportGenerator implements ReportGeneratorInterface
{
/** @var Collection The included accounts */
private $accounts;
/** @var Collection The included categories */
private $categories;
/** @var Carbon The end date */
private $end;
/** @var array The expenses */
private $expenses;
/** @var array The income in the report. */
private $income;
/** @var Carbon The start date. */
private $start;
private Collection $accounts;
private Collection $categories;
private Carbon $end;
private array $expenses;
private array $income;
private Carbon $start;
/**
* MonthReportGenerator constructor.
*/
public function __construct()
{
$this->income = new Collection();
$this->expenses = new Collection();
$this->income = [];
$this->expenses = [];
}
/**

View File

@@ -26,7 +26,6 @@ namespace FireflyIII\Generator\Report\Tag;
use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Generator\Report\ReportGeneratorInterface;
use FireflyIII\Generator\Report\Support;
use Illuminate\Support\Collection;
use Log;
use Throwable;
@@ -38,27 +37,22 @@ use Throwable;
*/
class MonthReportGenerator implements ReportGeneratorInterface
{
/** @var Collection The accounts involved */
private $accounts;
/** @var Carbon The end date */
private $end;
/** @var array The expenses involved */
private $expenses;
/** @var array The income involved */
private $income;
/** @var Carbon The start date */
private $start;
/** @var Collection The tags involved. */
private $tags;
private Collection $accounts;
private Carbon $end;
private array $expenses;
private array $income;
private Carbon $start;
private Collection $tags;
/**
* MonthReportGenerator constructor.
*/
public function __construct()
{
$this->expenses = new Collection();
$this->income = new Collection();
$this->expenses = [];
$this->income = [];
$this->tags = new Collection();
$this->accounts = new Collection();
}
/**