File tree 5 files changed +5
-11
lines changed 5 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,6 @@ public function read(int $length): ?string
114
114
if ($ this ->currentPos >= $ this ->charCount ) {
115
115
return null ;
116
116
}
117
- $ ret = null ;
118
117
$ length = ($ this ->currentPos + $ length > $ this ->charCount ) ? $ this ->charCount - $ this ->currentPos : $ length ;
119
118
if ($ this ->fixedWidth > 0 ) {
120
119
$ len = $ length * $ this ->fixedWidth ;
Original file line number Diff line number Diff line change @@ -319,7 +319,6 @@ public function testGenerateBody()
319
319
$ e ->text ('text content ' );
320
320
$ e ->attach ($ file );
321
321
$ e ->attach ($ image , 'test.gif ' );
322
- $ fullhtml = new TextPart ($ content , 'utf-8 ' , 'html ' );
323
322
$ body = $ e ->getBody ();
324
323
$ this ->assertInstanceOf (MixedPart::class, $ body );
325
324
$ this ->assertCount (2 , $ related = $ body ->getParts ());
@@ -376,7 +375,7 @@ public function testSerialize()
376
375
$ e ->from ('fabien@symfony.com ' );
377
376
$ e ->text ($ r );
378
377
$ e ->html ($ r );
379
- $ contents = file_get_contents ( $ name = __DIR__ .'/Fixtures/mimetypes/test ' , ' r ' ) ;
378
+ $ name = __DIR__ .'/Fixtures/mimetypes/test ' ;
380
379
$ file = fopen ($ name , 'r ' );
381
380
$ e ->attach ($ file , 'test ' );
382
381
$ expected = clone $ e ;
Original file line number Diff line number Diff line change @@ -173,8 +173,6 @@ public function testAllReturnsEmptyArrayIfNoneSet()
173
173
174
174
public function testRemoveRemovesAllHeadersWithName ()
175
175
{
176
- $ header0 = new UnstructuredHeader ('X-Test ' , 'some@id ' );
177
- $ header1 = new UnstructuredHeader ('X-Test ' , 'other@id ' );
178
176
$ headers = new Headers ();
179
177
$ headers ->addIdHeader ('X-Test ' , 'some@id ' );
180
178
$ headers ->addIdHeader ('X-Test ' , 'other@id ' );
@@ -185,7 +183,6 @@ public function testRemoveRemovesAllHeadersWithName()
185
183
186
184
public function testHasIsNotCaseSensitive ()
187
185
{
188
- $ header = new IdentificationHeader ('Message-ID ' , 'some@id ' );
189
186
$ headers = new Headers ();
190
187
$ headers ->addIdHeader ('Message-ID ' , 'some@id ' );
191
188
$ this ->assertTrue ($ headers ->has ('message-id ' ));
@@ -209,7 +206,6 @@ public function testAllIsNotCaseSensitive()
209
206
210
207
public function testRemoveIsNotCaseSensitive ()
211
208
{
212
- $ header = new IdentificationHeader ('Message-ID ' , 'some@id ' );
213
209
$ headers = new Headers ();
214
210
$ headers ->addIdHeader ('Message-ID ' , 'some@id ' );
215
211
$ headers ->remove ('message-id ' );
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ public function testInvalidIdLeftThrowsException()
103
103
{
104
104
$ this ->expectException ('Exception ' );
105
105
$ this ->expectExceptionMessage ('Email "a b c@d" does not comply with addr-spec of RFC 2822. ' );
106
- $ header = new IdentificationHeader ('References ' , 'a b c@d ' );
106
+ new IdentificationHeader ('References ' , 'a b c@d ' );
107
107
}
108
108
109
109
public function testIdRightCanBeDotAtom ()
@@ -139,7 +139,7 @@ public function testInvalidIdRightThrowsException()
139
139
{
140
140
$ this ->expectException ('Exception ' );
141
141
$ this ->expectExceptionMessage ('Email "a@b c d" does not comply with addr-spec of RFC 2822. ' );
142
- $ header = new IdentificationHeader ('References ' , 'a@b c d ' );
142
+ new IdentificationHeader ('References ' , 'a@b c d ' );
143
143
}
144
144
145
145
public function testMissingAtSignThrowsException ()
@@ -149,7 +149,7 @@ public function testMissingAtSignThrowsException()
149
149
/* -- RFC 2822, 3.6.4.
150
150
msg-id = [CFWS] "<" id-left "@" id-right ">" [CFWS]
151
151
*/
152
- $ header = new IdentificationHeader ('References ' , 'abc ' );
152
+ new IdentificationHeader ('References ' , 'abc ' );
153
153
}
154
154
155
155
public function testSetBody ()
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ public function testSingleAddressCanBeSetAndFetched()
26
26
public function testAddressMustComplyWithRfc2822 ()
27
27
{
28
28
$ this ->expectException ('Exception ' );
29
- $ header = new PathHeader ('Return-Path ' , new Address ('chr is@swiftmailer.org ' ));
29
+ new PathHeader ('Return-Path ' , new Address ('chr is@swiftmailer.org ' ));
30
30
}
31
31
32
32
public function testValueIsAngleAddrWithValidAddress ()
You can’t perform that action at this time.
0 commit comments