Code Duplication    Length = 11-11 lines in 2 locations

src/Metfan/RabbitSetup/Configuration/ConfigExpertConfiguration.php 2 locations

@@ 146-156 (lines=11) @@
143
                            ->scalarNode('expires')
144
                                ->validate()
145
                                ->always()
146
                                    ->then(function($value){
147
                                        if (!$value) {
148
                                            return null;
149
                                        } elseif (is_int($value)){
150
                                            return (int) $value;
151
                                        }
152
153
                                        throw new InvalidTypeException(sprintf(
154
                                            'Invalid value for path "expires". Expected integer or null, but got %s.',
155
                                            gettype($value)));
156
                                    })
157
                                ->end()
158
                                ->info('# in ms, leave blank mean forever')
159
                                ->defaultValue(null)
@@ 164-174 (lines=11) @@
161
                            ->scalarNode('message-ttl')
162
                                ->validate()
163
                                ->always()
164
                                    ->then(function($value){
165
                                        if (!$value) {
166
                                            return null;
167
                                        } elseif (is_int($value)){
168
                                            return (int) $value;
169
                                        }
170
171
                                        throw new InvalidTypeException(sprintf(
172
                                            'Invalid value for path "expires". Expected integer or null, but got %s.',
173
                                            gettype($value)));
174
                                    })
175
                                ->end()
176
                                ->info('# in ms, leave blank mean forever')
177
                                ->defaultValue(null)