Completed
Branch master (8fc554)
by Alexander
06:05
created
src/SVNBuddy/Command/AbstractCommand.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -238,8 +238,7 @@
 block discarded – undo
238 238
 
239 239
 		if ( !$this->repositoryConnector->isUrl($path) ) {
240 240
 			$path = realpath($path);
241
-		}
242
-		elseif ( !$this->pathAcceptsUrl ) {
241
+		} elseif ( !$this->pathAcceptsUrl ) {
243 242
 			throw new \RuntimeException('The "path" argument must be a working copy path and not URL.');
244 243
 		}
245 244
 
Please login to merge, or discard this patch.
src/SVNBuddy/Command/AggregateCommand.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -317,8 +317,7 @@  discard block
 block discarded – undo
317 317
 
318 318
 		if ( $all_working_copies_count != $working_copies_count ) {
319 319
 			$ignored_suffix = ' (' . ($all_working_copies_count - $working_copies_count) . ' ignored)';
320
-		}
321
-		else {
320
+		} else {
322 321
 			$ignored_suffix = '';
323 322
 		}
324 323
 
@@ -357,8 +356,7 @@  discard block
 block discarded – undo
357 356
 
358 357
 			if ( $this->repositoryConnector->isWorkingCopy($sub_folder) ) {
359 358
 				$working_copies[] = $sub_folder;
360
-			}
361
-			else {
359
+			} else {
362 360
 				$working_copies = array_merge($working_copies, $this->getWorkingCopiesRecursive($sub_folder));
363 361
 			}
364 362
 		}
Please login to merge, or discard this patch.
src/SVNBuddy/Command/CommitCommand.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -210,8 +210,7 @@
 block discarded – undo
210 210
 				$final_paths[$new_path] = $this->_revisionListParser->expandRanges(
211 211
 					explode(',', $new_merged_revisions)
212 212
 				);
