/**
  * @param string[] $globalOptions
  * @param string[] $options
  * @param CommandConfig $commandConfig
  * @return bool
  */
 private function hasMagicOption($globalOptions = null, $options = null, $commandConfig)
 {
     if ($commandConfig->isMultipleCommandMode()) {
         if ($globalOptions !== null) {
             foreach (['help', 'version'] as $optionName) {
                 if (isset($globalOptions[$optionName])) {
                     return true;
                 }
             }
         }
         if ($options !== null) {
             if (isset($options['help'])) {
                 return true;
             }
         }
     } else {
         if ($options !== null) {
             foreach (['help', 'version'] as $optionName) {
                 if (isset($options[$optionName])) {
                     return true;
                 }
             }
         }
     }
     return false;
 }