Code Duplication    Length = 10-10 lines in 2 locations

src/Builder.php 2 locations

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