mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-03 12:04:28 +00:00
Fix code quality with rector [skip ci]
This commit is contained in:
@@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Requests;
|
||||
|
||||
use Illuminate\Contracts\Validation\Validator;
|
||||
use Carbon\Carbon;
|
||||
use Exception;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
@@ -34,7 +35,6 @@ use FireflyIII\Support\Request\ChecksLogin;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Validation\Validator;
|
||||
use Safe\Exceptions\PcreException;
|
||||
|
||||
use function Safe\preg_match;
|
||||
@@ -153,8 +153,8 @@ class ReportFormRequest extends FormRequest
|
||||
$date = new Carbon($parts[1]);
|
||||
} catch (Exception $e) { // intentional generic exception
|
||||
$error = sprintf('"%s" is not a valid date range: %s', $range, $e->getMessage());
|
||||
app('log')->error($error);
|
||||
app('log')->error($e->getTraceAsString());
|
||||
Log::error($error);
|
||||
Log::error($e->getTraceAsString());
|
||||
|
||||
throw new FireflyException($error, 0, $e);
|
||||
}
|
||||
@@ -162,7 +162,7 @@ class ReportFormRequest extends FormRequest
|
||||
return $date;
|
||||
}
|
||||
$error = sprintf('"%s" is not a valid date range: %s', $range, 'invalid format :(');
|
||||
app('log')->error($error);
|
||||
Log::error($error);
|
||||
|
||||
throw new FireflyException($error, 0);
|
||||
}
|
||||
@@ -192,8 +192,8 @@ class ReportFormRequest extends FormRequest
|
||||
$date = new Carbon($parts[0]);
|
||||
} catch (Exception $e) { // intentional generic exception
|
||||
$error = sprintf('"%s" is not a valid date range: %s', $range, $e->getMessage());
|
||||
app('log')->error($error);
|
||||
app('log')->error($e->getTraceAsString());
|
||||
Log::error($error);
|
||||
Log::error($e->getTraceAsString());
|
||||
|
||||
throw new FireflyException($error, 0, $e);
|
||||
}
|
||||
@@ -201,7 +201,7 @@ class ReportFormRequest extends FormRequest
|
||||
return $date;
|
||||
}
|
||||
$error = sprintf('"%s" is not a valid date range: %s', $range, 'invalid format :(');
|
||||
app('log')->error($error);
|
||||
Log::error($error);
|
||||
|
||||
throw new FireflyException($error, 0);
|
||||
}
|
||||
@@ -219,15 +219,15 @@ class ReportFormRequest extends FormRequest
|
||||
$set = $this->get('tag');
|
||||
$collection = new Collection();
|
||||
if (is_array($set)) {
|
||||
app('log')->debug('Set is:', $set);
|
||||
Log::debug('Set is:', $set);
|
||||
}
|
||||
if (!is_array($set)) {
|
||||
app('log')->debug(sprintf('Set is not an array! "%s"', $set));
|
||||
Log::debug(sprintf('Set is not an array! "%s"', $set));
|
||||
|
||||
return $collection;
|
||||
}
|
||||
foreach ($set as $tagTag) {
|
||||
app('log')->debug(sprintf('Now searching for "%s"', $tagTag));
|
||||
Log::debug(sprintf('Now searching for "%s"', $tagTag));
|
||||
$tag = $repository->findByTag($tagTag);
|
||||
if (null !== $tag) {
|
||||
$collection->push($tag);
|
||||
|
||||
Reference in New Issue
Block a user