Code Duplication    Length = 8-9 lines in 2 locations

src/delivery/cli/fields/PrimitiveField.php 1 location

@@ 18-26 (lines=9) @@
15
     * @param \rtens\domin\Parameter $parameter
16
     * @return bool
17
     */
18
    public function handles(Parameter $parameter) {
19
        return in_array(get_class($parameter->getType()), [
20
            StringType::class,
21
            IntegerType::class,
22
            FloatType::class,
23
            LongType::class,
24
            DoubleType::class
25
        ]);
26
    }
27
28
    /**
29
     * @param Parameter $parameter

src/delivery/web/fields/NumberField.php 1 location

@@ 18-25 (lines=8) @@
15
     * @param Parameter $parameter
16
     * @return bool
17
     */
18
    public function handles(Parameter $parameter) {
19
        return in_array(get_class($parameter->getType()), [
20
            IntegerType::class,
21
            FloatType::class,
22
            LongType::class,
23
            DoubleType::class
24
        ]);
25
    }
26
27
    /**
28
     * @param Parameter $parameter