original_string: protected function getGauges($config)
      {
          if (null === $this->gauges) {
              $this->gauges = array();
  
              foreach ($config as $path => $details) {
                  $className = $details['class'];
                  if (class_exists($className)) {
                      $reflection = new \ReflectionClass($className);
  
                      if ($reflection->getConstructor()) {
                          $this->gauges[$path] = $reflection->newInstanceArgs(
                              $details['arguments'] ? $details['arguments'] : array());
                      }
                      else {
                          $this->gauges[$path] = $reflection->newInstance();
                      }
                  }
                  else {
                      throw new \RuntimeException(sprintf(
                          'Class does not exists %s'
                      ), $className);
                  }
              }
  
              if (empty($this->gauges)) {
                  throw new \RuntimeException(
                      sprintf('No gauges found for provided string %s', $input->getArgument('gauges-class'))
                  );
              }
          }
  
          return $this->gauges;
      }
code: protected function getGauges($config)
      {
          if (null === $this->gauges) {
              $this->gauges = array();
  
              foreach ($config as $path => $details) {
                  $className = $details['class'];
                  if (class_exists($className)) {
                      $reflection = new \ReflectionClass($className);
  
                      if ($reflection->getConstructor()) {
                          $this->gauges[$path] = $reflection->newInstanceArgs(
                              $details['arguments'] ? $details['arguments'] : array());
                      }
                      else {
                          $this->gauges[$path] = $reflection->newInstance();
                      }
                  }
                  else {
                      throw new \RuntimeException(sprintf(
                          'Class does not exists %s'
                      ), $className);
                  }
              }
  
              if (empty($this->gauges)) {
                  throw new \RuntimeException(
                      sprintf('No gauges found for provided string %s', $input->getArgument('gauges-class'))
                  );
              }
          }
  
          return $this->gauges;
      }
code_tokens: protected function getGauges ( $ config ) { if ( null === $ this -> gauges ) { $ this -> gauges = array ( ) ; foreach ( $ config as $ path => $ details ) { $ className = $ details [ 'class' ] ; if ( class_exists ( $ className ) ) { $ reflection = new \ ReflectionClass ( $ className ) ; if ( $ reflection -> getConstructor ( ) ) { $ this -> gauges [ $ path ] = $ reflection -> newInstanceArgs ( $ details [ 'arguments' ] ? $ details [ 'arguments' ] : array ( ) ) ; } else { $ this -> gauges [ $ path ] = $ reflection -> newInstance ( ) ; } } else { throw new \ RuntimeException ( sprintf ( 'Class does not exists %s' ) , $ className ) ; } } if ( empty ( $ this -> gauges ) ) { throw new \ RuntimeException ( sprintf ( 'No gauges found for provided string %s' , $ input -> getArgument ( 'gauges-class' ) ) ) ; } } return $ this -> gauges ; }
docstring: Instantiate selected gauges
  
  @param array $config
  @return GaugeInterface[] array
docstring_tokens: Instantiate selected gauges