Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/updater.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/console/Helper/DescriptorHelper.php')
-rw-r--r--vendor/symfony/console/Helper/DescriptorHelper.php22
1 files changed, 8 insertions, 14 deletions
diff --git a/vendor/symfony/console/Helper/DescriptorHelper.php b/vendor/symfony/console/Helper/DescriptorHelper.php
index a53b476..3055bae 100644
--- a/vendor/symfony/console/Helper/DescriptorHelper.php
+++ b/vendor/symfony/console/Helper/DescriptorHelper.php
@@ -16,8 +16,8 @@ use Symfony\Component\Console\Descriptor\JsonDescriptor;
use Symfony\Component\Console\Descriptor\MarkdownDescriptor;
use Symfony\Component\Console\Descriptor\TextDescriptor;
use Symfony\Component\Console\Descriptor\XmlDescriptor;
-use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Exception\InvalidArgumentException;
+use Symfony\Component\Console\Output\OutputInterface;
/**
* This class adds helper method to describe objects in various formats.
@@ -29,11 +29,8 @@ class DescriptorHelper extends Helper
/**
* @var DescriptorInterface[]
*/
- private $descriptors = array();
+ private $descriptors = [];
- /**
- * Constructor.
- */
public function __construct()
{
$this
@@ -51,18 +48,16 @@ class DescriptorHelper extends Helper
* * format: string, the output format name
* * raw_text: boolean, sets output type as raw
*
- * @param OutputInterface $output
- * @param object $object
- * @param array $options
+ * @param object $object
*
* @throws InvalidArgumentException when the given format is not supported
*/
- public function describe(OutputInterface $output, $object, array $options = array())
+ public function describe(OutputInterface $output, $object, array $options = [])
{
- $options = array_merge(array(
+ $options = array_merge([
'raw_text' => false,
'format' => 'txt',
- ), $options);
+ ], $options);
if (!isset($this->descriptors[$options['format']])) {
throw new InvalidArgumentException(sprintf('Unsupported format "%s".', $options['format']));
@@ -75,10 +70,9 @@ class DescriptorHelper extends Helper
/**
* Registers a descriptor.
*
- * @param string $format
- * @param DescriptorInterface $descriptor
+ * @param string $format
*
- * @return DescriptorHelper
+ * @return $this
*/
public function register($format, DescriptorInterface $descriptor)
{