规范代码

This commit is contained in:
thinkphp
2016-12-24 21:37:05 +08:00
parent 81bde424be
commit 43b364e286
45 changed files with 106 additions and 195 deletions

View File

@@ -252,7 +252,7 @@ class Input
return $token;
}
return null;
return;
}
/**

View File

@@ -16,7 +16,6 @@ use think\console\Input;
use think\console\input\Argument as InputArgument;
use think\console\input\Option as InputOption;
use think\console\Output;
use think\console\helper\Descriptor as DescriptorHelper;
class Help extends Command
{
@@ -67,4 +66,4 @@ EOF
$this->command = null;
}
}
}

View File

@@ -50,7 +50,7 @@ class Schema extends Command
}
$output->writeln('<info>Succeed!</info>');
return;
} else if ($input->hasOption('table')) {
} elseif ($input->hasOption('table')) {
$table = $input->getOption('table');
if (!strpos($table, '.')) {
$dbName = Db::getConfig('database');

View File

@@ -196,7 +196,7 @@ class Console
private function getSttyColumns()
{
if (!function_exists('proc_open')) {
return null;
return;
}
$descriptorspec = [1 => ['pipe', 'w'], 2 => ['pipe', 'w']];
@@ -209,7 +209,7 @@ class Console
return $info;
}
return null;
return;
}
/**
@@ -234,7 +234,7 @@ class Console
return $matches[2] . 'x' . $matches[1];
}
}
return null;
return;
}
private function stringWidth($string)
@@ -356,10 +356,10 @@ class Console
{
if (DIRECTORY_SEPARATOR === '\\') {
return
'10.0.10586' === PHP_WINDOWS_VERSION_MAJOR . '.' . PHP_WINDOWS_VERSION_MINOR . '.' . PHP_WINDOWS_VERSION_BUILD
|| false !== getenv('ANSICON')
|| 'ON' === getenv('ConEmuANSI')
|| 'xterm' === getenv('TERM');
'10.0.10586' === PHP_WINDOWS_VERSION_MAJOR . '.' . PHP_WINDOWS_VERSION_MINOR . '.' . PHP_WINDOWS_VERSION_BUILD
|| false !== getenv('ANSICON')
|| 'ON' === getenv('ConEmuANSI')
|| 'xterm' === getenv('TERM');
}
return function_exists('posix_isatty') && @posix_isatty($stream);