Code Duplication    Length = 5-7 lines in 2 locations

src/Sensorario/Resources/Validators/Validators/MandatoryConditional.php 2 locations

@@ 27-33 (lines=7) @@
24
                $name = $value['when']['property'];
25
                $value = $value['when']['has_value'];
26
27
                if (is_array($value)) {
28
                    foreach ($value as $value) {
29
                        if ($resource->get($name) === $value && $resource->hasNotProperty($key)) {
30
                            static::buildException($value, $key);
31
                        }
32
                    }
33
                }
34
35
                if (!is_array($value)) {
36
                    if ($resource->get($name) === $value && $resource->hasNotProperty($key)) {
@@ 35-39 (lines=5) @@
32
                    }
33
                }
34
35
                if (!is_array($value)) {
36
                    if ($resource->get($name) === $value && $resource->hasNotProperty($key)) {
37
                        static::exceptionMessage($name, $value, $key);
38
                    }
39
                }
40
            }
41
        }
42
    }