Passed
Pull Request — master (#311)
by Morris
04:10
created
tests/Unit/Factories/CommentFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
  */
29 29
 $fm->define('OCA\Polls\Db\Comment')->setDefinitions([
30 30
 	'userId' => Faker::firstNameMale(),
31
-	'dt' => function () {
31
+	'dt' => function() {
32 32
 		$date = new DateTime('today');
33 33
 		return $date->format('Y-m-d H:i:s');
34 34
 	},
Please login to merge, or discard this patch.
tests/Unit/Factories/ParticipationFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
  */
29 29
 $fm->define('OCA\Polls\Db\Participation')->setDefinitions([
30 30
 	'userId' => Faker::firstNameMale(),
31
-	'dt' => function () {
31
+	'dt' => function() {
32 32
 		$date = new DateTime('today');
33 33
 		return $date->format('Y-m-d H:i:s');
34 34
 	},
Please login to merge, or discard this patch.
tests/Unit/Factories/DateFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
  * General factory for the date model.
26 26
  */
27 27
 $fm->define('OCA\Polls\Db\Date')->setDefinitions([
28
-	'dt' => function () {
28
+	'dt' => function() {
29 29
 		$date = new DateTime('today');
30 30
 		return $date->format('Y-m-d H:i:s');
31 31
 	}
Please login to merge, or discard this patch.
tests/Unit/Factories/EventFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,12 +31,12 @@
 block discarded – undo
31 31
 	'title' => Faker::sentence(10),
32 32
 	'description' => Faker::text(256),
33 33
 	'owner' => Faker::firstNameMale(),
34
-	'created' => function () {
34
+	'created' => function() {
35 35
 		$date = new DateTime('today');
36 36
 		return $date->format('Y-m-d H:i:s');
37 37
 	},
38 38
 	'access' => 'registered',
39
-	'expire' => function () {
39
+	'expire' => function() {
40 40
 		$date = new DateTime('tomorrow');
41 41
 		return $date->format('Y-m-d H:i:s');
42 42
 	},
Please login to merge, or discard this patch.
lib/AppInfo/Application.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 		/**
50 50
 		 * Controllers
51 51
 		 */
52
-		$container->registerService('PageController', function (IContainer $c) {
52
+		$container->registerService('PageController', function(IContainer $c) {
53 53
 			return new PageController(
54 54
 				$c->query('AppName'),
55 55
 				$c->query('Request'),
@@ -70,63 +70,63 @@  discard block
 block discarded – undo
70 70
 			);
71 71
 		});
72 72
 
73
-		$container->registerService('UserManager', function (IContainer $c) {
73
+		$container->registerService('UserManager', function(IContainer $c) {
74 74
 			return $c->query('ServerContainer')->getUserManager();
75 75
 		});
76 76
 
77
-		$container->registerService('GroupManager', function (IContainer $c) {
77
+		$container->registerService('GroupManager', function(IContainer $c) {
78 78
 			return $c->query('ServerContainer')->getGroupManager();
79 79
 		});
80 80
 
81
-		$container->registerService('AvatarManager', function (IContainer $c) {
81
+		$container->registerService('AvatarManager', function(IContainer $c) {
82 82
 			return $c->query('ServerContainer')->getAvatarManager();
83 83
 		});
84 84
 
85
-		$container->registerService('Logger', function (IContainer $c) {
85
+		$container->registerService('Logger', function(IContainer $c) {
86 86
 			return $c->query('ServerContainer')->getLogger();
87 87
 		});
88 88
 
89
-		$container->registerService('L10N', function (IContainer $c) {
89
+		$container->registerService('L10N', function(IContainer $c) {
90 90
 			return $c->query('ServerContainer')->getL10N($c->query('AppName'));
91 91
 		});
92 92
 
93
-		$container->registerService('CommentMapper', function (IContainer $c) use ($server) {
93
+		$container->registerService('CommentMapper', function(IContainer $c) use ($server) {
94 94
 			return new CommentMapper(
95 95
 				$server->getDatabaseConnection()
96 96
 			);
97 97
 		});
98 98
 
99
-		$container->registerService('DateMapper', function (IContainer $c) use ($server) {
99
+		$container->registerService('DateMapper', function(IContainer $c) use ($server) {
100 100
 			return new DateMapper(
101 101
 				$server->getDatabaseConnection()
102 102
 			);
103 103
 		});
104 104
 
105
-		$container->registerService('EventMapper', function (IContainer $c) use ($server) {
105
+		$container->registerService('EventMapper', function(IContainer $c) use ($server) {
106 106
 			return new EventMapper(
107 107
 				$server->getDatabaseConnection()
108 108
 			);
109 109
 		});
110 110
 
111
-		$container->registerService('NotificationMapper', function (IContainer $c) use ($server) {
111
+		$container->registerService('NotificationMapper', function(IContainer $c) use ($server) {
112 112
 			return new NotificationMapper(
113 113
 				$server->getDatabaseConnection()
114 114
 			);
115 115
 		});
116 116
 
117
-		$container->registerService('ParticipationMapper', function (IContainer $c) use ($server) {
117
+		$container->registerService('ParticipationMapper', function(IContainer $c) use ($server) {
118 118
 			return new ParticipationMapper(
119 119
 				$server->getDatabaseConnection()
120 120
 			);
121 121
 		});
122 122
 
123
-		$container->registerService('ParticipationTextMapper', function (IContainer $c) use ($server) {
123
+		$container->registerService('ParticipationTextMapper', function(IContainer $c) use ($server) {
124 124
 			return new ParticipationTextMapper(
125 125
 				$server->getDatabaseConnection()
126 126
 			);
127 127
 		});
128 128
 
129
-		$container->registerService('TextMapper', function (IContainer $c) use ($server) {
129
+		$container->registerService('TextMapper', function(IContainer $c) use ($server) {
130 130
 			return new TextMapper(
131 131
 				$server->getDatabaseConnection()
132 132
 			);
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 	 */
139 139
 	public function registerNavigationEntry() {
140 140
 		$container = $this->getContainer();
141
-		$container->query('OCP\INavigationManager')->add(function () use ($container) {
141
+		$container->query('OCP\INavigationManager')->add(function() use ($container) {
142 142
 			$urlGenerator = $container->query('OCP\IURLGenerator');
143 143
 			$l10n = $container->query('OCP\IL10N');
144 144
 			return [
Please login to merge, or discard this patch.
templates/main.tmpl.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 					<div class="table-row table-body">
152 152
 						<div class="wrapper group-master">
153 153
 							<div class="wrapper group-1">
154
-								<div class="thumbnail <?php p($expiry_style . ' ' . $commented_class. ' ' . $participated_class); ?>"></div><!-- Image to display the status or type of poll -->
154
+								<div class="thumbnail <?php p($expiry_style . ' ' . $commented_class . ' ' . $participated_class); ?>"></div><!-- Image to display the status or type of poll -->
155 155
 								<a href="<?php p($pollUrl); ?>" class="wrapper group-1-1">
156 156
 									<div class="flex-column name">						  <?php p($poll->getTitle()); ?></div>
157 157
 									<div class="flex-column description">				   <?php p($poll->getDescription()); ?></div>
@@ -193,10 +193,10 @@  discard block
 block discarded – undo
193 193
 								</div>
194 194
 								<div class="wrapper group-2-1">
195 195
 									<div class="flex-column access"><?php p($l->t($poll->getAccess())); ?></div>
196
-									<div class="flex-column created has-tooltip live-relative-timestamp" data-timestamp="<?php p(strtotime($poll->getCreated())*1000); ?>" data-value="<?php p($poll->getCreated()); ?>"><?php p(\OCP\Template::relative_modified_date(strtotime($poll->getCreated()))); ?></div>
196
+									<div class="flex-column created has-tooltip live-relative-timestamp" data-timestamp="<?php p(strtotime($poll->getCreated()) * 1000); ?>" data-value="<?php p($poll->getCreated()); ?>"><?php p(\OCP\Template::relative_modified_date(strtotime($poll->getCreated()))); ?></div>
197 197
 								</div>
198 198
 								<div class="wrapper group-2-2">
199
-									<div class="flex-column has-tooltip expiry<?php p($expiry_style . $timestamp_style); ?>" data-timestamp="<?php p(strtotime($poll->getExpire())*1000); ?>" data-value="<?php p($poll->getExpire()); ?>"> <?php p($expiry_date); ?></div>
199
+									<div class="flex-column has-tooltip expiry<?php p($expiry_style . $timestamp_style); ?>" data-timestamp="<?php p(strtotime($poll->getExpire()) * 1000); ?>" data-value="<?php p($poll->getExpire()); ?>"> <?php p($expiry_date); ?></div>
200 200
 									<div class="flex-column participants">
201 201
 										<div class="symbol alt-tooltip partic_voted icon-<?php p($participated_class); ?>" title="<?php p($participated_title); ?>"></div>
202 202
 										<div class="symbol alt-tooltip partic_commented icon-<?php p($commented_class); ?>" title="<?php p($commented_title); ?>"></div>
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 	}
229 229
 	// Nextcloud >= 12
230 230
 	$groups = \OC::$server->getGroupManager()->getUserGroups(\OC::$server->getUserSession()->getUser());
231
-	return array_map(function ($group) {
231
+	return array_map(function($group) {
232 232
 		return $group->getGID();
233 233
 	}, $groups);
234 234
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -261,8 +261,7 @@
 block discarded – undo
261 261
 					return true;
262 262
 				}
263 263
 			}
264
-		}
265
-		else if (strpos($item, 'user_') === 0) {
264
+		} else if (strpos($item, 'user_') === 0) {
266 265
 			$usr = substr($item, 5);
267 266
 			if ($usr === $userId) {
268 267
 				return true;
Please login to merge, or discard this patch.
templates/create.tmpl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@
 block discarded – undo
171 171
 							<table id="selected-dates-table" class="choices">
172 172
 							</table>
173 173
 						</div>
174
-						<div id="text-select-container" <?php if(!$isUpdate || $poll->getType() === 0) print_unescaped('style="display:none;"'); ?> >
174
+						<div id="text-select-container" <?php if (!$isUpdate || $poll->getType() === 0) print_unescaped('style="display:none;"'); ?> >
175 175
 							<label for="text-title" class="input_title"><?php p($l->t('Text item')); ?></label>
176 176
 							<div class="input-group">
177 177
 								<input type="text" id="text-title" placeholder="<?php print_unescaped('Insert text...'); ?>" />
Please login to merge, or discard this patch.
lib/Controller/PageController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -703,7 +703,7 @@
 block discarded – undo
703 703
 		}
704 704
 		// Nextcloud >= 12
705 705
 		$groups = $this->groupManager->getUserGroups(\OC::$server->getUserSession()->getUser());
706
-		return array_map(function ($group) {
706
+		return array_map(function($group) {
707 707
 			return $group->getGID();
708 708
 		}, $groups);
709 709
 	}
Please login to merge, or discard this patch.