mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Code cleanup
This commit is contained in:
@@ -56,7 +56,7 @@ class ReportFormRequest extends Request
|
||||
$repository = app(AccountRepositoryInterface::class);
|
||||
$set = $this->get('accounts');
|
||||
$collection = new Collection;
|
||||
if (is_array($set)) {
|
||||
if (\is_array($set)) {
|
||||
foreach ($set as $accountId) {
|
||||
$account = $repository->findNull((int)$accountId);
|
||||
if (null !== $account) {
|
||||
@@ -77,7 +77,7 @@ class ReportFormRequest extends Request
|
||||
$repository = app(BudgetRepositoryInterface::class);
|
||||
$set = $this->get('budget');
|
||||
$collection = new Collection;
|
||||
if (is_array($set)) {
|
||||
if (\is_array($set)) {
|
||||
foreach ($set as $budgetId) {
|
||||
$budget = $repository->findNull((int)$budgetId);
|
||||
if (null !== $budget) {
|
||||
@@ -98,7 +98,7 @@ class ReportFormRequest extends Request
|
||||
$repository = app(CategoryRepositoryInterface::class);
|
||||
$set = $this->get('category');
|
||||
$collection = new Collection;
|
||||
if (is_array($set)) {
|
||||
if (\is_array($set)) {
|
||||
foreach ($set as $categoryId) {
|
||||
$category = $repository->findNull((int)$categoryId);
|
||||
if (null !== $category) {
|
||||
@@ -120,7 +120,7 @@ class ReportFormRequest extends Request
|
||||
$date = new Carbon;
|
||||
$range = $this->get('daterange');
|
||||
$parts = explode(' - ', (string)$range);
|
||||
if (2 === count($parts)) {
|
||||
if (2 === \count($parts)) {
|
||||
try {
|
||||
$date = new Carbon($parts[1]);
|
||||
// @codeCoverageIgnoreStart
|
||||
@@ -145,7 +145,7 @@ class ReportFormRequest extends Request
|
||||
$repository = app(AccountRepositoryInterface::class);
|
||||
$set = $this->get('exp_rev');
|
||||
$collection = new Collection;
|
||||
if (is_array($set)) {
|
||||
if (\is_array($set)) {
|
||||
foreach ($set as $accountId) {
|
||||
$account = $repository->findNull((int)$accountId);
|
||||
if (null !== $account) {
|
||||
@@ -167,7 +167,7 @@ class ReportFormRequest extends Request
|
||||
$date = new Carbon;
|
||||
$range = $this->get('daterange');
|
||||
$parts = explode(' - ', (string)$range);
|
||||
if (2 === count($parts)) {
|
||||
if (2 === \count($parts)) {
|
||||
try {
|
||||
$date = new Carbon($parts[0]);
|
||||
// @codeCoverageIgnoreStart
|
||||
@@ -190,7 +190,7 @@ class ReportFormRequest extends Request
|
||||
$repository = app(TagRepositoryInterface::class);
|
||||
$set = $this->get('tag');
|
||||
$collection = new Collection;
|
||||
if (is_array($set)) {
|
||||
if (\is_array($set)) {
|
||||
foreach ($set as $tagTag) {
|
||||
$tag = $repository->findByTag($tagTag);
|
||||
if (null !== $tag->id) {
|
||||
|
||||
Reference in New Issue
Block a user