*/
protected function describeInputArgument(InputArgument $argument, array $options = array())
{
- if (null !== $argument->getDefault() && (!is_array($argument->getDefault()) || count($argument->getDefault()))) {
+ if (null !== $argument->getDefault() && (!\is_array($argument->getDefault()) || \count($argument->getDefault()))) {
$default = sprintf('<comment> [default: %s]</comment>', $this->formatDefaultValue($argument->getDefault()));
} else {
$default = '';
}
$totalWidth = isset($options['total_width']) ? $options['total_width'] : Helper::strlen($argument->getName());
- $spacingWidth = $totalWidth - strlen($argument->getName());
+ $spacingWidth = $totalWidth - \strlen($argument->getName());
$this->writeText(sprintf(' <info>%s</info> %s%s%s',
$argument->getName(),
*/
protected function describeInputOption(InputOption $option, array $options = array())
{
- if ($option->acceptValue() && null !== $option->getDefault() && (!is_array($option->getDefault()) || count($option->getDefault()))) {
+ if ($option->acceptValue() && null !== $option->getDefault() && (!\is_array($option->getDefault()) || \count($option->getDefault()))) {
$default = sprintf('<comment> [default: %s]</comment>', $this->formatDefaultValue($option->getDefault()));
} else {
$default = '';
$this->writeText('<comment>Options:</comment>', $options);
foreach ($definition->getOptions() as $option) {
- if (strlen($option->getShortcut()) > 1) {
+ if (\strlen($option->getShortcut()) > 1) {
$laterOptions[] = $option;
continue;
}
}
// calculate max. width based on available commands per namespace
- $width = $this->getColumnWidth(call_user_func_array('array_merge', array_map(function ($namespace) use ($commands) {
+ $width = $this->getColumnWidth(\call_user_func_array('array_merge', array_map(function ($namespace) use ($commands) {
return array_intersect($namespace['commands'], array_keys($commands));
}, $namespaces)));
return 'INF';
}
- if (is_string($default)) {
+ if (\is_string($default)) {
$default = OutputFormatter::escape($default);
- } elseif (is_array($default)) {
+ } elseif (\is_array($default)) {
foreach ($default as $key => $value) {
- if (is_string($value)) {
+ if (\is_string($value)) {
$default[$key] = OutputFormatter::escape($value);
}
}