original_string: protected function flattenValues(&$values)
      {
          array_walk($values, function (&$value) {
              if ($this->isOrnamentModel($value)) {
                  $value = $value->getPrimaryKey();
                  if (is_array($value)) {
                      $value = '('.implode(', ', $value).')';
                  }
              }
          });
      }
code: protected function flattenValues(&$values)
      {
          array_walk($values, function (&$value) {
              if ($this->isOrnamentModel($value)) {
                  $value = $value->getPrimaryKey();
                  if (is_array($value)) {
                      $value = '('.implode(', ', $value).')';
                  }
              }
          });
      }
code_tokens: protected function flattenValues ( & $ values ) { array_walk ( $ values , function ( & $ value ) { if ( $ this -> isOrnamentModel ( $ value ) ) { $ value = $ value -> getPrimaryKey ( ) ; if ( is_array ( $ value ) ) { $ value = '(' . implode ( ', ' , $ value ) . ')' ; } } } ) ; }
docstring: Internal helper to "flatten" all values associated with an operation.
  This is mainly useful for being able to store models on foreign keys and
  automatically "flatten" them to the associated key during saving.
  
  @param array &$values The array of values to flatten.
docstring_tokens: Internal helper to flatten all values associated with an operation . This is mainly useful for being able to store models on foreign keys and automatically flatten them to the associated key during saving .