Code Duplication    Length = 6-7 lines in 2 locations

src/Openl10n/Cli/Command/PullCommand.php 1 location

@@ 65-70 (lines=6) @@
62
        $localesToPull = array_unique($localesToPull);
63
64
        // Process locales special cases
65
        if (in_array('all', $localesToPull)) {
66
            $localesToPull = $projectLocales;
67
        } elseif (false !== $key = array_search('default', $localesToPull)) {
68
            unset($localesToPull[$key]);
69
            $localesToPull[] = $defaultLocale;
70
        }
71
72
        // Deduplicate values
73
        $localesToPull = array_unique($localesToPull);

src/Openl10n/Cli/Command/PushCommand.php 1 location

@@ 68-74 (lines=7) @@
65
        $pushAllLocale = false;
66
67
        // Process locales special cases
68
        if (in_array('all', $localesToPush)) {
69
            $localesToPush = $projectLocales;
70
            $pushAllLocale = true;
71
        } elseif (false !== $key = array_search('default', $localesToPush)) {
72
            unset($localesToPush[$key]);
73
            $localesToPush[] = $defaultLocale;
74
        }
75
76
        // Deduplicate values
77
        $localesToPush = array_unique($localesToPush);