File tree Expand file tree Collapse file tree 1 file changed +0
-11
lines changed
src/Symfony/Component/Mime/Part Expand file tree Collapse file tree 1 file changed +0
-11
lines changed Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Component \Mime \Part ;
13
13
14
- use Symfony \Component \Mime \Exception \LogicException ;
15
14
use Symfony \Component \Mime \Header \Headers ;
16
15
17
16
/**
@@ -57,11 +56,6 @@ public function getPreparedHeaders(): Headers
57
56
public function bodyToString (): string
58
57
{
59
58
$ parts = $ this ->getParts ();
60
-
61
- if (\count ($ parts ) < 2 ) {
62
- throw new LogicException (sprintf ('A "%s" instance must have at least 2 parts. ' , __CLASS__ ));
63
- }
64
-
65
59
$ string = '' ;
66
60
foreach ($ parts as $ part ) {
67
61
$ string .= '-- ' .$ this ->getBoundary ()."\r\n" .$ part ->toString ()."\r\n" ;
@@ -74,11 +68,6 @@ public function bodyToString(): string
74
68
public function bodyToIterable (): iterable
75
69
{
76
70
$ parts = $ this ->getParts ();
77
-
78
- if (\count ($ parts ) < 2 ) {
79
- throw new LogicException (sprintf ('A "%s" instance must have at least 2 parts. ' , __CLASS__ ));
80
- }
81
-
82
71
foreach ($ parts as $ part ) {
83
72
yield '-- ' .$ this ->getBoundary ()."\r\n" ;
84
73
foreach ($ part ->toIterable () as $ chunk ) {
You can’t perform that action at this time.
0 commit comments