Skip to content

Commit

Permalink
Fixing coding style.
Browse files Browse the repository at this point in the history
  • Loading branch information
fitorec authored and markstory committed Jun 11, 2012
1 parent 207b918 commit c090845
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/Cake/Console/Command/Task/ModelTask.php
Expand Up @@ -171,7 +171,7 @@ public function inOptions($options, $prompt = null, $default = null) {
while (!$valid) {
$len = strlen((count($options)+1));
foreach ($options as $i => $option) {
$this->out(sprintf("%${len}d. %s", $i+1, $option));
$this->out(sprintf("%${len}d. %s", $i + 1, $option));
}
if (empty($prompt)) {
$prompt = __d('cake_console', 'Make a selection from the choices above');
Expand Down Expand Up @@ -410,11 +410,11 @@ public function fieldValidation($fieldName, $metaData, $primaryKey = 'id') {
$this->out(__d('cake_console', 'Please select one of the following validation options:'));
$this->hr();

for ($i = 1, $m=$defaultChoice/2; $i < $m; $i++) {
$str_aux = sprintf("%2d. %s", $i, $this->_validations[$i]);
$str_aux = $str_aux.str_repeat(" ", 31 - strlen($str_aux));
$str_aux .= sprintf("%2d. %s", $m+$i, $this->_validations[$m+$i]);
$this->out($str_aux);
for ($i = 1, $m = $defaultChoice / 2; $i < $m; $i++) {
$strAux = sprintf("%2d. %s", $i, $this->_validations[$i]);
$strAux = $strAux.str_repeat(" ", 31 - strlen($strAux));
$strAux .= sprintf("%2d. %s", $m + $i, $this->_validations[$m + $i]);
$this->out($strAux);
}
$this->out(__d('cake_console', "%s - Do not do any validation on this field.", $defaultChoice));
$this->hr();
Expand Down Expand Up @@ -846,9 +846,9 @@ public function listAll($useDbConfig = null) {
}
if ($this->interactive === true) {
$this->out(__d('cake_console', 'Possible Models based on your current database:'));
$len = strlen(($count+1));
$len = strlen(($count + 1));
for ($i = 0; $i < $count; $i++) {
$this->out(sprintf("%${len}d. %s", $i+1, $this->_modelNames[$i]));
$this->out(sprintf("%${len}d. %s", $i + 1, $this->_modelNames[$i]));
}
}
return $this->_tables;
Expand Down

0 comments on commit c090845

Please sign in to comment.