@@ -976,15 +976,12 @@ public function count()
976976 * non-technical people.
977977 *
978978 * @param mixed $value The value to return the type of
979- * @param string $type
980- *
981- * @return string The type of the value
982979 */
983- private function formatTypeOf ($ value , $ type )
980+ private function formatTypeOf ($ value , ? string $ type ): string
984981 {
985982 $ suffix = '' ;
986983
987- if ('[] ' === substr ($ type , -2 )) {
984+ if (null !== $ type && '[] ' === substr ($ type , -2 )) {
988985 $ suffix = '[] ' ;
989986 $ type = substr ($ type , 0 , -2 );
990987 while ('[] ' === substr ($ type , -2 )) {
@@ -1017,10 +1014,8 @@ private function formatTypeOf($value, $type)
10171014 * in double quotes (").
10181015 *
10191016 * @param mixed $value The value to format as string
1020- *
1021- * @return string The string representation of the passed value
10221017 */
1023- private function formatValue ($ value )
1018+ private function formatValue ($ value ): string
10241019 {
10251020 if (is_object ($ value )) {
10261021 return get_class ($ value );
@@ -1059,13 +1054,9 @@ private function formatValue($value)
10591054 * Each of the values is converted to a string using
10601055 * {@link formatValue()}. The values are then concatenated with commas.
10611056 *
1062- * @param array $values A list of values
1063- *
1064- * @return string The string representation of the value list
1065- *
10661057 * @see formatValue()
10671058 */
1068- private function formatValues (array $ values )
1059+ private function formatValues (array $ values ): string
10691060 {
10701061 foreach ($ values as $ key => $ value ) {
10711062 $ values [$ key ] = $ this ->formatValue ($ value );
0 commit comments