Skip to content
Permalink
Browse files

Fixed some typos, CS errors and refactoring repetitive code

  • Loading branch information...
lorenzo committed Jan 27, 2014
1 parent fd6a5db commit 8db0595b68339bb31f075fec504184c8cd4fde03
@@ -164,7 +164,7 @@ public function locale($locale = null) {
}
/**
* Custom finder method used to retrieve all translations for he found records.
* Custom finder method used to retrieve all translations for the found records.
* Fetched translations can be filtered by locale by passing the `locales` key
* in the options array.
*
@@ -219,13 +219,11 @@ protected function _rowMapper($results, $locale) {
continue;
}
$row->set([
$field => $translation->get('content'),
'_locale' => $locale
], $options);
$row->set($field, $translation->get('content'), $options);
unset($row[$name]);
}
$row->set('_locale', $locale, $options);
$row->clean();
return $row;
});
@@ -35,16 +35,22 @@ class Query extends DatabaseQuery {
/**
* Indicates that the operation should append to the list
*
* @var integer
*/
const APPEND = 0;
/**
* Indicates that the operation should prepend to the list
*
* @var integer
*/
const PREPEND = 1;
/**
* Indicates that the operation should overwrite the list
*
* @var boolean
*/
const OVERWRITE = true;
@@ -43,7 +43,6 @@ public function tearDown() {
TableRegistry::clear();
}
/**
* Returns an array with all the translations found for a set of records
*

0 comments on commit 8db0595

Please sign in to comment.
You can’t perform that action at this time.