original_string: public function values($data)
      {
          if ($this->_type !== 'insert') {
              throw new Exception(
                  'You cannot add values before defining columns to use.'
              );
          }
          if (empty($this->_parts['insert'])) {
              throw new Exception(
                  'You cannot add values before defining columns to use.'
              );
          }
  
          $this->_dirty();
          if ($data instanceof ValuesExpression) {
              $this->_parts['values'] = $data;
  
              return $this;
          }
  
          $this->_parts['values']->add($data);
  
          return $this;
      }
code: public function values($data)
      {
          if ($this->_type !== 'insert') {
              throw new Exception(
                  'You cannot add values before defining columns to use.'
              );
          }
          if (empty($this->_parts['insert'])) {
              throw new Exception(
                  'You cannot add values before defining columns to use.'
              );
          }
  
          $this->_dirty();
          if ($data instanceof ValuesExpression) {
              $this->_parts['values'] = $data;
  
              return $this;
          }
  
          $this->_parts['values']->add($data);
  
          return $this;
      }
code_tokens: public function values ( $ data ) { if ( $ this -> _type !== 'insert' ) { throw new Exception ( 'You cannot add values before defining columns to use.' ) ; } if ( empty ( $ this -> _parts [ 'insert' ] ) ) { throw new Exception ( 'You cannot add values before defining columns to use.' ) ; } $ this -> _dirty ( ) ; if ( $ data instanceof ValuesExpression ) { $ this -> _parts [ 'values' ] = $ data ; return $ this ; } $ this -> _parts [ 'values' ] -> add ( $ data ) ; return $ this ; }
docstring: Set the values for an insert query.
  
  Multi inserts can be performed by calling values() more than one time,
  or by providing an array of value sets. Additionally $data can be a Query
  instance to insert data from another SELECT statement.
  
  @param array|\Cake\Database\Query $data The data to insert.
  @return $this
  @throws \Cake\Database\Exception if you try to set values before declaring columns.
  Or if you try to set values on non-insert queries.
docstring_tokens: Set the values for an insert query .