-
Notifications
You must be signed in to change notification settings - Fork 263
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
Conversation
There was a problem hiding this 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); |
There was a problem hiding this comment.
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]>
7f85b38
to
3a2cefa
Compare
Commits can be reviewed one by one.
PHP7.4+ comes with lots of changes. We can do them later.