Code Duplication    Length = 6-7 lines in 2 locations

src/PlaygroundCore/Service/Country.php 2 locations

@@ 53-59 (lines=7) @@
50
        }
51
        
52
        $fileName = $this->getPath().'/'.$translatedTo.'.php';
53
        if (! file_exists($fileName)) {
54
            $fileName = $this->getCorePath().'/'.$translatedTo.'.php';
55
56
            if (! file_exists($fileName)) {
57
                throw new \InvalidArgumentException("Language $translatedTo not found.");
58
            }
59
        }
60
61
        return include $fileName;
62
    }
@@ 70-75 (lines=6) @@
67
            $translatedTo = $this->getServiceManager()->get('translator')->getLocale();
68
        }
69
        $fileName = $this->getPath().'/'.$translatedTo.'.php';
70
        if (! file_exists($fileName)) {
71
            $fileName = $this->getCorePath().'/'.$translatedTo.'.php';
72
            if (! file_exists($fileName)) {
73
                throw new \InvalidArgumentException("Language $translatedTo not found.");
74
            }
75
        }
76
77
        $list = include $fileName;
78
        if (!is_array($list)) {