Code Duplication    Length = 5-5 lines in 4 locations

src/Lodash/LodashServiceProvider.php 4 locations

@@ 77-81 (lines=5) @@
74
    {
75
        $register_request_macros = config('lodash.register_request_macros');
76
77
        if ($register_request_macros['getInt'] ?? false) {
78
            Request::macro('getInt', function (string $name, int $default = 0): int {
79
                return (int) $this->get($name, $default);
80
            });
81
        }
82
83
        if ($register_request_macros['getBool'] ?? false) {
84
            Request::macro('getBool', function (string $name, bool $default = false): bool {
@@ 83-87 (lines=5) @@
80
            });
81
        }
82
83
        if ($register_request_macros['getBool'] ?? false) {
84
            Request::macro('getBool', function (string $name, bool $default = false): bool {
85
                return (bool) $this->get($name, $default);
86
            });
87
        }
88
89
        if ($register_request_macros['getFloat'] ?? false) {
90
            Request::macro('getFloat', function (string $name, float $default = 0): float {
@@ 89-93 (lines=5) @@
86
            });
87
        }
88
89
        if ($register_request_macros['getFloat'] ?? false) {
90
            Request::macro('getFloat', function (string $name, float $default = 0): float {
91
                return (float) $this->get($name, $default);
92
            });
93
        }
94
95
        if ($register_request_macros['getString'] ?? false) {
96
            Request::macro('getString', function (string $name, string $default = ''): string {
@@ 95-99 (lines=5) @@
92
            });
93
        }
94
95
        if ($register_request_macros['getString'] ?? false) {
96
            Request::macro('getString', function (string $name, string $default = ''): string {
97
                return (string) $this->get($name, $default);
98
            });
99
        }
100
    }
101
}
102