@@ -64,11 +64,6 @@ class DirectMailTransport extends Transport
64
64
65
65
/**
66
66
* DirectMailTransport constructor.
67
- *
68
- * @param \GuzzleHttp\ClientInterface $client
69
- * @param string $key
70
- * @param string $secret
71
- * @param array $options
72
67
*/
73
68
public function __construct (ClientInterface $ client , string $ key , string $ secret , array $ options = [])
74
69
{
@@ -84,9 +79,7 @@ public function __construct(ClientInterface $client, string $key, string $secret
84
79
* Recipient/sender data will be retrieved from the Message API.
85
80
* The return value is the number of recipients who were accepted for delivery.
86
81
*
87
- * @param Swift_Mime_SimpleMessage $message
88
- * @param string[] $failedRecipients An array of failures by-reference
89
- *
82
+ * @param string[] $failedRecipients An array of failures by-reference
90
83
* @return int
91
84
*/
92
85
public function send (Swift_Mime_SimpleMessage $ message , &$ failedRecipients = null )
@@ -108,8 +101,6 @@ public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = nul
108
101
/**
109
102
* Get the HTTP payload for sending the message.
110
103
*
111
- * @param \Swift_Mime_SimpleMessage $message
112
- * @param array $region
113
104
*
114
105
* @return array
115
106
*/
@@ -132,7 +123,7 @@ protected function payload(Swift_Mime_SimpleMessage $message, array $region)
132
123
'SignatureVersion ' => '1.0 ' ,
133
124
'SignatureNonce ' => \uniqid (),
134
125
'RegionId ' => $ region ['id ' ],
135
- 'TagName ' => $ this ->getTagName ($ message )
126
+ 'TagName ' => $ this ->getTagName ($ message ),
136
127
]);
137
128
138
129
$ bodyName = $ this ->getBodyName ($ message );
@@ -144,8 +135,6 @@ protected function payload(Swift_Mime_SimpleMessage $message, array $region)
144
135
}
145
136
146
137
/**
147
- * @param array $parameters
148
- *
149
138
* @return string
150
139
*/
151
140
protected function makeSignature (array $ parameters )
@@ -158,28 +147,25 @@ protected function makeSignature(array $parameters)
158
147
$ encoded [] = \sprintf ('%s=%s ' , rawurlencode ($ key ), rawurlencode ($ value ));
159
148
}
160
149
161
- $ signString = 'POST&%2F& ' . rawurlencode (\join ('& ' , $ encoded ));
150
+ $ signString = 'POST&%2F& ' . rawurlencode (\implode ('& ' , $ encoded ));
162
151
163
- return base64_encode (hash_hmac ('sha1 ' , $ signString , $ this ->getSecret () . '& ' , true ));
152
+ return base64_encode (hash_hmac ('sha1 ' , $ signString , $ this ->getSecret (). '& ' , true ));
164
153
}
165
154
166
155
/**
167
156
* Get the "to" payload field for the API request.
168
157
*
169
- * @param \Swift_Mime_SimpleMessage $message
170
158
*
171
159
* @return string
172
160
*/
173
161
protected function getTo (Swift_Mime_SimpleMessage $ message )
174
162
{
175
163
return collect ($ this ->allContacts ($ message ))->map (function ($ display , $ address ) {
176
- return $ display ? $ display . " < {$ address }> " : $ address ;
164
+ return $ display ? $ display. " < {$ address }> " : $ address ;
177
165
})->values ()->implode (', ' );
178
166
}
179
167
180
168
/**
181
- * @param \Psr\Http\Message\ResponseInterface $response
182
- *
183
169
* @return mixed
184
170
*/
185
171
protected function getTransmissionId (ResponseInterface $ response )
@@ -191,8 +177,6 @@ protected function getTransmissionId(ResponseInterface $response)
191
177
}
192
178
193
179
/**
194
- * @param \Swift_Mime_SimpleMessage $message
195
- *
196
180
* @return array
197
181
*/
198
182
protected function allContacts (Swift_Mime_SimpleMessage $ message )
@@ -221,8 +205,6 @@ public function getSecret()
221
205
}
222
206
223
207
/**
224
- * @param string $key
225
- *
226
208
* @return string
227
209
*/
228
210
public function setKey (string $ key )
@@ -231,8 +213,6 @@ public function setKey(string $key)
231
213
}
232
214
233
215
/**
234
- * @param string $secret
235
- *
236
216
* @return string
237
217
*/
238
218
public function setSecret (string $ secret )
@@ -241,8 +221,6 @@ public function setSecret(string $secret)
241
221
}
242
222
243
223
/**
244
- * @param Swift_Mime_SimpleMessage $message
245
- *
246
224
* @return string
247
225
*/
248
226
protected function getBodyName (Swift_Mime_SimpleMessage $ message )
@@ -251,8 +229,6 @@ protected function getBodyName(Swift_Mime_SimpleMessage $message)
251
229
}
252
230
253
231
/**
254
- * @param Swift_Mime_SimpleMessage $message
255
- *
256
232
* @return string|null
257
233
*/
258
234
protected function getTagName (Swift_Mime_SimpleMessage $ message )
0 commit comments