Skip to content

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

Merged
samsonasik merged 8 commits intocodeigniter4:developfrom
samsonasik:str-vars
Sep 14, 2023
Merged

[PHPStan] Add @var string[] on array of string, detected by enable StringifyStrNeedlesRector#7940
samsonasik merged 8 commits intocodeigniter4:developfrom
samsonasik:str-vars

Conversation

@samsonasik
Copy link
Copy Markdown
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

Comment thread system/Commands/Utilities/Routes/AutoRouterImproved/ControllerMethodReader.php Outdated
Comment thread system/Email/Email.php Outdated
Comment thread system/Router/RouteCollection.php Outdated
Comment thread system/Router/RouteCollection.php Outdated
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
Copy Markdown
Member Author

@kenjis updated 👍

Comment thread system/Router/RouteCollection.php Outdated
Co-authored-by: Pooya Parsa <pooya_parsa_dadashi@yahoo.com>
Comment thread system/Commands/Utilities/Routes/AutoRouterImproved/ControllerMethodReader.php Outdated
@samsonasik
Copy link
Copy Markdown
Member Author

@datamweb updated 👍

@samsonasik
Copy link
Copy Markdown
Member Author

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

@samsonasik samsonasik merged commit e420c03 into codeigniter4:develop Sep 14, 2023
@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