-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[4.3] Remove unused local variables #34176
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,13 +41,13 @@ public function testConstructorWithAddressRecipients() | |
public function testConstructorWithNoRecipients() | ||
{ | ||
$this->expectException(\InvalidArgumentException::class); | ||
$e = new SmtpEnvelope(new Address('[email protected]'), []); | ||
new SmtpEnvelope(new Address('[email protected]'), []); | ||
} | ||
|
||
public function testConstructorWithWrongRecipients() | ||
{ | ||
$this->expectException(\InvalidArgumentException::class); | ||
$e = new SmtpEnvelope(new Address('[email protected]'), ['[email protected]']); | ||
new SmtpEnvelope(new Address('[email protected]'), ['[email protected]']); | ||
} | ||
|
||
public function testSenderFromHeaders() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -320,8 +320,6 @@ public function testGenerateBody() | |
$e->text('text content'); | ||
$e->attach($file); | ||
$e->attach($image, 'test.gif'); | ||
$fullhtml = new TextPart($content, 'utf-8', 'html'); | ||
$inlinedimg = (new DataPart($image, 'test.gif'))->asInline(); | ||
$body = $e->getBody(); | ||
$this->assertInstanceOf(MixedPart::class, $body); | ||
$this->assertCount(2, $related = $body->getParts()); | ||
|
@@ -378,7 +376,7 @@ public function testSerialize() | |
$e->from('[email protected]'); | ||
$e->text($r); | ||
$e->html($r); | ||
$contents = file_get_contents($name = __DIR__.'/Fixtures/mimetypes/test', 'r'); | ||
$name = __DIR__.'/Fixtures/mimetypes/test'; | ||
$file = fopen($name, 'r'); | ||
$e->attach($file, 'test'); | ||
$expected = clone $e; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ public function testSingleAddressCanBeSetAndFetched() | |
public function testAddressMustComplyWithRfc2822() | ||
{ | ||
$this->expectException('Exception'); | ||
$header = new PathHeader('Return-Path', new Address('chr [email protected]')); | ||
new PathHeader('Return-Path', new Address('chr [email protected]')); | ||
} | ||
|
||
public function testValueIsAngleAddrWithValidAddress() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,7 +121,7 @@ static function (\$condition, \$context, \$request) { // \$checkCondition | |
} | ||
} | ||
EOF; | ||
$compiledRoutes[4] = $forDump ? $checkConditionCode .= ",\n" : eval('return '.$checkConditionCode.';'); | ||
$compiledRoutes[4] = $forDump ? $checkConditionCode.",\n" : eval('return '.$checkConditionCode.';'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've seen this updated in the previous PR also and still merged - but FYI this is not exactly the same: using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the explanation. I assumed a simple concat is faster than an assign + concat. It might worth it to take a look or to revert those changes. I don't want to cause a performance regression just by trying to "clean" the code. |
||
} else { | ||
$compiledRoutes[4] = $forDump ? " null, // \$checkCondition\n" : null; | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.