original_string: public function transformRow($row, $nestKey, $joined, $targetProperty = null)
      {
          $sourceAlias = $this->getSource()->getAlias();
          $nestKey = $nestKey ?: $this->_name;
          $targetProperty = $targetProperty ?: $this->getProperty();
          if (isset($row[$sourceAlias])) {
              $row[$sourceAlias][$targetProperty] = $row[$nestKey];
              unset($row[$nestKey]);
          }
  
          return $row;
      }
code: public function transformRow($row, $nestKey, $joined, $targetProperty = null)
      {
          $sourceAlias = $this->getSource()->getAlias();
          $nestKey = $nestKey ?: $this->_name;
          $targetProperty = $targetProperty ?: $this->getProperty();
          if (isset($row[$sourceAlias])) {
              $row[$sourceAlias][$targetProperty] = $row[$nestKey];
              unset($row[$nestKey]);
          }
  
          return $row;
      }
code_tokens: public function transformRow ( $ row , $ nestKey , $ joined , $ targetProperty = null ) { $ sourceAlias = $ this -> getSource ( ) -> getAlias ( ) ; $ nestKey = $ nestKey ? : $ this -> _name ; $ targetProperty = $ targetProperty ? : $ this -> getProperty ( ) ; if ( isset ( $ row [ $ sourceAlias ] ) ) { $ row [ $ sourceAlias ] [ $ targetProperty ] = $ row [ $ nestKey ] ; unset ( $ row [ $ nestKey ] ) ; } return $ row ; }
docstring: Correctly nests a result row associated values into the correct array keys inside the
  source results.
  
  @param array $row The row to transform
  @param string $nestKey The array key under which the results for this association
  should be found
  @param bool $joined Whether or not the row is a result of a direct join
  with this association
  @param string|null $targetProperty The property name in the source results where the association
  data shuld be nested in. Will use the default one if not provided.
  @return array
docstring_tokens: Correctly nests a result row associated values into the correct array keys inside the source results .