You are here

private function TextDescriptor::formatDefaultValue in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Descriptor/TextDescriptor.php \Symfony\Component\Console\Descriptor\TextDescriptor::formatDefaultValue()

Formats input option/argument default value.

Parameters

mixed $default:

Return value

string

2 calls to TextDescriptor::formatDefaultValue()
TextDescriptor::describeInputArgument in vendor/symfony/console/Descriptor/TextDescriptor.php
Describes an InputArgument instance.
TextDescriptor::describeInputOption in vendor/symfony/console/Descriptor/TextDescriptor.php
Describes an InputOption instance.

File

vendor/symfony/console/Descriptor/TextDescriptor.php, line 236

Class

TextDescriptor
Text descriptor.

Namespace

Symfony\Component\Console\Descriptor

Code

private function formatDefaultValue($default) {
  if (PHP_VERSION_ID < 50400) {
    return str_replace('\\/', '/', json_encode($default));
  }
  return json_encode($default, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
}