Code Duplication    Length = 11-11 lines in 3 locations

src/UI/Resolver/Validator/RequestAttributeValueValidator.php 1 location

@@ 214-224 (lines=11) @@
211
     *
212
     * @throws CommandMappingException If any mapping validation failed
213
     */
214
    public function mustBeDateTime(ServerRequestInterface $request, string $attributeKey, string $exceptionMessage = null): \DateTime
215
    {
216
        $value = $this->extractValueFromRequestAttribute($request, $attributeKey);
217
218
        return $this->rawValueValidator->mustBeDateTime(
219
            $value,
220
            $attributeKey,
221
            $this,
222
            $exceptionMessage
223
        );
224
    }
225
226
    /**
227
     * Exceptions are caught in order to be processed later

src/UI/Resolver/Validator/RequestQueryStringValueValidator.php 2 locations

@@ 191-201 (lines=11) @@
188
     *
189
     * @throws CommandMappingException If any mapping validation failed
190
     */
191
    public function mustBeDate(ServerRequestInterface $request, string $queryStringKey, string $exceptionMessage = null): \DateTime
192
    {
193
        $value = $this->extractValueFromRequestQueryString($request, $queryStringKey);
194
195
        return $this->rawValueValidator->mustBeDate(
196
            $value,
197
            $queryStringKey,
198
            $this,
199
            $exceptionMessage
200
        );
201
    }
202
203
    /**
204
     * Exceptions are caught in order to be processed later
@@ 208-218 (lines=11) @@
205
     *
206
     * @throws CommandMappingException If any mapping validation failed
207
     */
208
    public function mustBeDateTime(ServerRequestInterface $request, string $queryStringKey, string $exceptionMessage = null): \DateTime
209
    {
210
        $value = $this->extractValueFromRequestQueryString($request, $queryStringKey);
211
212
        return $this->rawValueValidator->mustBeDateTime(
213
            $value,
214
            $queryStringKey,
215
            $this,
216
            $exceptionMessage
217
        );
218
    }
219
220
    /**
221
     * Exceptions are caught in order to be processed later