Code Duplication    Length = 10-10 lines in 2 locations

src/Builder.php 2 locations

@@ 94-103 (lines=10) @@
91
     *
92
     * @return array
93
     */
94
    public static function toLanguages()
95
    {
96
        $locales = [];
97
        $translations = DB_Translation::distinct()->select('to_lang')->get();
98
        foreach ($translations as $object) {
99
            array_push($locales, $object->to_lang);
100
        }
101
102
        return $locales;
103
    }
104
105
    /**
106
     * Get the languages from translations has been translated.
@@ 110-119 (lines=10) @@
107
     *
108
     * @return array
109
     */
110
    public static function fromLanguages()
111
    {
112
        $locales = [];
113
        $translations = DB_Translation::distinct()->select('from_lang')->get();
114
        foreach ($translations as $object) {
115
            array_push($locales, $object->from_lang);
116
        }
117
118
        return $locales;
119
    }
120
121
    /**
122
     * Get all the available languages.