Code Duplication    Length = 14-14 lines in 2 locations

Assert.php 2 locations

@@ 23-36 (lines=14) @@
20
     * @param float  $value
21
     * @param string $message
22
     */
23
    public static function latitude($value, $message = '')
24
    {
25
        if (!is_float($value)) {
26
            throw new InvalidArgument(
27
                sprintf($message ?: 'Expected a double. Got: %s', self::typeToString($value))
28
            );
29
        }
30
31
        if ($value < -90 || $value > 90) {
32
            throw new InvalidArgument(
33
                sprintf($message ?: 'Latitude should be between -90 and 90. Got: %s', $value)
34
            );
35
        }
36
    }
37
38
    /**
39
     * @param float  $value
@@ 42-55 (lines=14) @@
39
     * @param float  $value
40
     * @param string $message
41
     */
42
    public static function longitude($value, $message = '')
43
    {
44
        if (!is_float($value)) {
45
            throw new InvalidArgument(
46
                sprintf($message ?: 'Expected a doable. Got: %s', self::typeToString($value))
47
            );
48
        }
49
50
        if ($value < -180 || $value > 180) {
51
            throw new InvalidArgument(
52
                sprintf($message ?: 'Latitude should be between -90 and 90. Got: %s', $value)
53
            );
54
        }
55
    }
56
57
    /**
58
     * @param mixed  $value