Skip to content

Commit

Permalink
Marked class Util as internal, and changed the type of the inputs to …
Browse files Browse the repository at this point in the history
…mixed
  • Loading branch information
robtimus committed Jan 16, 2023
1 parent ef1d7ce commit 9897702
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/Robtimus/Multipart/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
/**
* Utility functions.
*
* @package Robtimus\Multipart
* @author Rob Spoor
* @license https://www.apache.org/licenses/LICENSE-2.0.txt The Apache Software License, Version 2.0
* @package Robtimus\Multipart
* @author Rob Spoor
* @license https://www.apache.org/licenses/LICENSE-2.0.txt The Apache Software License, Version 2.0
* @internal
*/
final class Util
{
Expand All @@ -20,7 +21,7 @@ private function __construct()
/**
* Validates that an input value is an int.
*
* @param int $input The input to validate.
* @param mixed $input The input to validate.
* @param string $name The name of the input value.
* @param string $message An optional message to show if the value is not an int.
*
Expand All @@ -38,7 +39,7 @@ public static function validateInt(&$input, $name, $message = '')
/**
* Validates that an input value is a positive int.
*
* @param int $input The input to validate.
* @param mixed $input The input to validate.
* @param string $name The name of the input value.
* @param string $message An optional message to show if the value is not a positive int.
*
Expand All @@ -57,7 +58,7 @@ public static function validatePositiveInt(&$input, $name, $message = '')
/**
* Validates that an input value is a string.
*
* @param string $input The input to validate.
* @param mixed $input The input to validate.
* @param string $name The name of the input value.
* @param string $message An optional message to show if the value is not a string.
*
Expand All @@ -75,7 +76,7 @@ public static function validateString(&$input, $name, $message = '')
/**
* Validates that an input value is a non-empty string.
*
* @param string $input The input to validate.
* @param mixed $input The input to validate.
* @param string $name The name of the input value.
* @param string $message An optional message to show if the value is not a non-empty string.
*
Expand All @@ -94,9 +95,9 @@ public static function validateNonEmptyString(&$input, $name, $message = '')
/**
* Validates that an input value can be used for streaming.
*
* @param string|resource|callable(int):string $input The input to validate.
* @param string $name The name of the input value.
* @param string $message An optional message to show if the value cannot be used for streaming.
* @param mixed $input The input to validate.
* @param string $name The name of the input value.
* @param string $message An optional message to show if the value cannot be used for streaming.
*
* @return void
*
Expand Down

0 comments on commit 9897702

Please sign in to comment.