@@ -65,7 +65,7 @@ |
||
65 | 65 | foreach ($this->polls as &$poll) { |
66 | 66 | $poll = $this->pollMapper->insert($poll); |
67 | 67 | |
68 | - for ($count=0; $count < 2; $count++) { |
|
68 | + for ($count = 0; $count < 2; $count++) { |
|
69 | 69 | $log = $this->fm->instance('OCA\Polls\Db\Log'); |
70 | 70 | $log->setPollId($poll->getId()); |
71 | 71 | array_push($this->logs, $this->logMapper->insert($log)); |
@@ -65,7 +65,7 @@ |
||
65 | 65 | foreach ($this->polls as &$poll) { |
66 | 66 | $poll = $this->pollMapper->insert($poll); |
67 | 67 | |
68 | - for ($count=0; $count < 2; $count++) { |
|
68 | + for ($count = 0; $count < 2; $count++) { |
|
69 | 69 | $comment = $this->fm->instance('OCA\Polls\Db\Comment'); |
70 | 70 | $comment->setPollId($poll->getId()); |
71 | 71 | array_push($this->comments, $this->commentMapper->insert($comment)); |
@@ -75,8 +75,8 @@ |
||
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
78 | - * testFind |
|
79 | - */ |
|
78 | + * testFind |
|
79 | + */ |
|
80 | 80 | public function testFind() { |
81 | 81 | foreach ($this->comments as $comment) { |
82 | 82 | $this->assertInstanceOf(Comment::class, $this->commentMapper->find($comment->getId())); |
@@ -69,7 +69,7 @@ |
||
69 | 69 | foreach ($this->polls as &$poll) { |
70 | 70 | $poll = $this->pollMapper->insert($poll); |
71 | 71 | |
72 | - for ($count=0; $count < 2; $count++) { |
|
72 | + for ($count = 0; $count < 2; $count++) { |
|
73 | 73 | $subscription = $this->fm->instance('OCA\Polls\Db\Subscription'); |
74 | 74 | $subscription->setPollId($poll->getId()); |
75 | 75 | array_push($this->subscriptions, $this->subscriptionMapper->insert($subscription)); |
@@ -65,7 +65,7 @@ |
||
65 | 65 | foreach ($this->polls as &$poll) { |
66 | 66 | $poll = $this->pollMapper->insert($poll); |
67 | 67 | |
68 | - for ($count=0; $count < 2; $count++) { |
|
68 | + for ($count = 0; $count < 2; $count++) { |
|
69 | 69 | $option = $this->fm->instance('OCA\Polls\Db\Option'); |
70 | 70 | $option->setPollId($poll->getId()); |
71 | 71 | array_push($this->options, $this->optionMapper->insert($option)); |
@@ -75,7 +75,7 @@ |
||
75 | 75 | foreach ($this->polls as &$poll) { |
76 | 76 | $poll = $this->pollMapper->insert($poll); |
77 | 77 | |
78 | - for ($optionsCount=0; $optionsCount < 2; $optionsCount++) { |
|
78 | + for ($optionsCount = 0; $optionsCount < 2; $optionsCount++) { |
|
79 | 79 | $option = $this->fm->instance('OCA\Polls\Db\Option'); |
80 | 80 | $option->setPollId($poll->getId()); |
81 | 81 | array_push($this->options, $this->optionMapper->insert($option)); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | } |
137 | 137 | |
138 | 138 | /** |
139 | - * testUpdate |
|
139 | + * testUpdate |
|
140 | 140 | */ |
141 | 141 | public function testUpdate() { |
142 | 142 | foreach ($this->votes as &$vote) { |
@@ -156,8 +156,8 @@ discard block |
||
156 | 156 | } |
157 | 157 | |
158 | 158 | /** |
159 | - * tearDown |
|
160 | - */ |
|
159 | + * tearDown |
|
160 | + */ |
|
161 | 161 | public function tearDown(): void { |
162 | 162 | parent::tearDown(); |
163 | 163 | foreach ($this->options as $option) { |
@@ -91,7 +91,7 @@ |
||
91 | 91 | * @psalm-return list<array{name: mixed, key: mixed, displayColor: mixed, permissions: mixed}> |
92 | 92 | */ |
93 | 93 | public function getCalendars(): array { |
94 | - $calendars = []; |
|
94 | + $calendars = []; |
|
95 | 95 | foreach ($this->calendars as $calendar) { |
96 | 96 | $calendars[] = [ |
97 | 97 | 'name' => $calendar->getDisplayName(), |
@@ -43,15 +43,15 @@ |
||
43 | 43 | * @package OCA\Polls\Model\Acl |
44 | 44 | */ |
45 | 45 | class Acl implements JsonSerializable { |
46 | - public const PERMISSION_VIEW ='view'; |
|
47 | - public const PERMISSION_EDIT ='edit'; |
|
48 | - public const PERMISSION_DELETE ='delete'; |
|
49 | - public const PERMISSION_COMMENT ='comment'; |
|
50 | - public const PERMISSION_SUBSCRIBE ='subscribe'; |
|
51 | - public const PERMISSION_VOTE ='vote'; |
|
52 | - public const PERMISSION_SEE_RESULTS ='seeResults'; |
|
53 | - public const PERMISSION_SEE_USERNAMES ='seeUserNames'; |
|
54 | - public const PERMISSION_TAKE_OVER ='takeOver'; |
|
46 | + public const PERMISSION_VIEW = 'view'; |
|
47 | + public const PERMISSION_EDIT = 'edit'; |
|
48 | + public const PERMISSION_DELETE = 'delete'; |
|
49 | + public const PERMISSION_COMMENT = 'comment'; |
|
50 | + public const PERMISSION_SUBSCRIBE = 'subscribe'; |
|
51 | + public const PERMISSION_VOTE = 'vote'; |
|
52 | + public const PERMISSION_SEE_RESULTS = 'seeResults'; |
|
53 | + public const PERMISSION_SEE_USERNAMES = 'seeUserNames'; |
|
54 | + public const PERMISSION_TAKE_OVER = 'takeOver'; |
|
55 | 55 | |
56 | 56 | /** @var IUserManager */ |
57 | 57 | private $userManager; |
@@ -57,7 +57,7 @@ |
||
57 | 57 | * Get comments |
58 | 58 | * Read all comments of a poll based on the poll id and return list as array |
59 | 59 | */ |
60 | - public function list(?int $pollId = 0, string $token = ''): array { |
|
60 | + public function list(?int $pollId = 0, string $token = '') : array { |
|
61 | 61 | if ($token) { |
62 | 62 | $this->acl->setToken($token); |
63 | 63 | } else { |
@@ -72,7 +72,7 @@ |
||
72 | 72 | /** |
73 | 73 | * Read all votes of a poll based on the poll id and return list as array |
74 | 74 | */ |
75 | - public function list(?int $pollId = 0, string $token = ''): array { |
|
75 | + public function list(?int $pollId = 0, string $token = '') : array { |
|
76 | 76 | if ($token) { |
77 | 77 | $this->acl->setToken($token); |
78 | 78 | } else { |