Convert variable names to camel case
[MAILPOET-1796]
This commit is contained in:
@ -17,7 +17,7 @@ use MailPoetVendor\Carbon\Carbon;
|
||||
*/
|
||||
class SettingsRepository extends Repository {
|
||||
public function findOneByName($name) {
|
||||
return $this->doctrine_repository->findOneBy(['name' => $name]);
|
||||
return $this->doctrineRepository->findOneBy(['name' => $name]);
|
||||
}
|
||||
|
||||
public function createOrUpdateByName($name, $value) {
|
||||
@ -25,8 +25,8 @@ class SettingsRepository extends Repository {
|
||||
// between entity fetch and creation with multiple concurrent requests. This will be replaced
|
||||
// by a code solving atomicity of create-or-update on entity (ORM) level in a follow-up ticket.
|
||||
$now = Carbon::createFromTimestamp(WPFunctions::get()->currentTime('timestamp'));
|
||||
$table_name = $this->entity_manager->getClassMetadata(SettingEntity::class)->getTableName();
|
||||
$this->entity_manager->getConnection()->executeUpdate("
|
||||
$tableName = $this->entityManager->getClassMetadata(SettingEntity::class)->getTableName();
|
||||
$this->entityManager->getConnection()->executeUpdate("
|
||||
INSERT INTO $table_name (name, value, created_at, updated_at)
|
||||
VALUES (:name, :value, :now, :now)
|
||||
ON DUPLICATE KEY UPDATE value = :value, updated_at = :now
|
||||
@ -35,7 +35,7 @@ class SettingsRepository extends Repository {
|
||||
'value' => is_array($value) ? serialize($value) : $value,
|
||||
'now' => $now,
|
||||
]);
|
||||
$this->entity_manager->clear(SettingEntity::class);
|
||||
$this->entityManager->clear(SettingEntity::class);
|
||||
}
|
||||
|
||||
protected function getEntityClassName() {
|
||||
|
Reference in New Issue
Block a user