original_string: public function processBeforeSave(array $row)
      {
          if ($this->getMeta('nested', false)) {
              $nestedNames = $this->getMeta('nestedNames');
              foreach($nestedNames as $nestedName) {
                  if (isset($row[$nestedName])) {
                      foreach($row[$nestedName] as $key => $answer) {
                          $a = array_shift($answer);
                          if (empty($a)) {
                              unset($row[$nestedName][$key]);
                          }
                      }
                  }
              }
          }
  
          if (!isset($row['gto_completion_time']) || $row['gto_completion_time']) {
              $row['gto_completion_time'] = new \MUtil_Date;
          }
  
          $row = parent::processBeforeSave($row);
  
          return $row;
      }
code: public function processBeforeSave(array $row)
      {
          if ($this->getMeta('nested', false)) {
              $nestedNames = $this->getMeta('nestedNames');
              foreach($nestedNames as $nestedName) {
                  if (isset($row[$nestedName])) {
                      foreach($row[$nestedName] as $key => $answer) {
                          $a = array_shift($answer);
                          if (empty($a)) {
                              unset($row[$nestedName][$key]);
                          }
                      }
                  }
              }
          }
  
          if (!isset($row['gto_completion_time']) || $row['gto_completion_time']) {
              $row['gto_completion_time'] = new \MUtil_Date;
          }
  
          $row = parent::processBeforeSave($row);
  
          return $row;
      }
code_tokens: public function processBeforeSave ( array $ row ) { if ( $ this -> getMeta ( 'nested' , false ) ) { $ nestedNames = $ this -> getMeta ( 'nestedNames' ) ; foreach ( $ nestedNames as $ nestedName ) { if ( isset ( $ row [ $ nestedName ] ) ) { foreach ( $ row [ $ nestedName ] as $ key => $ answer ) { $ a = array_shift ( $ answer ) ; if ( empty ( $ a ) ) { unset ( $ row [ $ nestedName ] [ $ key ] ) ; } } } } } if ( ! isset ( $ row [ 'gto_completion_time' ] ) || $ row [ 'gto_completion_time' ] ) { $ row [ 'gto_completion_time' ] = new \ MUtil_Date ; } $ row = parent :: processBeforeSave ( $ row ) ; return $ row ; }
docstring: Helper function that procesess the raw data before a save.
  
  @param array $row Row array containing saved (and maybe not saved data)
  @return array Nested
docstring_tokens: Helper function that procesess the raw data before a save .