original_string: public function format($type)
      {
          switch (strtolower($type)) {
  
              case 'rgba':
                  return $this->getRgba();
  
              case 'hex':
                  return $this->getHex('#');
  
              case 'int':
              case 'integer':
                  return $this->getInt();
  
              case 'array':
                  return $this->getArray();
  
              case 'obj':
              case 'object':
                  return $this;
  
              default:
                  throw new \Intervention\Image\Exception\NotSupportedException(
                      "Color format ({$type}) is not supported."
                  );
          }
      }
code: public function format($type)
      {
          switch (strtolower($type)) {
  
              case 'rgba':
                  return $this->getRgba();
  
              case 'hex':
                  return $this->getHex('#');
  
              case 'int':
              case 'integer':
                  return $this->getInt();
  
              case 'array':
                  return $this->getArray();
  
              case 'obj':
              case 'object':
                  return $this;
  
              default:
                  throw new \Intervention\Image\Exception\NotSupportedException(
                      "Color format ({$type}) is not supported."
                  );
          }
      }
code_tokens: public function format ( $ type ) { switch ( strtolower ( $ type ) ) { case 'rgba' : return $ this -> getRgba ( ) ; case 'hex' : return $ this -> getHex ( '#' ) ; case 'int' : case 'integer' : return $ this -> getInt ( ) ; case 'array' : return $ this -> getArray ( ) ; case 'obj' : case 'object' : return $ this ; default : throw new \ Intervention \ Image \ Exception \ NotSupportedException ( "Color format ({$type}) is not supported." ) ; } }
docstring: Formats current color instance into given format
  
  @param  string $type
  @return mixed
docstring_tokens: Formats current color instance into given format