Permalink
Browse files

More whitespaces and DocBlock.

  • Loading branch information...
1 parent e1109d2 commit e11ad6180b56806abf183892d5b30ea18d3a27be @opi99 opi99 committed Aug 8, 2013
Showing with 17 additions and 9 deletions.
  1. +17 −9 VersionControl/SVN/Command.php
@@ -101,8 +101,8 @@
public $svn_path = '';
/**
- * String to prepend to command string. Helpful for setting exec()
- * environment variables, such as:
+ * String to prepend to command string. Helpful for setting exec()
+ * environment variables, such as:
* export LANG=en_US.utf8 &&
* ... to support non-ASCII file and directory names.
*
@@ -127,7 +127,7 @@
public $requiredSwitches = array();
/**
- * Runtime options being used.
+ * Runtime options being used.
*
* @var array $options
*/
@@ -151,7 +151,7 @@
public $minArgs = 0;
/**
- * Preferred fetchmode. Note that not all subcommands have output available for
+ * Preferred fetchmode. Note that not all subcommands have output available for
* each preferred fetchmode. The default cascade is:
*
* VERSIONCONTROL_SVN_FETCHMODE_ASSOC
@@ -371,6 +371,14 @@ protected function preProcessSwitches()
$this->fillSwitch('config-option', $this->configOption);
}
+ /**
+ * Fills the switches array on given name with value if not already set and value is not null.
+ *
+ * @param string $switchName Name of the switch.
+ * @param string $value Value for the switch.
+ *
+ * @return void
+ */
protected function fillSwitch($switchName, $value)
{
if (!isset($this->switches[$switchName])
@@ -395,7 +403,7 @@ public function checkCommandRequirements()
$params['args'] = $this->args;
$params['commandName'] = $this->commandName;
$params['cmd'] = '';
-
+
// Check for minimum arguments
if (sizeof($this->args) < $this->minArgs) {
throw new VersionControl_SVN_Exception(
@@ -418,7 +426,7 @@ public function checkCommandRequirements()
}
}
if (!$found) {
- $missing[] = '('.$req.')';
+ $missing[] = '(' . $req . ')';
}
}
$num_missing = count($missing);
@@ -437,7 +445,7 @@ public function checkCommandRequirements()
* @param array $args Arguments to pass to Subversion
* @param array $switches Switches to pass to Subversion
*
- * @return mixed $fetchmode specified output on success.
+ * @return mixed $fetchmode specified output on success.
* @throws VersionControl_SVN_Exception If command failed.
*/
public function run($args = array(), $switches = array())
@@ -511,8 +519,8 @@ public function run($args = array(), $switches = array())
*
* @param array $out Array of output captured by exec command in {@link run}
*
- * @return mixed Returns output requested by fetchmode (if available), or
- * raw output if desired fetchmode is not available.
+ * @return mixed Returns output requested by fetchmode (if available), or
+ * raw output if desired fetchmode is not available.
*/
public function parseOutput($out)
{

0 comments on commit e11ad61

Please sign in to comment.