213
-			}
214
-			elseif ( $new_merged_revisions != $old_paths[$new_path] ) {
213
+			} elseif ( $new_merged_revisions != $old_paths[$new_path] ) {
215 214
 				// Merge on existing path.
216 215
 				$new_merged_revisions_parsed = $this->_revisionListParser->expandRanges(
217 216
 					explode(',', $new_merged_revisions)
Please login to merge, or discard this patch.
src/SVNBuddy/Command/ConfigCommand.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -185,8 +185,7 @@  discard block
 block discarded – undo
185 185
 				$value = $this->openEditor($value);
186 186
 				$config_setting->setValue($value, $this->getScopeFilter());
187 187
 				$this->io->writeln('Setting <info>' . $setting_name . '</info> was edited.');
188
-			}
189
-			catch ( \InvalidArgumentException $e ) {
188
+			} catch ( \InvalidArgumentException $e ) {
190 189
 				$this->io->writeln(array('<error>' . $e->getMessage() . '</error>', ''));
191 190
 
192 191
 				if ( $this->io->askConfirmation('Retry editing', false) ) {
@@ -250,8 +249,7 @@  discard block
 block discarded – undo
250 249
 
251 250
 		if ( $this->isGlobal() ) {
252 251
 			$this->io->writeln('Showing global settings' . $extra_title . ':');
253
-		}
254
-		else {
252
+		} else {
255 253
 			$this->io->writeln(
256 254
 				'Showing settings' . $extra_title . ' for <info>' . $this->getWorkingCopyPath() . '</info> path:'
257 255
 			);
Please login to merge, or discard this patch.
src/SVNBuddy/Command/LogCommand.php 1 patch
Braces   +10 added lines, -20 removed lines patch added patch discarded remove patch
@@ -174,8 +174,7 @@  discard block
 block discarded – undo
174 174
 			$revisions = $this->_revisionListParser->expandRanges($revisions);
175 175
 			$revisions_by_path = array_intersect($revisions_by_path, $revisions);
176 176
 			$missing_revisions = array_diff($revisions, $revisions_by_path);
177
-		}
178
-		elseif ( $bugs ) {
177
+		} elseif ( $bugs ) {
179 178
 			// Only show bug-related revisions on given path. The $missing_revisions is always empty.
180 179
 			$revisions_from_bugs = $revision_log->find('bugs', $bugs);
181 180
 			$revisions_by_path = array_intersect($revisions_by_path, $revisions_from_bugs);
@@ -197,15 +196,13 @@  discard block
 block discarded – undo
197 196
 
198 197
 		if ( $this->io->getOption('merges') ) {
199 198
 			$revisions_by_path = array_intersect($revisions_by_path, $revision_log->find('merges', 'all_merges'));
200
-		}
201
-		elseif ( $this->io->getOption('no-merges') ) {
199
+		} elseif ( $this->io->getOption('no-merges') ) {
202 200
 			$revisions_by_path = array_diff($revisions_by_path, $revision_log->find('merges', 'all_merges'));
203 201
 		}
204 202
 
205 203
 		if ( $this->io->getOption('merged') ) {
206 204
 			$revisions_by_path = array_intersect($revisions_by_path, $revision_log->find('merges', 'all_merged'));
207
-		}
208
-		elseif ( $this->io->getOption('not-merged') ) {
205
+		} elseif ( $this->io->getOption('not-merged') ) {
209 206
 			$revisions_by_path = array_diff($revisions_by_path, $revision_log->find('merges', 'all_merged'));
210 207
 		}
211 208
 
@@ -213,8 +210,7 @@  discard block
 block discarded – undo
213 210
 			throw new CommandException(
214 211
 				'No information about ' . implode(', ', $missing_revisions) . ' revision(-s).'
215 212
 			);
216
-		}
217
-		elseif ( !$revisions_by_path ) {
213
+		} elseif ( !$revisions_by_path ) {
218 214
 			throw new CommandException('No matching revisions found.');
219 215
 		}
220 216
 
@@ -223,8 +219,7 @@  discard block
 block discarded – undo
223 219
 		if ( $bugs || $revisions ) {
224 220
 			// Don't limit revisions, when provided explicitly by user.
225 221
 			$revisions_by_path_with_limit = $revisions_by_path;
226
-		}
227
-		else {
222
+		} else {
228 223
 			// Apply limit only, when no explicit bugs/revisions are set.
229 224
 			$revisions_by_path_with_limit = array_slice($revisions_by_path, 0, $this->getLimit());
230 225
 		}
@@ -339,8 +334,7 @@  discard block
 block discarded – undo
339 334
 					$merge_conflict_regexps
340 335
 				);
341 336
 				$row[] = $merge_conflict_predication ? '<error>' . count($merge_conflict_predication) . '</error>' : '';
342
-			}
343
-			else {
337
+			} else {
344 338
 				$merge_conflict_predication = array();
345 339
 			}
346 340
 
@@ -363,11 +357,9 @@  discard block
 block discarded – undo
363 357
 
364 358
 					if ( $path_action == 'A' ) {
365 359
 						$color_format = 'fg=green';
366
-					}
367
-					elseif ( $path_action == 'D' ) {
360
+					} elseif ( $path_action == 'D' ) {
368 361
 						$color_format = 'fg=red';
369
-					}
370
-					else {
362
+					} else {
371 363
 						$color_format = in_array($path_data['path'], $merge_conflict_predication) ? 'error' : '';
372 364
 					}
373 365
 
@@ -416,11 +408,9 @@  discard block
 block discarded – undo
416 408
 
417 409
 			if ( $path_action == 'A' ) {
418 410
 				$summary['added']++;
419
-			}
420
-			elseif ( $path_action == 'D' ) {
411
+			} elseif ( $path_action == 'D' ) {
421 412
 				$summary['removed']++;
422
-			}
423
-			else {
413
+			} else {
424 414
 				$summary['changed']++;
425 415
 			}
426 416
 		}
Please login to merge, or discard this patch.
src/SVNBuddy/Command/MergeCommand.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -178,12 +178,10 @@  discard block
 block discarded – undo
178 178
 
