original_string: public static function getInstance($class = null)
      {
          static $instance = [];
          if (!empty($class)) {
              if (!$instance || strtolower($class) !== strtolower(get_class($instance[0]))) {
                  $instance[0] = new $class();
              }
          }
          if (!$instance) {
              $instance[0] = new Debugger();
          }
  
          return $instance[0];
      }
code: public static function getInstance($class = null)
      {
          static $instance = [];
          if (!empty($class)) {
              if (!$instance || strtolower($class) !== strtolower(get_class($instance[0]))) {
                  $instance[0] = new $class();
              }
          }
          if (!$instance) {
              $instance[0] = new Debugger();
          }
  
          return $instance[0];
      }
code_tokens: public static function getInstance ( $ class = null ) { static $ instance = [ ] ; if ( ! empty ( $ class ) ) { if ( ! $ instance || strtolower ( $ class ) !== strtolower ( get_class ( $ instance [ 0 ] ) ) ) { $ instance [ 0 ] = new $ class ( ) ; } } if ( ! $ instance ) { $ instance [ 0 ] = new Debugger ( ) ; } return $ instance [ 0 ] ; }
docstring: Returns a reference to the Debugger singleton object instance.
  
  @param string|null $class Class name.
  @return \Cake\Error\Debugger
docstring_tokens: Returns a reference to the Debugger singleton object instance .