Skip to content

Commit

Permalink
Merge pull request #2996 from nextcloud/enh/maintenance
Browse files Browse the repository at this point in the history
code maintenance
  • Loading branch information
dartcafe authored Jul 22, 2023
2 parents 8a98ecb + 6d5d120 commit a475cd8
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lib/Event/BaseEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ abstract class BaseEvent extends Event {
protected array $activitySubjectParams = [];
protected Poll $poll;
protected bool $log = true;
private IUserSession $userSession;
protected IUserSession $userSession;
protected UserService $userService;

public function __construct(
Expand Down
4 changes: 3 additions & 1 deletion lib/Event/CommentAddEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
use OCA\Polls\Db\Comment;

class CommentAddEvent extends CommentEvent {
public function __construct(Comment $comment) {
public function __construct(
protected Comment $comment
) {
parent::__construct($comment);
$this->activitySubject = self::ADD;
}
Expand Down
4 changes: 3 additions & 1 deletion lib/Event/CommentDeleteEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
use OCA\Polls\Db\Comment;

class CommentDeleteEvent extends CommentEvent {
public function __construct(Comment $comment) {
public function __construct(
protected Comment $comment
) {
parent::__construct($comment);
$this->log = false;
$this->activitySubject = self::DELETE;
Expand Down
2 changes: 1 addition & 1 deletion lib/Event/CommentEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ abstract class CommentEvent extends BaseEvent {
public const DELETE = 'comment_delete';

public function __construct(
private Comment $comment,
protected Comment $comment,
) {
parent::__construct($comment);
$this->activityObject = 'poll';
Expand Down
2 changes: 1 addition & 1 deletion lib/Event/OptionConfirmedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

class OptionConfirmedEvent extends OptionEvent {
public function __construct(
Option $option
protected Option $option
) {
parent::__construct($option);
$this->activitySubject = self::CONFIRM;
Expand Down
2 changes: 1 addition & 1 deletion lib/Event/OptionCreatedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

class OptionCreatedEvent extends OptionEvent {
public function __construct(
Option $option
protected Option $option,
) {
parent::__construct($option);
$this->activitySubject = self::ADD;
Expand Down
2 changes: 1 addition & 1 deletion lib/Event/OptionDeletedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

class OptionDeletedEvent extends OptionEvent {
public function __construct(
Option $option
protected Option $option
) {
parent::__construct($option);
$this->activitySubject = self::DELETE;
Expand Down
2 changes: 1 addition & 1 deletion lib/Event/OptionEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ abstract class OptionEvent extends BaseEvent {
public const DELETE = 'option_delete';

public function __construct(
private Option $option
protected Option $option,
) {
parent::__construct($option);
$this->activityObject = 'poll';
Expand Down
2 changes: 1 addition & 1 deletion lib/Event/OptionUnconfirmedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

class OptionUnconfirmedEvent extends OptionEvent {
public function __construct(
Option $option
protected Option $option
) {
parent::__construct($option);
$this->activitySubject = self::UNCONFIRM;
Expand Down
2 changes: 1 addition & 1 deletion lib/Event/OptionUpdatedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

class OptionUpdatedEvent extends OptionEvent {
public function __construct(
Option $option
protected Option $option
) {
parent::__construct($option);
$this->activitySubject = self::UPDATE;
Expand Down
2 changes: 1 addition & 1 deletion lib/Event/PollArchivedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

class PollArchivedEvent extends PollEvent {
public function __construct(
Poll $poll
protected Poll $poll
) {
parent::__construct($poll);
$this->activitySubject = self::DELETE;
Expand Down
2 changes: 1 addition & 1 deletion lib/Event/PollCreatedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

class PollCreatedEvent extends PollEvent {
public function __construct(
Poll $poll
protected Poll $poll
) {
parent::__construct($poll);
$this->activitySubject = self::ADD;
Expand Down
2 changes: 1 addition & 1 deletion lib/Event/PollDeletedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

class PollDeletedEvent extends PollEvent {
public function __construct(
Poll $poll
protected Poll $poll
) {
parent::__construct($poll);
$this->activitySubject = self::DELETE;
Expand Down

0 comments on commit a475cd8

Please sign in to comment.