Skip to content

Commit

Permalink
Fix codeSniffer errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 committed Jul 4, 2024
1 parent 4d56838 commit 3432958
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion application/forms/ChannelForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public function editChannel(): void
$channel['config'] = json_encode($this->filterConfig($channel['config']));
$storedValues['config'] = json_encode($this->filterConfig($storedValues['config']));

if(! empty(array_diff_assoc($channel, $storedValues))) {
if (! empty(array_diff_assoc($channel, $storedValues))) {
$channel['changed_at'] = time() * 1000;

$this->db->update('channel', $channel, ['id = ?' => $this->channelId]);
Expand Down
6 changes: 4 additions & 2 deletions application/forms/ContactGroupForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ public function editGroup(): void
$toAdd = array_diff($newContacts, $storedContacts);

if (! empty($toDelete)) {
$this->db->update('contactgroup_member',
$this->db->update(
'contactgroup_member',
['changed_at' => $changedAt, 'deleted' => 'y'],
[
'contactgroup_id = ?' => $this->contactgroupId,
Expand Down Expand Up @@ -270,7 +271,8 @@ public function editGroup(): void
}
}
if (! empty($removeDeletedFlagFromIds)) {
$this->db->update('contactgroup_member',
$this->db->update(
'contactgroup_member',
['changed_at' => $changedAt, 'deleted' => 'n'],
[
'contactgroup_id = ?' => $this->contactgroupId,
Expand Down
3 changes: 2 additions & 1 deletion application/forms/MoveRotationForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ protected function onSuccess()
}

// Now insert the rotation at the new priority
$this->db->update('rotation',
$this->db->update(
'rotation',
['priority' => $newPriority, 'changed_at' => $changedAt],
['id = ?' => $rotationId]
);
Expand Down
3 changes: 2 additions & 1 deletion application/forms/RotationConfigForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,8 @@ public function editRotation(int $rotationId): void
if (self::EXPERIMENTAL_OVERRIDES) {
// We only show a single name, even in case of multiple versions of a rotation.
// To avoid confusion, we update all versions upon change of the name
$this->db->update('rotation',
$this->db->update(
'rotation',
['name' => $this->getValue('name'), 'changed_at' => $changedAt],
['schedule_id = ?' => $this->scheduleId, 'priority = ?' => $priority]
);
Expand Down
2 changes: 1 addition & 1 deletion application/forms/SaveEventRuleForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ public function removeRule(int $id): void
);
}

$db->update('rule_escalation', $markAsDeleted + ['position' => null], ['rule_id = ?' => $id]);
$db->update('rule_escalation', $markAsDeleted + ['position' => null], ['rule_id = ?' => $id]);
$db->update('rule', $markAsDeleted, ['id = ?' => $id]);

$db->commitTransaction();
Expand Down
4 changes: 2 additions & 2 deletions library/Notifications/Widget/Timeline/Rotation.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ public function fetchTimeperiodEntries(DateTime $after, DateTime $until): Genera
->filter(Filter::all(
Filter::equal('deleted', 'n'),
Filter::any(
Filter::equal('member.contact.deleted', 'n'),
Filter::equal('member.contactgroup.deleted', 'n')
Filter::equal('member.contact.deleted', 'n'),
Filter::equal('member.contactgroup.deleted', 'n')
),
Filter::any(
Filter::like('rrule', '*'), // It's either a repeating entry
Expand Down

0 comments on commit 3432958

Please sign in to comment.