original_string: public function toggle($flag, $name)
      {
          switch ($flag) {
              case 'on':
                  $onoff = true;
                  break;
              case 'off':
                  $onoff = false;
                  break;
              default:
                  throw new \InvalidArgumentException("Flag must be 'on' or 'off'");
          }
  
          switch ($name) {
              case 'debug':
                  $this->debug = $onoff;
                  break;
              case 'info':
                  $this->info = $onoff;
                  break;
              case 'notice':
                  $this->notice = $onoff;
                  break;
              case 'warn':
                  $this->warn = $onoff;
                  break;
              case 'error':
                  $this->error = $onoff;
                  break;
              case 'critical':
                  $this->critical = $onoff;
                  break;
              case 'alert':
                  $this->alert = $onoff;
                  break;
              case 'emergency':
                  $this->emergency = $onoff;
                  break;
              default:
                  throw new \InvalidArgumentException("Name must be on (debug|info|notice|warn|error|critical|alert|emergency)");
          }
      }
code: public function toggle($flag, $name)
      {
          switch ($flag) {
              case 'on':
                  $onoff = true;
                  break;
              case 'off':
                  $onoff = false;
                  break;
              default:
                  throw new \InvalidArgumentException("Flag must be 'on' or 'off'");
          }
  
          switch ($name) {
              case 'debug':
                  $this->debug = $onoff;
                  break;
              case 'info':
                  $this->info = $onoff;
                  break;
              case 'notice':
                  $this->notice = $onoff;
                  break;
              case 'warn':
                  $this->warn = $onoff;
                  break;
              case 'error':
                  $this->error = $onoff;
                  break;
              case 'critical':
                  $this->critical = $onoff;
                  break;
              case 'alert':
                  $this->alert = $onoff;
                  break;
              case 'emergency':
                  $this->emergency = $onoff;
                  break;
              default:
                  throw new \InvalidArgumentException("Name must be on (debug|info|notice|warn|error|critical|alert|emergency)");
          }
      }
code_tokens: public function toggle ( $ flag , $ name ) { switch ( $ flag ) { case 'on' : $ onoff = true ; break ; case 'off' : $ onoff = false ; break ; default : throw new \ InvalidArgumentException ( "Flag must be 'on' or 'off'" ) ; } switch ( $ name ) { case 'debug' : $ this -> debug = $ onoff ; break ; case 'info' : $ this -> info = $ onoff ; break ; case 'notice' : $ this -> notice = $ onoff ; break ; case 'warn' : $ this -> warn = $ onoff ; break ; case 'error' : $ this -> error = $ onoff ; break ; case 'critical' : $ this -> critical = $ onoff ; break ; case 'alert' : $ this -> alert = $ onoff ; break ; case 'emergency' : $ this -> emergency = $ onoff ; break ; default : throw new \ InvalidArgumentException ( "Name must be on (debug|info|notice|warn|error|critical|alert|emergency)" ) ; } }
docstring: Sets the named attribute to true or false
  
  @param string $flag (on|off)
  @param string $name (debug|info|notice|warn|error|critical|alert|emergency)
  @throws InvalidArgumentException on badly formated $flag or $name
docstring_tokens: Sets the named attribute to true or false