Add public keyword to methods
[MAILPOET-2413]
This commit is contained in:
@ -16,11 +16,11 @@ use MailPoetVendor\Carbon\Carbon;
|
||||
* @method void remove(SettingEntity $entity)
|
||||
*/
|
||||
class SettingsRepository extends Repository {
|
||||
function findOneByName($name) {
|
||||
public function findOneByName($name) {
|
||||
return $this->doctrine_repository->findOneBy(['name' => $name]);
|
||||
}
|
||||
|
||||
function createOrUpdateByName($name, $value) {
|
||||
public function createOrUpdateByName($name, $value) {
|
||||
// Temporarily use low-level INSERT ... ON DUPLICATE KEY UPDATE query to avoid race conditions
|
||||
// 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.
|
||||
@ -29,7 +29,7 @@ class SettingsRepository extends Repository {
|
||||
$this->entity_manager->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
|
||||
ON DUPLICATE KEY UPDATE value = :value, updated_at = :now
|
||||
", [
|
||||
'name' => $name,
|
||||
'value' => is_array($value) ? serialize($value) : $value,
|
||||
|
Reference in New Issue
Block a user