4
4
/**
5
5
* Utility functions.
6
6
*
7
- * @package Robtimus\Multipart
8
- * @author Rob Spoor
9
- * @license https://www.apache.org/licenses/LICENSE-2.0.txt The Apache Software License, Version 2.0
7
+ * @package Robtimus\Multipart
8
+ * @author Rob Spoor
9
+ * @license https://www.apache.org/licenses/LICENSE-2.0.txt The Apache Software License, Version 2.0
10
+ * @internal
10
11
*/
11
12
final class Util
12
13
{
@@ -20,7 +21,7 @@ private function __construct()
20
21
/**
21
22
* Validates that an input value is an int.
22
23
*
23
- * @param int $input The input to validate.
24
+ * @param mixed $input The input to validate.
24
25
* @param string $name The name of the input value.
25
26
* @param string $message An optional message to show if the value is not an int.
26
27
*
@@ -38,7 +39,7 @@ public static function validateInt(&$input, $name, $message = '')
38
39
/**
39
40
* Validates that an input value is a positive int.
40
41
*
41
- * @param int $input The input to validate.
42
+ * @param mixed $input The input to validate.
42
43
* @param string $name The name of the input value.
43
44
* @param string $message An optional message to show if the value is not a positive int.
44
45
*
@@ -57,7 +58,7 @@ public static function validatePositiveInt(&$input, $name, $message = '')
57
58
/**
58
59
* Validates that an input value is a string.
59
60
*
60
- * @param string $input The input to validate.
61
+ * @param mixed $input The input to validate.
61
62
* @param string $name The name of the input value.
62
63
* @param string $message An optional message to show if the value is not a string.
63
64
*
@@ -75,7 +76,7 @@ public static function validateString(&$input, $name, $message = '')
75
76
/**
76
77
* Validates that an input value is a non-empty string.
77
78
*
78
- * @param string $input The input to validate.
79
+ * @param mixed $input The input to validate.
79
80
* @param string $name The name of the input value.
80
81
* @param string $message An optional message to show if the value is not a non-empty string.
81
82
*
@@ -94,9 +95,9 @@ public static function validateNonEmptyString(&$input, $name, $message = '')
94
95
/**
95
96
* Validates that an input value can be used for streaming.
96
97
*
97
- * @param string|resource|callable(int):string $input The input to validate.
98
- * @param string $name The name of the input value.
99
- * @param string $message An optional message to show if the value cannot be used for streaming.
98
+ * @param mixed $input The input to validate.
99
+ * @param string $name The name of the input value.
100
+ * @param string $message An optional message to show if the value cannot be used for streaming.
100
101
*
101
102
* @return void
102
103
*
0 commit comments