Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.5] refactor: Filters by rector #8071

Merged
merged 1 commit into from
Oct 22, 2023

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Oct 22, 2023

Description

1 file with changes
===================

1) system/Filters/Filters.php:620

    ---------- begin diff ----------
@@ @@
             }

             if (is_array($this->config->aliases[$alias])) {
-                $filtersClass = array_merge($filtersClass, $this->config->aliases[$alias]);
+                $filtersClass = [...$filtersClass, ...$this->config->aliases[$alias]];
             } else {
                 $filtersClass[] = $this->config->aliases[$alias];
             }
    ----------- end diff -----------

Applied rules:
 * LongArrayToShortArrayRector
 * ArraySpreadInsteadOfArrayMergeRector (https://wiki.php.net/rfc/spread_operator_for_array)

https://github.com/codeigniter4/CodeIgniter4/actions/runs/6601535164/job/17932652976

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis added refactor Pull requests that refactor code 4.5 labels Oct 22, 2023
@kenjis kenjis merged commit b972d98 into codeigniter4:4.5 Oct 22, 2023
45 checks passed
@kenjis kenjis deleted the refactor-Filters-array_merge branch October 22, 2023 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.5 refactor Pull requests that refactor code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants