@@ -140,6 +140,8 @@ function getMimetypeFromFilename(string $filename):?string{
140
140
}
141
141
142
142
/**
143
+ * Recursive rawurlencode
144
+ *
143
145
* @param string|string[] $data
144
146
*
145
147
* @return string|string[]
@@ -159,9 +161,6 @@ function r_rawurlencode($data){
159
161
}
160
162
161
163
/**
162
- * @param \Psr\Http\Message\MessageInterface $message
163
- * @param bool|null $assoc
164
- *
165
164
* @return \stdClass|array|bool
166
165
*/
167
166
function get_json (MessageInterface $ message , bool $ assoc = null ){
@@ -173,9 +172,6 @@ function get_json(MessageInterface $message, bool $assoc = null){
173
172
}
174
173
175
174
/**
176
- * @param \Psr\Http\Message\MessageInterface $message
177
- * @param bool|null $assoc
178
- *
179
175
* @return \SimpleXMLElement|array|bool
180
176
*/
181
177
function get_xml (MessageInterface $ message , bool $ assoc = null ){
@@ -190,10 +186,6 @@ function get_xml(MessageInterface $message, bool $assoc = null){
190
186
191
187
/**
192
188
* Returns the string representation of an HTTP message. (from Guzzle)
193
- *
194
- * @param \Psr\Http\Message\MessageInterface $message Message to convert to a string.
195
- *
196
- * @return string
197
189
*/
198
190
function message_to_string (MessageInterface $ message ):string {
199
191
$ msg = '' ;
@@ -223,9 +215,6 @@ function message_to_string(MessageInterface $message):string{
223
215
/**
224
216
* Decompresses the message content according to the Content-Encoding header and returns the decompressed data
225
217
*
226
- * @param \Psr\Http\Message\MessageInterface $message
227
- *
228
- * @return string
229
218
* @throws \RuntimeException
230
219
*/
231
220
function decompress_content (MessageInterface $ message ):string {
@@ -270,7 +259,7 @@ function decompress_content(MessageInterface $message):string{
270
259
];
271
260
272
261
/**
273
- * Checks whether the URI has a port set and if that port is one of the default ports for the given scheme
262
+ * Checks whether the UriInterface has a port set and if that port is one of the default ports for the given scheme
274
263
*/
275
264
function uriIsDefaultPort (UriInterface $ uri ):bool {
276
265
$ port = $ uri ->getPort ();
@@ -280,7 +269,7 @@ function uriIsDefaultPort(UriInterface $uri):bool{
280
269
}
281
270
282
271
/**
283
- * Whether the URI is absolute, i.e. it has a scheme.
272
+ * Checks Whether the URI is absolute, i.e. it has a scheme.
284
273
*
285
274
* An instance of UriInterface can either be an absolute URI or a relative reference. This method returns true
286
275
* if it is the former. An absolute URI has a scheme. A relative reference is used to express a URI relative
@@ -299,7 +288,7 @@ function uriIsAbsolute(UriInterface $uri):bool{
299
288
}
300
289
301
290
/**
302
- * Whether the URI is a network-path reference.
291
+ * Checks Whether the URI is a network-path reference.
303
292
*
304
293
* A relative reference that begins with two slash characters is termed an network-path reference.
305
294
*
@@ -310,7 +299,7 @@ function uriIsNetworkPathReference(UriInterface $uri):bool{
310
299
}
311
300
312
301
/**
313
- * Whether the URI is a absolute-path reference.
302
+ * Checks Whether the URI is a absolute-path reference.
314
303
*
315
304
* A relative reference that begins with a single slash character is termed an absolute-path reference.
316
305
*
@@ -321,7 +310,7 @@ function uriIsAbsolutePathReference(UriInterface $uri):bool{
321
310
}
322
311
323
312
/**
324
- * Whether the URI is a relative-path reference.
313
+ * Checks Whether the URI is a relative-path reference.
325
314
*
326
315
* A relative reference that does not begin with a slash character is termed a relative-path reference.
327
316
*
@@ -332,12 +321,9 @@ function uriIsRelativePathReference(UriInterface $uri):bool{
332
321
}
333
322
334
323
/**
335
- * removes a specific query string value.
324
+ * Removes a specific query string value.
336
325
*
337
- * Any existing query string values that exactly match the provided key are
338
- * removed.
339
- *
340
- * @param string $key Query string key to remove.
326
+ * Any existing query string values that exactly match the provided $key are removed.
341
327
*/
342
328
function uriWithoutQueryValue (UriInterface $ uri , string $ key ):UriInterface {
343
329
$ current = $ uri ->getQuery ();
@@ -356,16 +342,12 @@ function uriWithoutQueryValue(UriInterface $uri, string $key):UriInterface{
356
342
}
357
343
358
344
/**
359
- * adds a specific query string value.
360
- *
361
- * Any existing query string values that exactly match the provided key are
362
- * removed and replaced with the given key value pair.
345
+ * Adds a specific query string value.
363
346
*
364
- * A value of null will set the query string key without a value, e.g. " key"
365
- * instead of " key= value" .
347
+ * Any existing query string values that exactly match the provided $ key are
348
+ * removed and replaced with the given $ key $ value pair .
366
349
*
367
- * @param string $key Key to set.
368
- * @param string|null $value Value to set
350
+ * A value of null will set the query string key without a value, e.g. "key" instead of "key=value".
369
351
*/
370
352
function uriWithQueryValue (UriInterface $ uri , string $ key , string $ value = null ):UriInterface {
371
353
$ current = $ uri ->getQuery ();
0 commit comments