Completed
Pull Request — master (#6586)
by Christoph
19:02
created
lib/private/Migration/BackgroundRepair.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	 */
58 58
 	public function execute($jobList, ILogger $logger = null) {
59 59
 		// add an interval of 15 mins
60
-		$this->setInterval(15*60);
60
+		$this->setInterval(15 * 60);
61 61
 
62 62
 		$this->jobList = $jobList;
63 63
 		$this->logger = $logger;
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 		try {
91 91
 			$repair->addStep($step);
92 92
 		} catch (\Exception $ex) {
93
-			$this->logger->logException($ex,[
93
+			$this->logger->logException($ex, [
94 94
 				'app' => 'migration'
95 95
 			]);
96 96
 
Please login to merge, or discard this patch.
lib/private/Command/QueueBus.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 		if ($command instanceof ICommand) {
56 56
 			// ensure the command can be serialized
57 57
 			$serialized = serialize($command);
58
-			if(strlen($serialized) > 4000) {
58
+			if (strlen($serialized) > 4000) {
59 59
 				throw new \InvalidArgumentException('Trying to push a command which serialized form can not be stored in the database (>4000 character)');
60 60
 			}
61 61
 			$unserialized = unserialize($serialized);
Please login to merge, or discard this patch.
lib/private/Command/FileAccess.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
 use OCP\IUser;
26 26
 
27 27
 trait FileAccess {
28
-	protected function setupFS(IUser $user){
28
+	protected function setupFS(IUser $user) {
29 29
 		\OC_Util::setupFS($user->getUID());
30 30
 	}
31 31
 
Please login to merge, or discard this patch.
lib/private/Template/JSConfigHelper.php 1 patch
Spacing   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 			$apps = $this->appManager->getEnabledAppsForUser($this->currentUser);
109 109
 		}
110 110
 
111
-		foreach($apps as $app) {
111
+		foreach ($apps as $app) {
112 112
 			$apps_paths[$app] = \OC_App::getAppWebPath($app);
113 113
 		}
114 114
 
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
 		$outgoingServer2serverShareEnabled = $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'yes';
122 122
 
123 123
 		$countOfDataLocation = 0;
124
-		$dataLocation = str_replace(\OC::$SERVERROOT .'/', '', $this->config->getSystemValue('datadirectory', ''), $countOfDataLocation);
125
-		if($countOfDataLocation !== 1 || !$this->groupManager->isAdmin($uid)) {
124
+		$dataLocation = str_replace(\OC::$SERVERROOT.'/', '', $this->config->getSystemValue('datadirectory', ''), $countOfDataLocation);
125
+		if ($countOfDataLocation !== 1 || !$this->groupManager->isAdmin($uid)) {
126 126
 			$dataLocation = false;
127 127
 		}
128 128
 
@@ -144,61 +144,61 @@  discard block
 block discarded – undo
144 144
 			"datepickerFormatDate" => json_encode($this->l->l('jsdate', null)),
145 145
 			'nc_lastLogin' => $lastConfirmTimestamp,
146 146
 			"dayNames" =>  json_encode([
147
-				(string)$this->l->t('Sunday'),
148
-				(string)$this->l->t('Monday'),
149
-				(string)$this->l->t('Tuesday'),
150
-				(string)$this->l->t('Wednesday'),
151
-				(string)$this->l->t('Thursday'),
152
-				(string)$this->l->t('Friday'),
153
-				(string)$this->l->t('Saturday')
147
+				(string) $this->l->t('Sunday'),
148
+				(string) $this->l->t('Monday'),
149
+				(string) $this->l->t('Tuesday'),
150
+				(string) $this->l->t('Wednesday'),
151
+				(string) $this->l->t('Thursday'),
152
+				(string) $this->l->t('Friday'),
153
+				(string) $this->l->t('Saturday')
154 154
 			]),
155 155
 			"dayNamesShort" =>  json_encode([
156
-				(string)$this->l->t('Sun.'),
157
-				(string)$this->l->t('Mon.'),
158
-				(string)$this->l->t('Tue.'),
159
-				(string)$this->l->t('Wed.'),
160
-				(string)$this->l->t('Thu.'),
161
-				(string)$this->l->t('Fri.'),
162
-				(string)$this->l->t('Sat.')
156
+				(string) $this->l->t('Sun.'),
157
+				(string) $this->l->t('Mon.'),
158
+				(string) $this->l->t('Tue.'),
159
+				(string) $this->l->t('Wed.'),
160
+				(string) $this->l->t('Thu.'),
161
+				(string) $this->l->t('Fri.'),
162
+				(string) $this->l->t('Sat.')
163 163
 			]),
164 164
 			"dayNamesMin" =>  json_encode([
165
-				(string)$this->l->t('Su'),
166
-				(string)$this->l->t('Mo'),
167
-				(string)$this->l->t('Tu'),
168
-				(string)$this->l->t('We'),
169
-				(string)$this->l->t('Th'),
170
-				(string)$this->l->t('Fr'),
171
-				(string)$this->l->t('Sa')
165
+				(string) $this->l->t('Su'),
166
+				(string) $this->l->t('Mo'),
167
+				(string) $this->l->t('Tu'),
168
+				(string) $this->l->t('We'),
169
+				(string) $this->l->t('Th'),
170
+				(string) $this->l->t('Fr'),
171
+				(string) $this->l->t('Sa')
172 172
 			]),
173 173
 			"monthNames" => json_encode([
174
-				(string)$this->l->t('January'),
175
-				(string)$this->l->t('February'),
176
-				(string)$this->l->t('March'),
177
-				(string)$this->l->t('April'),
178
-				(string)$this->l->t('May'),
179
-				(string)$this->l->t('June'),
180
-				(string)$this->l->t('July'),
181
-				(string)$this->l->t('August'),
182
-				(string)$this->l->t('September'),
183
-				(string)$this->l->t('October'),
184
-				(string)$this->l->t('November'),
185
-				(string)$this->l->t('December')
174
+				(string) $this->l->t('January'),
175
+				(string) $this->l->t('February'),
176
+				(string) $this->l->t('March'),
177
+				(string) $this->l->t('April'),
178
+				(string) $this->l->t('May'),
179
+				(string) $this->l->t('June'),
180
+				(string) $this->l->t('July'),
181
+				(string) $this->l->t('August'),
182
+				(string) $this->l->t('September'),
183
+				(string) $this->l->t('October'),
184
+				(string) $this->l->t('November'),
185
+				(string) $this->l->t('December')
186 186
 			]),
187 187
 			"monthNamesShort" => json_encode([
188
-				(string)$this->l->t('Jan.'),
189
-				(string)$this->l->t('Feb.'),
190
-				(string)$this->l->t('Mar.'),
191
-				(string)$this->l->t('Apr.'),
192
-				(string)$this->l->t('May.'),
193
-				(string)$this->l->t('Jun.'),
194
-				(string)$this->l->t('Jul.'),
195
-				(string)$this->l->t('Aug.'),
196
-				(string)$this->l->t('Sep.'),
197
-				(string)$this->l->t('Oct.'),
198
-				(string)$this->l->t('Nov.'),
199
-				(string)$this->l->t('Dec.')
188
+				(string) $this->l->t('Jan.'),
189
+				(string) $this->l->t('Feb.'),
190
+				(string) $this->l->t('Mar.'),
191
+				(string) $this->l->t('Apr.'),
192
+				(string) $this->l->t('May.'),
193
+				(string) $this->l->t('Jun.'),
194
+				(string) $this->l->t('Jul.'),
195
+				(string) $this->l->t('Aug.'),
196
+				(string) $this->l->t('Sep.'),
197
+				(string) $this->l->t('Oct.'),
198
+				(string) $this->l->t('Nov.'),
199
+				(string) $this->l->t('Dec.')
200 200
 			]),
201
-			"firstDay" => json_encode($this->l->l('firstday', null)) ,
201
+			"firstDay" => json_encode($this->l->l('firstday', null)),
202 202
 			"oc_config" => json_encode([
203 203
 				'session_lifetime'	=> min($this->config->getSystemValue('session_lifetime', $this->iniWrapper->getNumeric('session.gc_maxlifetime')), $this->iniWrapper->getNumeric('session.gc_maxlifetime')),
204 204
 				'session_keepalive'	=> $this->config->getSystemValue('session_keepalive', true),
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 		if ($this->currentUser !== null) {
241 241
 			$array['oc_userconfig'] = json_encode([
242 242
 				'avatar' => [
243
-					'version' => (int)$this->config->getUserValue($uid, 'avatar', 'version', 0),
243
+					'version' => (int) $this->config->getUserValue($uid, 'avatar', 'version', 0),
244 244
 				]
245 245
 			]);
246 246
 		}
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 
253 253
 		// Echo it
254 254
 		foreach ($array as  $setting => $value) {
255
-			$result .= 'var '. $setting . '='. $value . ';' . PHP_EOL;
255
+			$result .= 'var '.$setting.'='.$value.';'.PHP_EOL;
256 256
 		}
257 257
 
258 258
 		return $result;
Please login to merge, or discard this patch.
lib/private/Template/ResourceNotFoundException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,6 +41,6 @@
 block discarded – undo
41 41
 	 * @return string
42 42
 	 */
43 43
 	public function getResourcePath() {
44
-		return $this->webPath . '/' . $this->resource;
44
+		return $this->webPath.'/'.$this->resource;
45 45
 	}
46 46
 }
Please login to merge, or discard this patch.
lib/private/Template/TemplateFileLocator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	/**
33 33
 	 * @param string[] $dirs
34 34
 	 */
35
-	public function __construct( $dirs ) {
35
+	public function __construct($dirs) {
36 36
 		$this->dirs = $dirs;
37 37
 	}
38 38
 
@@ -41,12 +41,12 @@  discard block
 block discarded – undo
41 41
 	 * @return string
42 42
 	 * @throws \Exception
43 43
 	 */
44
-	public function find( $template ) {
44
+	public function find($template) {
45 45
 		if ($template === '') {
46 46
 			throw new \InvalidArgumentException('Empty template name');
47 47
 		}
48 48
 
49
-		foreach($this->dirs as $dir) {
49
+		foreach ($this->dirs as $dir) {
50 50
 			$file = $dir.$template.'.php';
51 51
 			if (is_file($file)) {
52 52
 				$this->path = $dir;
Please login to merge, or discard this patch.
lib/private/Hooks/EmitterTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	 * @param callable $callback
36 36
 	 */
37 37
 	public function listen($scope, $method, callable $callback) {
38
-		$eventName = $scope . '::' . $method;
38
+		$eventName = $scope.'::'.$method;
39 39
 		if (!isset($this->listeners[$eventName])) {
40 40
 			$this->listeners[$eventName] = array();
41 41
 		}
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 		$names = array();
54 54
 		$allNames = array_keys($this->listeners);
55 55
 		if ($scope and $method) {
56
-			$name = $scope . '::' . $method;
56
+			$name = $scope.'::'.$method;
57 57
 			if (isset($this->listeners[$name])) {
58 58
 				$names[] = $name;
59 59
 			}
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	 * @param array $arguments optional
94 94
 	 */
95 95
 	protected function emit($scope, $method, array $arguments = array()) {
96
-		$eventName = $scope . '::' . $method;
96
+		$eventName = $scope.'::'.$method;
97 97
 		if (isset($this->listeners[$eventName])) {
98 98
 			foreach ($this->listeners[$eventName] as $callback) {
99 99
 				call_user_func_array($callback, $arguments);
Please login to merge, or discard this patch.
lib/private/legacy/group/backend.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,23 +30,23 @@
 block discarded – undo
30 30
  * error code for functions not provided by the group backend
31 31
  * @deprecated Use \OC_Group_Backend::NOT_IMPLEMENTED instead
32 32
  */
33
-define('OC_GROUP_BACKEND_NOT_IMPLEMENTED',   -501);
33
+define('OC_GROUP_BACKEND_NOT_IMPLEMENTED', -501);
34 34
 
35 35
 /**
36 36
  * actions that user backends can define
37 37
  */
38 38
 /** @deprecated Use \OC_Group_Backend::CREATE_GROUP instead */
39
-define('OC_GROUP_BACKEND_CREATE_GROUP',      0x00000001);
39
+define('OC_GROUP_BACKEND_CREATE_GROUP', 0x00000001);
40 40
 /** @deprecated Use \OC_Group_Backend::DELETE_GROUP instead */
41
-define('OC_GROUP_BACKEND_DELETE_GROUP',      0x00000010);
41
+define('OC_GROUP_BACKEND_DELETE_GROUP', 0x00000010);
42 42
 /** @deprecated Use \OC_Group_Backend::ADD_TO_GROUP instead */
43
-define('OC_GROUP_BACKEND_ADD_TO_GROUP',      0x00000100);
43
+define('OC_GROUP_BACKEND_ADD_TO_GROUP', 0x00000100);
44 44
 /** @deprecated Use \OC_Group_Backend::REMOVE_FROM_GOUP instead */
45
-define('OC_GROUP_BACKEND_REMOVE_FROM_GOUP',  0x00001000);
45
+define('OC_GROUP_BACKEND_REMOVE_FROM_GOUP', 0x00001000);
46 46
 /** @deprecated Obsolete */
47
-define('OC_GROUP_BACKEND_GET_DISPLAYNAME',   0x00010000); //OBSOLETE
47
+define('OC_GROUP_BACKEND_GET_DISPLAYNAME', 0x00010000); //OBSOLETE
48 48
 /** @deprecated Use \OC_Group_Backend::COUNT_USERS instead */
49
-define('OC_GROUP_BACKEND_COUNT_USERS',       0x00100000);
49
+define('OC_GROUP_BACKEND_COUNT_USERS', 0x00100000);
50 50
 
51 51
 /**
52 52
  * Abstract base class for user management
Please login to merge, or discard this patch.
lib/private/legacy/eventsource.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 		header('X-Accel-Buffering: no');
61 61
 		$this->fallback = isset($_GET['fallback']) and $_GET['fallback'] == 'true';
62 62
 		if ($this->fallback) {
63
-			$this->fallBackId = (int)$_GET['fallback_id'];
63
+			$this->fallBackId = (int) $_GET['fallback_id'];
64 64
 			/**
65 65
 			 * FIXME: The default content-security-policy of ownCloud forbids inline
66 66
 			 * JavaScript for security reasons. IE starting on Windows 10 will
@@ -73,11 +73,11 @@  discard block
 block discarded – undo
73 73
 			 */
74 74
 			header("Content-Security-Policy: default-src 'none'; script-src 'unsafe-inline'");
75 75
 			header("Content-Type: text/html");
76
-			echo str_repeat('<span></span>' . PHP_EOL, 10); //dummy data to keep IE happy
76
+			echo str_repeat('<span></span>'.PHP_EOL, 10); //dummy data to keep IE happy
77 77
 		} else {
78 78
 			header("Content-Type: text/event-stream");
79 79
 		}
80
-		if(!\OC::$server->getRequest()->passesStrictCookieCheck()) {
80
+		if (!\OC::$server->getRequest()->passesStrictCookieCheck()) {
81 81
 			header('Location: '.\OC::$WEBROOT);
82 82
 			exit();
83 83
 		}
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	 */
101 101
 	public function send($type, $data = null) {
102 102
 		if ($data and !preg_match('/^[A-Za-z0-9_]+$/', $type)) {
103
-			throw new BadMethodCallException('Type needs to be alphanumeric ('. $type .')');
103
+			throw new BadMethodCallException('Type needs to be alphanumeric ('.$type.')');
104 104
 		}
105 105
 		$this->init();
106 106
 		if (is_null($data)) {
@@ -109,13 +109,13 @@  discard block
 block discarded – undo
109 109
 		}
110 110
 		if ($this->fallback) {
111 111
 			$response = '<script type="text/javascript">window.parent.OC.EventSource.fallBackCallBack('
112
-				. $this->fallBackId . ',"' . $type . '",' . OCP\JSON::encode($data) . ')</script>' . PHP_EOL;
112
+				. $this->fallBackId.',"'.$type.'",'.OCP\JSON::encode($data).')</script>'.PHP_EOL;
113 113
 			echo $response;
114 114
 		} else {
115 115
 			if ($type) {
116
-				echo 'event: ' . $type . PHP_EOL;
116
+				echo 'event: '.$type.PHP_EOL;
117 117
 			}
118
-			echo 'data: ' . OCP\JSON::encode($data) . PHP_EOL;
118
+			echo 'data: '.OCP\JSON::encode($data).PHP_EOL;
119 119
 		}
120 120
 		echo PHP_EOL;
121 121
 		flush();
Please login to merge, or discard this patch.