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