private function arrayContainsOnlyStrings(array $array): bool
    {
        // Test if a value is a string.
        $filterStringValue = static function (bool $carry, $item) {
            if (! \is_string($item)) {
                return false;
            }

            return $carry;
        };

        return \array_reduce($array, $filterStringValue, true);
    }
private function arrayContainsOnlyStrings(array $array): bool
    {
        // Test if a value is a string.
        $filterStringValue = static function (bool $carry, $item) {
            if (! \is_string($item)) {
                return false;
            }

            return $carry;
        };

        return \array_reduce($array, $filterStringValue, true);
    }
private function arrayContainsOnlyStrings ( array $ array ) : bool { // Test if a value is a string. $ filterStringValue = static function ( bool $ carry , $ item ) { if ( ! \ is_string ( $ item ) ) { return false ; } return $ carry ; } ; return \ array_reduce ( $ array , $ filterStringValue , true ) ; }
Test that an array contains only strings.

@param array $array

@return bool
Test that an array contains only strings .