Code Duplication    Length = 10-10 lines in 2 locations

src/Builder.php 2 locations

@@ 37-46 (lines=10) @@
34
     *
35
     * @return array
36
     */
37
    public static function toLanguages()
38
    {
39
        $locales = [];
40
        $translations = DB_Translation::distinct()->select('to_lang')->get();
41
        foreach ($translations as $object) {
42
            array_push($locales, $object->to_lang);
43
        }
44
45
        return $locales;
46
    }
47
48
    /**
49
     * Get the languages from translations has been translated.
@@ 53-62 (lines=10) @@
50
     *
51
     * @return array
52
     */
53
    public static function fromLanguages()
54
    {
55
        $locales = [];
56
        $translations = DB_Translation::distinct()->select('from_lang')->get();
57
        foreach ($translations as $object) {
58
            array_push($locales, $object->from_lang);
59
        }
60
61
        return $locales;
62
    }
63
64
    /**
65
     * Get all the available languages.