Code Duplication    Length = 9-13 lines in 2 locations

Examples/Cache.php 1 location

@@ 52-64 (lines=13) @@
49
    /**
50
     * @inheritdoc
51
     */
52
    public function isCached($url)
53
    {
54
        $path = $this->urlToPath($url);
55
        if (!file_exists($path) || filectime($path) + $this->seconds < time()) {
56
            echo "Weather data is NOT cached!\n";
57
58
            return false;
59
        }
60
61
        echo "Weather data is cached!\n";
62
63
        return true;
64
    }
65
66
    /**
67
     * @inheritdoc

tests/ExampleCacheTest.php 1 location

@@ 47-55 (lines=9) @@
44
    /**
45
     * @inheritdoc
46
     */
47
    public function isCached($url)
48
    {
49
        $path = $this->urlToPath($url);
50
        if (!file_exists($path) || filectime($path) + $this->seconds < time()) {
51
            return false;
52
        }
53
54
        return true;
55
    }
56
57
    /**
58
     * @inheritdoc