original_string: protected function fixCommonFields(array & $record, $unsetIdField = true)
      {
          if ($unsetIdField) {
              unset($record['id']);
          }
          if (isset($record['last_modified_by_id'])) {
              unset($record['last_modified_by_id']);
          }
          if (isset($record['created_by_id'])) {
              $record['created_by_id'] = Session::getCurrentUserId();
          }
      }
code: protected function fixCommonFields(array & $record, $unsetIdField = true)
      {
          if ($unsetIdField) {
              unset($record['id']);
          }
          if (isset($record['last_modified_by_id'])) {
              unset($record['last_modified_by_id']);
          }
          if (isset($record['created_by_id'])) {
              $record['created_by_id'] = Session::getCurrentUserId();
          }
      }
code_tokens: protected function fixCommonFields ( array & $ record , $ unsetIdField = true ) { if ( $ unsetIdField ) { unset ( $ record [ 'id' ] ) ; } if ( isset ( $ record [ 'last_modified_by_id' ] ) ) { unset ( $ record [ 'last_modified_by_id' ] ) ; } if ( isset ( $ record [ 'created_by_id' ] ) ) { $ record [ 'created_by_id' ] = Session :: getCurrentUserId ( ) ; } }
docstring: Fix some common fields to make record ready for
  inserting into db table.
  
  @param array $record
  @param bool  $unsetIdField
docstring_tokens: Fix some common fields to make record ready for inserting into db table .