Code Duplication    Length = 9-9 lines in 3 locations

src/Envelopes/ValidatorV1.php 3 locations

@@ 282-290 (lines=9) @@
279
                                );
280
                            }
281
                            break;
282
                        case 'int':
283
                            if (!is_int($value)) {
284
                                $details[] = sprintf(
285
                                    'Field "%s" must be int, but %s provided',
286
                                    $key,
287
                                    $value === null ? 'null' : gettype($value)
288
                                );
289
                            }
290
                            break;
291
                        case 'float':
292
                            if (!is_float($value) && !is_int($value)) {
293
                                $details[] = sprintf(
@@ 291-299 (lines=9) @@
288
                                );
289
                            }
290
                            break;
291
                        case 'float':
292
                            if (!is_float($value) && !is_int($value)) {
293
                                $details[] = sprintf(
294
                                    'Field "%s" must be float/double, but %s provided',
295
                                    $key,
296
                                    $value === null ? 'null' : gettype($value)
297
                                );
298
                            }
299
                            break;
300
                        case 'bool':
301
                            if (!is_bool($value)) {
302
                                $details[] = sprintf(
@@ 300-308 (lines=9) @@
297
                                );
298
                            }
299
                            break;
300
                        case 'bool':
301
                            if (!is_bool($value)) {
302
                                $details[] = sprintf(
303
                                    'Field "%s" must be boolean, but %s provided',
304
                                    $key,
305
                                    $value === null ? 'null' : gettype($value)
306
                                );
307
                            }
308
                            break;
309
                        default:
310
                            $details[] = sprintf('Unknown type for "%s"', $key);
311
                    }