Passed
Pull Request — master (#260)
by Kai
02:32
created
tests/Unit/Factories/ParticipationTextFactory.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
  * General factory for the participation text model.
28 28
  */
29 29
 $fm->define('OCA\Polls\Db\ParticipationText')->setDefinitions([
30
-	'text' => Faker::text(256),
31
-	'userId' => Faker::firstNameMale(),
32
-	'type' => 0
30
+    'text' => Faker::text(256),
31
+    'userId' => Faker::firstNameMale(),
32
+    'type' => 0
33 33
 ]);
Please login to merge, or discard this patch.
lib/AppInfo/Application.php 2 patches
Indentation   +114 added lines, -114 removed lines patch added patch discarded remove patch
@@ -36,118 +36,118 @@
 block discarded – undo
36 36
 
37 37
 class Application extends App {
38 38
 
39
-	/**
40
-	 * Application constructor.
41
-	 * @param array $urlParams
42
-	 */
43
-	public function __construct(array $urlParams = array()) {
44
-		parent::__construct('polls', $urlParams);
45
-
46
-		$container = $this->getContainer();
47
-		$server = $container->getServer();
48
-
49
-		/**
50
-		 * Controllers
51
-		 */
52
-		$container->registerService('PageController', function (IContainer $c) {
53
-			return new PageController(
54
-				$c->query('AppName'),
55
-				$c->query('Request'),
56
-				$c->query('UserManager'),
57
-				$c->query('GroupManager'),
58
-				$c->query('AvatarManager'),
59
-				$c->query('Logger'),
60
-				$c->query('L10N'),
61
-				$c->query('ServerContainer')->getURLGenerator(),
62
-				$c->query('UserId'),
63
-				$c->query('CommentMapper'),
64
-				$c->query('DateMapper'),
65
-				$c->query('EventMapper'),
66
-				$c->query('NotificationMapper'),
67
-				$c->query('ParticipationMapper'),
68
-				$c->query('ParticipationTextMapper'),
69
-				$c->query('TextMapper')
70
-			);
71
-		});
72
-
73
-		$container->registerService('UserManager', function (IContainer $c) {
74
-			return $c->query('ServerContainer')->getUserManager();
75
-		});
76
-
77
-		$container->registerService('GroupManager', function (IContainer $c) {
78
-			return $c->query('ServerContainer')->getGroupManager();
79
-		});
80
-
81
-		$container->registerService('AvatarManager', function (IContainer $c) {
82
-			return $c->query('ServerContainer')->getAvatarManager();
83
-		});
84
-
85
-		$container->registerService('Logger', function (IContainer $c) {
86
-			return $c->query('ServerContainer')->getLogger();
87
-		});
88
-
89
-		$container->registerService('L10N', function (IContainer $c) {
90
-			return $c->query('ServerContainer')->getL10N($c->query('AppName'));
91
-		});
92
-
93
-		$container->registerService('CommentMapper', function (IContainer $c) use ($server) {
94
-			return new CommentMapper(
95
-				$server->getDatabaseConnection()
96
-			);
97
-		});
98
-
99
-		$container->registerService('DateMapper', function (IContainer $c) use ($server) {
100
-			return new DateMapper(
101
-				$server->getDatabaseConnection()
102
-			);
103
-		});
104
-
105
-		$container->registerService('EventMapper', function (IContainer $c) use ($server) {
106
-			return new EventMapper(
107
-				$server->getDatabaseConnection()
108
-			);
109
-		});
110
-
111
-		$container->registerService('NotificationMapper', function (IContainer $c) use ($server) {
112
-			return new NotificationMapper(
113
-				$server->getDatabaseConnection()
114
-			);
115
-		});
116
-
117
-		$container->registerService('ParticipationMapper', function (IContainer $c) use ($server) {
118
-			return new ParticipationMapper(
119
-				$server->getDatabaseConnection()
120
-			);
121
-		});
122
-
123
-		$container->registerService('ParticipationTextMapper', function (IContainer $c) use ($server) {
124
-			return new ParticipationTextMapper(
125
-				$server->getDatabaseConnection()
126
-			);
127
-		});
128
-
129
-		$container->registerService('TextMapper', function (IContainer $c) use ($server) {
130
-			return new TextMapper(
131
-				$server->getDatabaseConnection()
132
-			);
133
-		});
134
-	}
135
-
136
-	/**
137
-	 * Register navigation entry for main navigation.
138
-	 */
139
-	public function registerNavigationEntry() {
140
-		$container = $this->getContainer();
141
-		$container->query('OCP\INavigationManager')->add(function () use ($container) {
142
-			$urlGenerator = $container->query('OCP\IURLGenerator');
143
-			$l10n = $container->query('OCP\IL10N');
144
-			return [
145
-				'id' => 'polls',
146
-				'order' => 77,
147
-				'href' => $urlGenerator->linkToRoute('polls.page.index'),
148
-				'icon' => $urlGenerator->imagePath('polls', 'app.svg'),
149
-				'name' => $l10n->t('Polls')
150
-			];
151
-		});
152
-	}
39
+    /**
40
+     * Application constructor.
41
+     * @param array $urlParams
42
+     */
43
+    public function __construct(array $urlParams = array()) {
44
+        parent::__construct('polls', $urlParams);
45
+
46
+        $container = $this->getContainer();
47
+        $server = $container->getServer();
48
+
49
+        /**
50
+         * Controllers
51
+         */
52
+        $container->registerService('PageController', function (IContainer $c) {
53
+            return new PageController(
54
+                $c->query('AppName'),
55
+                $c->query('Request'),
56
+                $c->query('UserManager'),
57
+                $c->query('GroupManager'),
58
+                $c->query('AvatarManager'),
59
+                $c->query('Logger'),
60
+                $c->query('L10N'),
61
+                $c->query('ServerContainer')->getURLGenerator(),
62
+                $c->query('UserId'),
63
+                $c->query('CommentMapper'),
64
+                $c->query('DateMapper'),
65
+                $c->query('EventMapper'),
66
+                $c->query('NotificationMapper'),
67
+                $c->query('ParticipationMapper'),
68
+                $c->query('ParticipationTextMapper'),
69
+                $c->query('TextMapper')
70
+            );
71
+        });
72
+
73
+        $container->registerService('UserManager', function (IContainer $c) {
74
+            return $c->query('ServerContainer')->getUserManager();
75
+        });
76
+
77
+        $container->registerService('GroupManager', function (IContainer $c) {
78
+            return $c->query('ServerContainer')->getGroupManager();
79
+        });
80
+
81
+        $container->registerService('AvatarManager', function (IContainer $c) {
82
+            return $c->query('ServerContainer')->getAvatarManager();
83
+        });
84
+
85
+        $container->registerService('Logger', function (IContainer $c) {
86
+            return $c->query('ServerContainer')->getLogger();
87
+        });
88
+
89
+        $container->registerService('L10N', function (IContainer $c) {
90
+            return $c->query('ServerContainer')->getL10N($c->query('AppName'));
91
+        });
92
+
93
+        $container->registerService('CommentMapper', function (IContainer $c) use ($server) {
94
+            return new CommentMapper(
95
+                $server->getDatabaseConnection()
96
+            );
97
+        });
98
+
99
+        $container->registerService('DateMapper', function (IContainer $c) use ($server) {
100
+            return new DateMapper(
101
+                $server->getDatabaseConnection()
102
+            );
103
+        });
104
+
105
+        $container->registerService('EventMapper', function (IContainer $c) use ($server) {
106
+            return new EventMapper(
107
+                $server->getDatabaseConnection()
108
+            );
109
+        });
110
+
111
+        $container->registerService('NotificationMapper', function (IContainer $c) use ($server) {
112
+            return new NotificationMapper(
113
+                $server->getDatabaseConnection()
114
+            );
115
+        });
116
+
117
+        $container->registerService('ParticipationMapper', function (IContainer $c) use ($server) {
118
+            return new ParticipationMapper(
119
+                $server->getDatabaseConnection()
120
+            );
121
+        });
122
+
123
+        $container->registerService('ParticipationTextMapper', function (IContainer $c) use ($server) {
124
+            return new ParticipationTextMapper(
125
+                $server->getDatabaseConnection()
126
+            );
127
+        });
128
+
129
+        $container->registerService('TextMapper', function (IContainer $c) use ($server) {
130
+            return new TextMapper(
131
+                $server->getDatabaseConnection()
132
+            );
133
+        });
134
+    }
135
+
136
+    /**
137
+     * Register navigation entry for main navigation.
138
+     */
139
+    public function registerNavigationEntry() {
140
+        $container = $this->getContainer();
141
+        $container->query('OCP\INavigationManager')->add(function () use ($container) {
142
+            $urlGenerator = $container->query('OCP\IURLGenerator');
143
+            $l10n = $container->query('OCP\IL10N');
144
+            return [
145
+                'id' => 'polls',
146
+                'order' => 77,
147
+                'href' => $urlGenerator->linkToRoute('polls.page.index'),
148
+                'icon' => $urlGenerator->imagePath('polls', 'app.svg'),
149
+                'name' => $l10n->t('Polls')
150
+            ];
151
+        });
152
+    }
153 153
 }
Please login to merge, or discard this 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.