Code Duplication    Length = 9-9 lines in 2 locations

src/Application.php 2 locations

@@ 475-483 (lines=9) @@
472
     *   $optionDefaultValues in the main() function.
473
     * @return array
474
     */
475
    public function infoCommand($execPath, $composerArgs, $projects, $options)
476
    {
477
        // If 'projects' list is empty, make a list of everything currently installed
478
        if (empty($projects)) {
479
            $projects = FileSystemUtils::allInstalledProjectsInBaseDir($options['base-dir']);
480
            $projects = $this->flipProjectsArray($projects);
481
        }
482
        return $this->generalCommand('info', $execPath, $composerArgs, $projects, $options);
483
    }
484
485
    /**
486
     * Run `composer global update`. Not only do we want to update the
@@ 498-506 (lines=9) @@
495
     *   $optionDefaultValues in the main() function.
496
     * @return array
497
     */
498
    public function updateCommand($execPath, $composerArgs, $projects, $options)
499
    {
500
        // If 'projects' list is empty, make a list of everything currently installed
501
        if (empty($projects)) {
502
            $projects = FileSystemUtils::allInstalledProjectsInBaseDir($options['base-dir']);
503
            $projects = $this->flipProjectsArray($projects);
504
        }
505
        return $this->noProjectArgCommand('update', $execPath, $composerArgs, $projects, $options);
506
    }
507
508
    /**
509
     * Convert from an array of projects to an array where the key is the