Code Duplication    Length = 12-12 lines in 2 locations

src/Ffcms/Core/Traits/ModelValidator.php 2 locations

@@ 223-234 (lines=12) @@
220
     * @param string $param
221
     * @return string|null
222
     */
223
    public function getInput($param)
224
    {
225
        $objName = $this->getFormName();
226
        if (Str::contains('.', $param)) {
227
            foreach (explode('.', $param) as $item) {
228
                $objName .= '[' . $item . ']';
229
            }
230
        } else {
231
            $objName .= '[' . $param . ']';
232
        }
233
        return App::$Request->get($objName, null, true);
234
    }
235
236
    /**
237
     * Get uploaded file from user via POST request
@@ 241-252 (lines=12) @@
238
     * @param string $param
239
     * @return \Symfony\Component\HttpFoundation\File\UploadedFile|null
240
     */
241
    public function getFile($param)
242
    {
243
        $fileName = $this->getFormName();
244
        if (Str::contains('.', $param)) {
245
            foreach (explode('.', $param) as $obj) {
246
                $fileName .= '[' . $obj . ']';
247
            }
248
        } else {
249
            $fileName .= '[' . $param . ']';
250
        }
251
        return App::$Request->files->get($fileName, null, true);
252
    }
253
254
    /**
255
     * Set special type for input data. Example: ['avatar' => 'file', 'login' => 'input']