Various code cleanup.

This commit is contained in:
James Cole
2021-05-24 08:50:17 +02:00
parent 3ec9753808
commit 815fd5ff6b
135 changed files with 643 additions and 582 deletions

View File

@@ -19,8 +19,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/** @noinspection PhpUndefinedMethodInspection */
declare(strict_types=1);
namespace FireflyIII\Generator\Report\Audit;
@@ -33,6 +31,7 @@ use FireflyIII\Models\Account;
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
use Illuminate\Support\Collection;
use JetBrains\PhpStorm\ArrayShape;
use Log;
use Throwable;
@@ -197,9 +196,9 @@ class MonthReportGenerator implements ReportGeneratorInterface
*
* @return array
*
* @throws FireflyException
*/
public function getAuditReport(Account $account, Carbon $date): array
#[ArrayShape(['journals' => "array", 'currency' => "mixed", 'exists' => "bool", 'end' => "string", 'endBalance' => "mixed", 'dayBefore' => "string",
'dayBeforeBalance' => "mixed"])] public function getAuditReport(Account $account, Carbon $date): array
{
/** @var AccountRepositoryInterface $accountRepository */
$accountRepository = app(AccountRepositoryInterface::class);

View File

@@ -19,7 +19,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/** @noinspection MultipleReturnStatementsInspection */
/** @noinspection PhpUndefinedMethodInspection */
declare(strict_types=1);
namespace FireflyIII\Generator\Report\Budget;

View File

@@ -19,7 +19,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/** @noinspection MultipleReturnStatementsInspection */
/** @noinspection PhpUndefinedMethodInspection */
declare(strict_types=1);
namespace FireflyIII\Generator\Report\Category;
@@ -30,6 +29,7 @@ use FireflyIII\Generator\Report\Support;
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
use FireflyIII\Models\TransactionType;
use Illuminate\Support\Collection;
use JetBrains\PhpStorm\Pure;
use Log;
use Throwable;
@@ -57,7 +57,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
/**
* MonthReportGenerator constructor.
*/
public function __construct()
#[Pure] public function __construct()
{
$this->income = new Collection;
$this->expenses = new Collection;
@@ -76,7 +76,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
// render!
try {
return prefixView('reports.category.month', compact('accountIds', 'categoryIds', 'reportType',))
return prefixView('reports.category.month', compact('accountIds', 'categoryIds', 'reportType'))
->with('start', $this->start)->with('end', $this->end)
->with('categories', $this->categories)
->with('accounts', $this->accounts)

View File

@@ -20,7 +20,6 @@
*/
/** @noinspection MultipleReturnStatementsInspection */
/** @noinspection PhpUndefinedMethodInspection */
declare(strict_types=1);
namespace FireflyIII\Generator\Report\Tag;
@@ -29,6 +28,7 @@ use Carbon\Carbon;
use FireflyIII\Generator\Report\ReportGeneratorInterface;
use FireflyIII\Generator\Report\Support;
use Illuminate\Support\Collection;
use JetBrains\PhpStorm\Pure;
use Log;
use Throwable;
@@ -55,7 +55,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
/**
* MonthReportGenerator constructor.
*/
public function __construct()
#[Pure] public function __construct()
{
$this->expenses = new Collection;
$this->income = new Collection;