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

refactor: Apply PHP5.6-7.3 rector sets #10128

Merged
merged 5 commits into from
Sep 17, 2024
Merged

Conversation

ChristophWurst
Copy link
Member

Commits can be reviewed one by one.

PHP7.4+ comes with lots of changes. We can do them later.

Copy link
Contributor

@kesselb kesselb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@@ -25,7 +25,7 @@ public function testIt($content, $filename, $contentType) {
$this->assertArrayHasKey('Content-Type', $headers);
$this->assertEquals($contentType, $headers['Content-Type']);
$this->assertArrayHasKey('Content-Disposition', $headers);
$pos = strpos($headers['Content-Disposition'], $filename);
$pos = strpos($headers['Content-Disposition'], (string) $filename);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting case: The type cast was added to avoid the deprecation warning if non-strings are passed to strpos. That does not apply here. I would prefer to type $content, $filename and $contentType and avoid the type cast.

Signed-off-by: Christoph Wurst <[email protected]>
Signed-off-by: Christoph Wurst <[email protected]>
Signed-off-by: Christoph Wurst <[email protected]>
Signed-off-by: Christoph Wurst <[email protected]>
Signed-off-by: Christoph Wurst <[email protected]>
@ChristophWurst ChristophWurst merged commit 83854dd into main Sep 17, 2024
33 of 34 checks passed
@ChristophWurst ChristophWurst deleted the refactor/rector-php-sets branch September 17, 2024 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants