Code Duplication    Length = 6-7 lines in 2 locations

src/PlaygroundCore/Service/Country.php 2 locations

@@ 64-70 (lines=7) @@
61
        }
62
        
63
        $fileName = $this->getPath().'/'.$translatedTo.'.php';
64
        if (! file_exists($fileName)) {
65
            $fileName = $this->getCorePath().'/'.$translatedTo.'.php';
66
67
            if (! file_exists($fileName)) {
68
                throw new \InvalidArgumentException("Language $translatedTo not found.");
69
            }
70
        }
71
72
        return include $fileName;
73
    }
@@ 81-86 (lines=6) @@
78
            $translatedTo = $this->serviceLocator->get('translator')->getLocale();
79
        }
80
        $fileName = $this->getPath().'/'.$translatedTo.'.php';
81
        if (! file_exists($fileName)) {
82
            $fileName = $this->getCorePath().'/'.$translatedTo.'.php';
83
            if (! file_exists($fileName)) {
84
                throw new \InvalidArgumentException("Language $translatedTo not found.");
85
            }
86
        }
87
88
        $list = include $fileName;
89
        if (!is_array($list)) {