File tree Expand file tree Collapse file tree 5 files changed +5
-12
lines changed
Expand file tree Collapse file tree 5 files changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,6 @@ public function read(int $length): ?string
116116 if ($ this ->currentPos >= $ this ->charCount ) {
117117 return null ;
118118 }
119- $ ret = null ;
120119 $ length = ($ this ->currentPos + $ length > $ this ->charCount ) ? $ this ->charCount - $ this ->currentPos : $ length ;
121120 if ($ this ->fixedWidth > 0 ) {
122121 $ len = $ length * $ this ->fixedWidth ;
Original file line number Diff line number Diff line change @@ -320,8 +320,6 @@ public function testGenerateBody()
320320 $ e ->text ('text content ' );
321321 $ e ->attach ($ file );
322322 $ e ->attach ($ image , 'test.gif ' );
323- $ fullhtml = new TextPart ($ content , 'utf-8 ' , 'html ' );
324- $ inlinedimg = (new DataPart ($ image , 'test.gif ' ))->asInline ();
325323 $ body = $ e ->getBody ();
326324 $ this ->assertInstanceOf (MixedPart::class, $ body );
327325 $ this ->assertCount (2 , $ related = $ body ->getParts ());
@@ -378,7 +376,7 @@ public function testSerialize()
378376379377 $ e ->text ($ r );
380378 $ e ->html ($ r );
381- $ contents = file_get_contents ( $ name = __DIR__ .'/Fixtures/mimetypes/test ' , ' r ' ) ;
379+ $ name = __DIR__ .'/Fixtures/mimetypes/test ' ;
382380 $ file = fopen ($ name , 'r ' );
383381 $ e ->attach ($ file , 'test ' );
384382 $ expected = clone $ e ;
Original file line number Diff line number Diff line change @@ -173,8 +173,6 @@ public function testAllReturnsEmptyArrayIfNoneSet()
173173
174174 public function testRemoveRemovesAllHeadersWithName ()
175175 {
176- $ header0 = new UnstructuredHeader ('X-Test ' , 'some@id ' );
177- $ header1 = new UnstructuredHeader ('X-Test ' , 'other@id ' );
178176 $ headers = new Headers ();
179177 $ headers ->addIdHeader ('X-Test ' , 'some@id ' );
180178 $ headers ->addIdHeader ('X-Test ' , 'other@id ' );
@@ -185,7 +183,6 @@ public function testRemoveRemovesAllHeadersWithName()
185183
186184 public function testHasIsNotCaseSensitive ()
187185 {
188- $ header = new IdentificationHeader ('Message-ID ' , 'some@id ' );
189186 $ headers = new Headers ();
190187 $ headers ->addIdHeader ('Message-ID ' , 'some@id ' );
191188 $ this ->assertTrue ($ headers ->has ('message-id ' ));
@@ -209,7 +206,6 @@ public function testAllIsNotCaseSensitive()
209206
210207 public function testRemoveIsNotCaseSensitive ()
211208 {
212- $ header = new IdentificationHeader ('Message-ID ' , 'some@id ' );
213209 $ headers = new Headers ();
214210 $ headers ->addIdHeader ('Message-ID ' , 'some@id ' );
215211 $ headers ->remove ('message-id ' );
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ public function testInvalidIdLeftThrowsException()
103103 {
104104 $ this ->expectException ('Exception ' );
105105 $ 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 ' );
107107 }
108108
109109 public function testIdRightCanBeDotAtom ()
@@ -139,7 +139,7 @@ public function testInvalidIdRightThrowsException()
139139 {
140140 $ this ->expectException ('Exception ' );
141141 $ 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 ' );
143143 }
144144
145145 public function testMissingAtSignThrowsException ()
@@ -149,7 +149,7 @@ public function testMissingAtSignThrowsException()
149149 /* -- RFC 2822, 3.6.4.
150150 msg-id = [CFWS] "<" id-left "@" id-right ">" [CFWS]
151151 */
152- $ header = new IdentificationHeader ('References ' , 'abc ' );
152+ new IdentificationHeader ('References ' , 'abc ' );
153153 }
154154
155155 public function testSetBody ()
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ public function testSingleAddressCanBeSetAndFetched()
2626 public function testAddressMustComplyWithRfc2822 ()
2727 {
2828 $ this ->expectException ('Exception ' );
29- $ header = new PathHeader (
'Return-Path ' ,
new Address (
'chr [email protected] ' ));
29+ new PathHeader (
'Return-Path ' ,
new Address (
'chr [email protected] ' ));
3030 }
3131
3232 public function testValueIsAngleAddrWithValidAddress ()
You can’t perform that action at this time.
0 commit comments