Completed
Pull Request — master (#7369)
by Kai
12:27
created
lib/private/DateTimeZone.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 		try {
65 65
 			return new \DateTimeZone($timeZone);
66 66
 		} catch (\Exception $e) {
67
-			\OCP\Util::writeLog('datetimezone', 'Failed to created DateTimeZone "' . $timeZone . "'", \OCP\Util::DEBUG);
67
+			\OCP\Util::writeLog('datetimezone', 'Failed to created DateTimeZone "'.$timeZone."'", \OCP\Util::DEBUG);
68 68
 			return new \DateTimeZone($this->getDefaultTimeZone());
69 69
 		}
70 70
 	}
@@ -85,9 +85,9 @@  discard block
 block discarded – undo
85 85
 			// so a positive offset means negative timeZone
86 86
 			// and the other way around.
87 87
 			if ($offset > 0) {
88
-				$timeZone = 'Etc/GMT-' . $offset;
88
+				$timeZone = 'Etc/GMT-'.$offset;
89 89
 			} else {
90
-				$timeZone = 'Etc/GMT+' . abs($offset);
90
+				$timeZone = 'Etc/GMT+'.abs($offset);
91 91
 			}
92 92
 
93 93
 			return new \DateTimeZone($timeZone);
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 			}
110 110
 
111 111
 			// No timezone found, fallback to UTC
112
-			\OCP\Util::writeLog('datetimezone', 'Failed to find DateTimeZone for offset "' . $offset . "'", \OCP\Util::DEBUG);
112
+			\OCP\Util::writeLog('datetimezone', 'Failed to find DateTimeZone for offset "'.$offset."'", \OCP\Util::DEBUG);
113 113
 			return new \DateTimeZone($this->getDefaultTimeZone());
114 114
 		}
115 115
 	}
Please login to merge, or discard this patch.
lib/private/Tagging/TagMapper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,12 +50,12 @@  discard block
 block discarded – undo
50 50
 	* @return array An array of Tag objects.
51 51
 	*/
52 52
 	public function loadTags($owners, $type) {
53
-		if(!is_array($owners)) {
53
+		if (!is_array($owners)) {
54 54
 			$owners = array($owners);
55 55
 		}
56 56
 
57
-		$sql = 'SELECT `id`, `uid`, `type`, `category` FROM `' . $this->getTableName() . '` '
58
-			. 'WHERE `uid` IN (' . str_repeat('?,', count($owners)-1) . '?) AND `type` = ? ORDER BY `category`';
57
+		$sql = 'SELECT `id`, `uid`, `type`, `category` FROM `'.$this->getTableName().'` '
58
+			. 'WHERE `uid` IN ('.str_repeat('?,', count($owners) - 1).'?) AND `type` = ? ORDER BY `category`';
59 59
 		return $this->findEntities($sql, array_merge($owners, array($type)));
60 60
 	}
61 61
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	* @return bool
67 67
 	*/
68 68
 	public function tagExists($tag) {
69
-		$sql = 'SELECT `id`, `uid`, `type`, `category` FROM `' . $this->getTableName() . '` '
69
+		$sql = 'SELECT `id`, `uid`, `type`, `category` FROM `'.$this->getTableName().'` '
70 70
 			. 'WHERE `uid` = ? AND `type` = ? AND `category` = ?';
71 71
 		try {
72 72
 			$this->findEntity($sql, array($tag->getOwner(), $tag->getType(), $tag->getName()));
Please login to merge, or discard this patch.
lib/private/Tagging/Tag.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	 * @todo migrate existing database columns to the correct names
63 63
 	 * to be able to drop this direct mapping
64 64
 	 */
65
-	public function columnToProperty($columnName){
65
+	public function columnToProperty($columnName) {
66 66
 		if ($columnName === 'category') {
67 67
 		    return 'name';
68 68
 		} elseif ($columnName === 'uid') {
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	 * @param string $property the name of the property
79 79
 	 * @return string the column name
80 80
 	 */
81
-	public function propertyToColumn($property){
81
+	public function propertyToColumn($property) {
82 82
 		if ($property === 'name') {
83 83
 		    return 'category';
84 84
 		} elseif ($property === 'owner') {
Please login to merge, or discard this patch.
lib/private/Route/CachingRouter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 	 */
53 53
 	public function generate($name, $parameters = array(), $absolute = false) {
54 54
 		asort($parameters);
55
-		$key = $this->context->getHost() . '#' . $this->context->getBaseUrl() . $name . sha1(json_encode($parameters)) . intval($absolute);
55
+		$key = $this->context->getHost().'#'.$this->context->getBaseUrl().$name.sha1(json_encode($parameters)).intval($absolute);
56 56
 		$cachedKey = $this->cache->get($key);
57 57
 		if ($cachedKey) {
58 58
 			return $cachedKey;
Please login to merge, or discard this patch.
lib/private/ContactsManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,10 +41,10 @@  discard block
 block discarded – undo
41 41
 		public function search($pattern, $searchProperties = array(), $options = array()) {
42 42
 			$this->loadAddressBooks();
43 43
 			$result = array();
44
-			foreach($this->addressBooks as $addressBook) {
44
+			foreach ($this->addressBooks as $addressBook) {
45 45
 				$r = $addressBook->search($pattern, $searchProperties, $options);
46 46
 				$contacts = array();
47
-				foreach($r as $c){
47
+				foreach ($r as $c) {
48 48
 					$c['addressbook-key'] = $addressBook->getKey();
49 49
 					$contacts[] = $c;
50 50
 				}
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 		public function getAddressBooks() {
125 125
 			$this->loadAddressBooks();
126 126
 			$result = array();
127
-			foreach($this->addressBooks as $addressBook) {
127
+			foreach ($this->addressBooks as $addressBook) {
128 128
 				$result[$addressBook->getKey()] = $addressBook->getDisplayName();
129 129
 			}
130 130
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 		 */
182 182
 		protected function loadAddressBooks()
183 183
 		{
184
-			foreach($this->addressBookLoaders as $callable) {
184
+			foreach ($this->addressBookLoaders as $callable) {
185 185
 				$callable($this);
186 186
 			}
187 187
 			$this->addressBookLoaders = array();
Please login to merge, or discard this patch.
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.