179 179
 		if ( $this->shouldMergeAll($revisions) ) {
180 180
 			$revisions = $this->_unmergedRevisions;
181
-		}
182
-		else {
181
+		} else {
183 182
 			if ( $revisions ) {
184 183
 				$revisions = $this->getDirectRevisions($revisions, $source_url);
185
-			}
186
-			elseif ( $bugs ) {
184
+			} elseif ( $bugs ) {
187 185
 				$revisions = $this->getRevisionLog($source_url)->find('bugs', $bugs);
188 186
 			}
189 187
 
@@ -198,8 +196,7 @@  discard block
 block discarded – undo
198 196
 
199 197
 		if ( $revisions ) {
200 198
 			$this->performMerge($source_url, $wc_path, $revisions);
201
-		}
202
-		elseif ( $this->_unmergedRevisions ) {
199
+		} elseif ( $this->_unmergedRevisions ) {
203 200
 			$this->runOtherCommand('log', array(
204 201
 				'path' => $this->repositoryConnector->getProjectUrl($source_url),
205 202
 				'--revisions' => implode(',', $this->_unmergedRevisions),
@@ -342,8 +339,7 @@  discard block
 block discarded – undo
342 339
 			$unmerged_bugs = $revision_log->getBugsFromRevisions($unmerged_revisions);
343 340
 			$error_msg = '<error>%d revision(-s) or %d bug(-s) not merged</error>';
344 341
 			$this->io->writeln(sprintf($error_msg, count($unmerged_revisions), count($unmerged_bugs)));
345
-		}
346
-		else {
342
+		} else {
347 343
 			$this->io->writeln('<info>Up to date</info>');
348 344
 		}
349 345
 
@@ -426,8 +422,7 @@  discard block
 block discarded – undo
426 422
 			foreach ( $revisions as $revision ) {
427 423
 				$revision_log->getRevisionData('summary', $revision);
428 424
 			}
429
-		}
430
-		catch ( \InvalidArgumentException $e ) {
425
+		} catch ( \InvalidArgumentException $e ) {
431 426
 			throw new CommandException($e->getMessage());
432 427
 		}
433 428
 
@@ -495,8 +490,7 @@  discard block
 block discarded – undo
495 490
 				'Path',
496 491
 				'Associated Revisions (before ' . $largest_suggested_revision . ')',
497 492
 			));
498
-		}
499
-		else {
493
+		} else {
500 494
 			$table->setHeaders(array(
501 495
 				'Path',
502 496
 				'Associated Revisions',
Please login to merge, or discard this patch.
src/SVNBuddy/Config/AbstractConfigSetting.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -143,8 +143,7 @@  discard block
 block discarded – undo
143 143
 				$this->_getScopedName(__METHOD__, $scope_bit),
144 144
 				$this->_defaultValue
145 145
 			);
146
-		}
147
-		else {
146
+		} else {
148 147
 			$value = null;
149 148
 
150 149
 			if ( $this->isWithinScope(self::SCOPE_WORKING_COPY) ) {
@@ -189,8 +188,7 @@  discard block
 block discarded – undo
189 188
 		if ( !isset($scope_bit) ) {
190 189
 			if ( $this->isWithinScope(self::SCOPE_WORKING_COPY) ) {
191 190
 				$scope_bit = self::SCOPE_WORKING_COPY;
192
-			}
193
-			else {
191
+			} else {
194 192
 				$scope_bit = self::SCOPE_GLOBAL;
195 193
 			}
196 194
 		}
Please login to merge, or discard this patch.
src/SVNBuddy/Exception/RepositoryCommandException.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,16 +58,14 @@
 block discarded – undo
58 58
 				// SVN 1.7+.
59 59
 				$error_code = $regs[1];
60 60
 				$error_message .= PHP_EOL . $regs[2];
61
-			}
62
-			elseif ( preg_match('/^svn\: (.*)$/', $line, $regs) ) {
61
+			} elseif ( preg_match('/^svn\: (.*)$/', $line, $regs) ) {
63 62
 				// SVN 1.6-.
64 63
 				if ( preg_match('/^\'(.*)\' is not a working copy$/', $regs[1]) ) {
65 64
 					$error_code = self::SVN_ERR_WC_NOT_WORKING_COPY;
66 65
 				}
67 66
 
68 67
 				$error_message .= PHP_EOL . $regs[1];
69
-			}
70
-			else {
68
+			} else {
71 69
 				$error_message .= ' ' . $line;
72 70
 			}
73 71
 		}
Please login to merge, or discard this patch.
src/SVNBuddy/Repository/Connector/Command.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -168,8 +168,7 @@
 block discarded – undo
168 168
 					PHP_EOL . '<fg=white;bg=magenta>[svn, ' . round($runtime, 2) . 's]: ' . $command_line . '</>'
169 169
 				);
170 170
 			}
171
-		}
172
-		catch ( ProcessFailedException $e ) {
171
+		} catch ( ProcessFailedException $e ) {
173 172
 			$process = $e->getProcess();
174 173
 
175 174
 			throw new RepositoryCommandException(
Please login to merge, or discard this patch.