original_string: protected function registerMetricRepository()
      {
          $this->app->singleton(MetricRepository::class, function (Container $app) {
              $config = $app->make(ConfigRepository::class);
  
              switch ($config->get('database.default')) {
                  case 'mysql': $repository = new MySqlRepository($config); break;
                  case 'pgsql': $repository = new PgSqlRepository($config); break;
                  case 'sqlite': $repository = new SqliteRepository($config); break;
              }
  
              $dates = $app->make(DateFactory::class);
  
              return new MetricRepository($repository, $dates);
          });
      }
code: protected function registerMetricRepository()
      {
          $this->app->singleton(MetricRepository::class, function (Container $app) {
              $config = $app->make(ConfigRepository::class);
  
              switch ($config->get('database.default')) {
                  case 'mysql': $repository = new MySqlRepository($config); break;
                  case 'pgsql': $repository = new PgSqlRepository($config); break;
                  case 'sqlite': $repository = new SqliteRepository($config); break;
              }
  
              $dates = $app->make(DateFactory::class);
  
              return new MetricRepository($repository, $dates);
          });
      }
code_tokens: protected function registerMetricRepository ( ) { $ this -> app -> singleton ( MetricRepository :: class , function ( Container $ app ) { $ config = $ app -> make ( ConfigRepository :: class ) ; switch ( $ config -> get ( 'database.default' ) ) { case 'mysql' : $ repository = new MySqlRepository ( $ config ) ; break ; case 'pgsql' : $ repository = new PgSqlRepository ( $ config ) ; break ; case 'sqlite' : $ repository = new SqliteRepository ( $ config ) ; break ; } $ dates = $ app -> make ( DateFactory :: class ) ; return new MetricRepository ( $ repository , $ dates ) ; } ) ; }
docstring: Register the metric repository.
  
  @return void
docstring_tokens: Register the metric repository .