Convert variable names to camel case

[MAILPOET-1796]
This commit is contained in:
Jan Jakeš
2020-01-09 15:02:58 +01:00
committed by Jan Jakeš
parent f5da704106
commit 54549ff037
687 changed files with 15890 additions and 15887 deletions

View File

@ -5,23 +5,23 @@ namespace MailPoet\Models;
class StatisticsForms extends Model {
public static $_table = MP_STATISTICS_FORMS_TABLE;
public static function getTotalSignups($form_id = false) {
return self::where('form_id', $form_id)->count();
public static function getTotalSignups($formId = false) {
return self::where('form_id', $formId)->count();
}
public static function record($form_id, $subscriber_id) {
if ($form_id > 0 && $subscriber_id > 0) {
public static function record($formId, $subscriberId) {
if ($formId > 0 && $subscriberId > 0) {
// check if we already have a record for today
$record = self::where('form_id', $form_id)
->where('subscriber_id', $subscriber_id)
$record = self::where('form_id', $formId)
->where('subscriber_id', $subscriberId)
->findOne();
if ($record === false) {
// create a new entry
$record = self::create();
$record->hydrate([
'form_id' => $form_id,
'subscriber_id' => $subscriber_id,
'form_id' => $formId,
'subscriber_id' => $subscriberId,
]);
$record->save();
}