original_string: public static function getComposerLocation()
      {
          if (!\function_exists('shell_exec') || stripos(PHP_OS, 'win') === 0) {
              return self::DEFAULT_PATH;
          }
  
          // check for global composer install
          $path = trim(shell_exec('command -v composer'));
  
          // fall back to grav bundled composer
          if (!$path || !preg_match('/(composer|composer\.phar)$/', $path)) {
              $path = self::DEFAULT_PATH;
          }
  
          return $path;
      }
code: public static function getComposerLocation()
      {
          if (!\function_exists('shell_exec') || stripos(PHP_OS, 'win') === 0) {
              return self::DEFAULT_PATH;
          }
  
          // check for global composer install
          $path = trim(shell_exec('command -v composer'));
  
          // fall back to grav bundled composer
          if (!$path || !preg_match('/(composer|composer\.phar)$/', $path)) {
              $path = self::DEFAULT_PATH;
          }
  
          return $path;
      }
code_tokens: public static function getComposerLocation ( ) { if ( ! \ function_exists ( 'shell_exec' ) || stripos ( PHP_OS , 'win' ) === 0 ) { return self :: DEFAULT_PATH ; } // check for global composer install $ path = trim ( shell_exec ( 'command -v composer' ) ) ; // fall back to grav bundled composer if ( ! $ path || ! preg_match ( '/(composer|composer\.phar)$/' , $ path ) ) { $ path = self :: DEFAULT_PATH ; } return $ path ; }
docstring: Returns the location of composer.
  
  @return string
docstring_tokens: Returns the location of composer .