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

[PHPStan] Add @var string[] on array of string, detected by enable StringifyStrNeedlesRector #7940

Merged
merged 8 commits into from
Sep 14, 2023

Conversation

samsonasik
Copy link
Member

@samsonasik samsonasik commented Sep 13, 2023

Description

with enable StringifyStrNeedlesRector, the cast (string) is applied to array data with mixed type.

This PR apply @var string[] so it skipped by StringifyStrNeedlesRector correctly.

https://github.com/rectorphp/rector/blob/main/docs/rector_rules_overview.md#stringifystrneedlesrector

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

system/Email/Email.php Outdated Show resolved Hide resolved
samsonasik and others added 4 commits September 14, 2023 12:30
…MethodReader.php

Co-authored-by: kenjis <kenji.uui@gmail.com>
Co-authored-by: kenjis <kenji.uui@gmail.com>
Co-authored-by: kenjis <kenji.uui@gmail.com>
Co-authored-by: kenjis <kenji.uui@gmail.com>
@samsonasik
Copy link
Member Author

@kenjis updated 👍

Co-authored-by: Pooya Parsa <pooya_parsa_dadashi@yahoo.com>
@samsonasik
Copy link
Member Author

@datamweb updated 👍

@samsonasik
Copy link
Member Author

Thank you @kenjis @datamweb for the review, I am merging it ;)

@samsonasik samsonasik merged commit e420c03 into codeigniter4:develop Sep 14, 2023
60 of 61 checks passed
@samsonasik samsonasik deleted the str-vars branch September 14, 2023 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants