Code Duplication    Length = 9-9 lines in 2 locations

src/Application.php 2 locations

@@ 445-453 (lines=9) @@
442
     *   $optionDefaultValues in the main() function.
443
     * @return array
444
     */
445
    public function infoCommand($execPath, $composerArgs, $projects, $options)
446
    {
447
        // If 'projects' list is empty, make a list of everything currently installed
448
        if (empty($projects)) {
449
            $projects = FileSystemUtils::allInstalledProjectsInBaseDir($options['base-dir']);
450
            $projects = $this->flipProjectsArray($projects);
451
        }
452
        return $this->generalCommand('info', $execPath, $composerArgs, $projects, $options);
453
    }
454
455
    /**
456
     * Run `composer global update`. Not only do we want to update the
@@ 468-476 (lines=9) @@
465
     *   $optionDefaultValues in the main() function.
466
     * @return array
467
     */
468
    public function updateCommand($execPath, $composerArgs, $projects, $options)
469
    {
470
        // If 'projects' list is empty, make a list of everything currently installed
471
        if (empty($projects)) {
472
            $projects = FileSystemUtils::allInstalledProjectsInBaseDir($options['base-dir']);
473
            $projects = $this->flipProjectsArray($projects);
474
        }
475
        return $this->noProjectArgCommand('update', $execPath, $composerArgs, $projects, $options);
476
    }
477
478
    /**
479
     * Convert from an array of projects to an array where the key is the