original_string: protected static function fetch()
      {
          $command = array(
              'LINUX' => new Commands\Linux(),
              'MAC' => new Commands\Mac(),
              'WIN' => new Commands\Windows()
          );
  
          $instance = 'No valid desktop notifier found.';
  
          if ($command['WIN']->isAvailable()) {
              $instance = $command['WIN'];
          } elseif($command['LINUX']->isAvailable()) {
              $instance = $command['LINUX'];
          } elseif($command['MAC']->isAvailable()) {
              $instance = $command['MAC'];
          }
  
          if (is_string($instance)) {
              throw new \RuntimeException($instance);
          }
  
          return $instance;
      }
code: protected static function fetch()
      {
          $command = array(
              'LINUX' => new Commands\Linux(),
              'MAC' => new Commands\Mac(),
              'WIN' => new Commands\Windows()
          );
  
          $instance = 'No valid desktop notifier found.';
  
          if ($command['WIN']->isAvailable()) {
              $instance = $command['WIN'];
          } elseif($command['LINUX']->isAvailable()) {
              $instance = $command['LINUX'];
          } elseif($command['MAC']->isAvailable()) {
              $instance = $command['MAC'];
          }
  
          if (is_string($instance)) {
              throw new \RuntimeException($instance);
          }
  
          return $instance;
      }
code_tokens: protected static function fetch ( ) { $ command = array ( 'LINUX' => new Commands \ Linux ( ) , 'MAC' => new Commands \ Mac ( ) , 'WIN' => new Commands \ Windows ( ) ) ; $ instance = 'No valid desktop notifier found.' ; if ( $ command [ 'WIN' ] -> isAvailable ( ) ) { $ instance = $ command [ 'WIN' ] ; } elseif ( $ command [ 'LINUX' ] -> isAvailable ( ) ) { $ instance = $ command [ 'LINUX' ] ; } elseif ( $ command [ 'MAC' ] -> isAvailable ( ) ) { $ instance = $ command [ 'MAC' ] ; } if ( is_string ( $ instance ) ) { throw new \ RuntimeException ( $ instance ) ; } return $ instance ; }
docstring: Fetches an instance by checking for ability.
  
  @return Commands\Linux|Commands\Mac|Commands\Windows
  
  @throws \RuntimeException
docstring_tokens: Fetches an instance by checking for ability .