original_string: protected function resolveNames(array $input)
      {
          $out = [];
          foreach ($input as $info) {
              $name = $info['name'];
              $addLong = $name !== $info['fullName'];
  
              // If the short name has been used, use the full name.
              // This allows app shells to have name preference.
              // and app shells to overwrite core shells.
              if ($this->has($name) && $addLong) {
                  $name = $info['fullName'];
              }
  
              $out[$name] = $info['class'];
              if ($addLong) {
                  $out[$info['fullName']] = $info['class'];
              }
          }
  
          return $out;
      }
code: protected function resolveNames(array $input)
      {
          $out = [];
          foreach ($input as $info) {
              $name = $info['name'];
              $addLong = $name !== $info['fullName'];
  
              // If the short name has been used, use the full name.
              // This allows app shells to have name preference.
              // and app shells to overwrite core shells.
              if ($this->has($name) && $addLong) {
                  $name = $info['fullName'];
              }
  
              $out[$name] = $info['class'];
              if ($addLong) {
                  $out[$info['fullName']] = $info['class'];
              }
          }
  
          return $out;
      }
code_tokens: protected function resolveNames ( array $ input ) { $ out = [ ] ; foreach ( $ input as $ info ) { $ name = $ info [ 'name' ] ; $ addLong = $ name !== $ info [ 'fullName' ] ; // If the short name has been used, use the full name. // This allows app shells to have name preference. // and app shells to overwrite core shells. if ( $ this -> has ( $ name ) && $ addLong ) { $ name = $ info [ 'fullName' ] ; } $ out [ $ name ] = $ info [ 'class' ] ; if ( $ addLong ) { $ out [ $ info [ 'fullName' ] ] = $ info [ 'class' ] ; } } return $ out ; }
docstring: Resolve names based on existing commands
  
  @param array $input The results of a CommandScanner operation.
  @return string[] A flat map of command names => class names.
docstring_tokens: Resolve names based on existing commands