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

Apply Rector suggestions for PHP 8.1 #41482

Merged
merged 33 commits into from
Feb 1, 2024
Merged

Commits on Jan 30, 2024

  1. Apply Rector suggestions

    asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    368cb00 View commit details
    Browse the repository at this point in the history
  2. Add changefile(s) from automation for the following project(s): wooco…

    …mmerce
    github-actions authored and asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    ca8f8fe View commit details
    Browse the repository at this point in the history
  3. Restore false positive

    $missing_tables will always be an array
    asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    6aad3b9 View commit details
    Browse the repository at this point in the history
  4. Restore false positive.

    Rector issue: AddDefaultValueForUndefinedVariableRector.
    
    This time the early return is valid so there’s no need to move the $process_limit assignment to the top.
    asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    1b49df6 View commit details
    Browse the repository at this point in the history
  5. Ask if $orders is an array

    $orders is used as an array lines below. Add `is_array` just in case the “paginate” param is used which would change $orders to an object.
    asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    2b457c9 View commit details
    Browse the repository at this point in the history
  6. Check if variable is array

    Simplifies variable check given that they are used as an array lines below.
    asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    ad08d0d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3cd4fd1 View commit details
    Browse the repository at this point in the history
  8. Restore false positive

    In the previous loop the $data variable is being built as an array of arrays. Then $value in this loop will allways be array.
    asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    58ba462 View commit details
    Browse the repository at this point in the history
  9. Restore false positive

    get_children’s method. of a WC_Product instance will always return an array.
    asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    503882d View commit details
    Browse the repository at this point in the history
  10. Simplify variable check

    Ask if varialbe is array since it only can be array or false.
    asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    4b77a0c View commit details
    Browse the repository at this point in the history
  11. Restore false positive

    WC_Blocks_Utils::get_blocks_from_page() will always return an array.
    asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    5be20ca View commit details
    Browse the repository at this point in the history
  12. Restore false positive

    There’s a check asking if $existing_meta_data[ $meta_data->key ] is array.
    asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    95bf621 View commit details
    Browse the repository at this point in the history
  13. Restore false positive

    $child_ids will always be an array.
    asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    d1a1dfa View commit details
    Browse the repository at this point in the history
  14. Restore false positives

    WC_Product->get_visible_children() will always return an array.
    asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    bc77aed View commit details
    Browse the repository at this point in the history
  15. Restore false positives

    WC_Product->get_children() will always return an array.
    asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    f2a809c View commit details
    Browse the repository at this point in the history
  16. Restore false positive

    WC_Product->get_visible_children() will always return an array.
    asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    4a86082 View commit details
    Browse the repository at this point in the history
  17. Restore false positive

    WC_Order->get_items() will always return an array.
    asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    5bc27d1 View commit details
    Browse the repository at this point in the history
  18. Restore false positive

    The get_matching_rates private method will always return an array.
    
    Updated the @return declaration to be an array instead of boolean.
    asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    a7e1b08 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    46e5d73 View commit details
    Browse the repository at this point in the history
  20. Restore false positive

    $this->get_children() will always return an array.
    asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    2046906 View commit details
    Browse the repository at this point in the history
  21. Fix lint issues

    asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    1f75443 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    c6a2497 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    27eed10 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    7620c9a View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    0274ebb View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    48b5787 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    2a9f30e View commit details
    Browse the repository at this point in the history
  28. Update changelog entry

    asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    f052f83 View commit details
    Browse the repository at this point in the history
  29. Update changelog entry

    asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    751334a View commit details
    Browse the repository at this point in the history
  30. Update changelog entry

    asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    7342f53 View commit details
    Browse the repository at this point in the history
  31. Add changefile(s) from automation for the following project(s): wooco…

    …mmerce
    github-actions authored and asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    9ac605d View commit details
    Browse the repository at this point in the history
  32. Update changelog entry

    asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    cf7655b View commit details
    Browse the repository at this point in the history
  33. Use self for consistency

    asumaran committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    ad4e25c View commit details
    Browse the repository at this point in the history