Completed
Pull Request — master (#155)
by Sander
02:35
created
lib/AppInfo/Application.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 use OCP\IL10N;
46 46
 use OCP\Util;
47 47
 class Application extends App {
48
-	public function __construct () {
48
+	public function __construct() {
49 49
 		parent::__construct('passman');
50 50
 		$container = $this->getContainer();
51 51
 		// Allow automatic DI for the View, until we migrated to Nodes API
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 		/**
60 60
 		 * Middleware
61 61
 		 */
62
-		$container->registerService('ShareMiddleware', function($c){
62
+		$container->registerService('ShareMiddleware', function($c) {
63 63
 			return new ShareMiddleware($c->query('SettingsService'));
64 64
 		});
65 65
 		$container->registerMiddleware('ShareMiddleware');
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
 
91 91
 		/** Cron **/
92
-		$container->registerService('CronService', function ($c) {
92
+		$container->registerService('CronService', function($c) {
93 93
 			return new CronService(
94 94
 				$c->query('CredentialService'),
95 95
 				$c->query('Logger'),
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 			);
101 101
 		});
102 102
 
103
-		$container->registerService('Db', function () {
103
+		$container->registerService('Db', function() {
104 104
 			return new Db();
105 105
 		});
106 106
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 		$c = $this->getContainer();
133 133
 		/** @var \OCP\IServerContainer $server */
134 134
 		$server = $c->getServer();
135
-		$navigationEntry = function () use ($c, $server) {
135
+		$navigationEntry = function() use ($c, $server) {
136 136
 			return [
137 137
 				'id' => $c->getAppName(),
138 138
 				'order' => 10,
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
 		/**
60 60
 		 * Middleware
61 61
 		 */
62
-		$container->registerService('ShareMiddleware', function($c){
62
+		$container->registerService('ShareMiddleware', function($c) {
63 63
 			return new ShareMiddleware($c->query('SettingsService'));
64 64
 		});
65 65
 		$container->registerMiddleware('ShareMiddleware');
Please login to merge, or discard this patch.
middleware/sharemiddleware.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,16 +12,16 @@
 block discarded – undo
12 12
 
13 13
 	private $settings;
14 14
 
15
-	public function __construct(SettingsService $config){
15
+	public function __construct(SettingsService $config) {
16 16
 		$this->settings = $config;
17 17
 	}
18 18
 
19 19
 
20 20
 	public function beforeController($controller, $methodName) {
21
-		if ($controller instanceof ShareController){
21
+		if ($controller instanceof ShareController) {
22 22
 			$setting = ($methodName === 'createPublicShare') ? 'link_sharing_enabled' : 'user_sharing_enabled';
23 23
 			$http_response_code = \OCP\AppFramework\Http::STATUS_FORBIDDEN;
24
-			if($methodName === 'getVaultItems'){
24
+			if ($methodName === 'getVaultItems') {
25 25
 				$http_response_code = Http::STATUS_OK;
26 26
 			}
27 27
 			if (!$this->settings->isEnabled($setting)) {
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,16 +12,16 @@
 block discarded – undo
12 12
 
13 13
 	private $settings;
14 14
 
15
-	public function __construct(SettingsService $config){
15
+	public function __construct(SettingsService $config) {
16 16
 		$this->settings = $config;
17 17
 	}
18 18
 
19 19
 
20 20
 	public function beforeController($controller, $methodName) {
21
-		if ($controller instanceof ShareController){
21
+		if ($controller instanceof ShareController) {
22 22
 			$setting = ($methodName === 'createPublicShare') ? 'link_sharing_enabled' : 'user_sharing_enabled';
23 23
 			$http_response_code = \OCP\AppFramework\Http::STATUS_FORBIDDEN;
24
-			if($methodName === 'getVaultItems'){
24
+			if($methodName === 'getVaultItems') {
25 25
 				$http_response_code = Http::STATUS_OK;
26 26
 			}
27 27
 			if (!$this->settings->isEnabled($setting)) {
Please login to merge, or discard this patch.