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;
    }
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;
    }
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 ; }
Returns the location of composer.

@return string
Returns the location of composer .