@@ -976,15 +976,12 @@ public function count()
976
976
* non-technical people.
977
977
*
978
978
* @param mixed $value The value to return the type of
979
- * @param string $type
980
- *
981
- * @return string The type of the value
982
979
*/
983
- private function formatTypeOf ($ value , $ type )
980
+ private function formatTypeOf ($ value , ? string $ type ): string
984
981
{
985
982
$ suffix = '' ;
986
983
987
- if ('[] ' === substr ($ type , -2 )) {
984
+ if (null !== $ type && '[] ' === substr ($ type , -2 )) {
988
985
$ suffix = '[] ' ;
989
986
$ type = substr ($ type , 0 , -2 );
990
987
while ('[] ' === substr ($ type , -2 )) {
@@ -1017,10 +1014,8 @@ private function formatTypeOf($value, $type)
1017
1014
* in double quotes (").
1018
1015
*
1019
1016
* @param mixed $value The value to format as string
1020
- *
1021
- * @return string The string representation of the passed value
1022
1017
*/
1023
- private function formatValue ($ value )
1018
+ private function formatValue ($ value ): string
1024
1019
{
1025
1020
if (is_object ($ value )) {
1026
1021
return get_class ($ value );
@@ -1059,13 +1054,9 @@ private function formatValue($value)
1059
1054
* Each of the values is converted to a string using
1060
1055
* {@link formatValue()}. The values are then concatenated with commas.
1061
1056
*
1062
- * @param array $values A list of values
1063
- *
1064
- * @return string The string representation of the value list
1065
- *
1066
1057
* @see formatValue()
1067
1058
*/
1068
- private function formatValues (array $ values )
1059
+ private function formatValues (array $ values ): string
1069
1060
{
1070
1061
foreach ($ values as $ key => $ value ) {
1071
1062
$ values [$ key ] = $ this ->formatValue ($ value );
0 commit comments