mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-19 08:00:19 +00:00
Code cleanup
This commit is contained in:
@@ -48,7 +48,7 @@ class JournalLinkRequest extends Request
|
||||
$parts = explode('_', $linkType);
|
||||
$return['link_type_id'] = (int)$parts[0];
|
||||
$return['transaction_journal_id'] = $this->integer('link_journal_id');
|
||||
$return['notes'] = strlen($this->string('notes')) > 0 ? $this->string('notes') : '';
|
||||
$return['notes'] = \strlen($this->string('notes')) > 0 ? $this->string('notes') : '';
|
||||
$return['direction'] = $parts[1];
|
||||
if (0 === $return['transaction_journal_id'] && ctype_digit($this->string('link_other'))) {
|
||||
$return['transaction_journal_id'] = $this->integer('link_other');
|
||||
|
||||
@@ -46,7 +46,7 @@ class ReconciliationStoreRequest extends Request
|
||||
public function getAll(): array
|
||||
{
|
||||
$transactions = $this->get('transactions');
|
||||
if (!is_array($transactions)) {
|
||||
if (!\is_array($transactions)) {
|
||||
$transactions = []; // @codeCoverageIgnore
|
||||
}
|
||||
$data = [
|
||||
|
||||
@@ -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