Return a list of categorized things with the given input options and target.

@param InputInterface $input
@param \Reflector     $reflector
@param mixed          $target

@return array
349566
public function enumerate(InputInterface $input, \Reflector $reflector = null, $target = null)
    {
        $this->filter->bind($input);

        return $this->listItems($input, $reflector, $target);
    }
1254706
public function getOptionFromDboptions($option, InputInterface $input)
    {
        $dbOptionReturnValue = null;
        if (!empty($input->getOption('dboptions'))) {
            $dbOptions = explode(',', $input->getOption('dboptions'));
            if (is_array($dbOptions)) {
                foreach ($dbOptions as $dbOption) {
                    $dbOptionParts = explode(':', $dbOption);
                    if (!empty($dbOptionParts[1])) {
                        $dbOptionValue = $dbOptionParts[1];
                    }
                    if ($option === $dbOptionParts[0]) {
                        if (!empty($dbOptionValue)) {
                            $dbOptionReturnValue = $dbOptionValue;
                        } else {
                            $dbOptionReturnValue = true;
                        }
                    }
                }
            }
        }
        return $dbOptionReturnValue;
    }
1348633
static public function parseTarget($target)
  {
    $target_name = 'drush';
    $target_data = $target;
    if (strpos($target, ':') !== FALSE) {
      list($target_name, $target_data) = explode(':', $target, 2);
    }
    return [$target_name, $target_data];
  }
1067356
private static function formatModifiers(\Reflector $reflector)
    {
        if ($reflector instanceof \ReflectionClass && $reflector->isTrait()) {
            // For some reason, PHP 5.x returns `abstract public` modifiers for
            // traits. Let's just ignore that business entirely.
            if (\version_compare(PHP_VERSION, '7.0.0', '<')) {
                return [];
            }
        }

        return \implode(' ', \array_map(function ($modifier) {
            return \sprintf('<keyword>%s</keyword>', $modifier);
        }, \Reflection::getModifierNames($reflector->getModifiers())));
    }
20904
private function resolveMethodDependencies(\ReflectionFunctionAbstract $reflector)
    {
        $parameters = [];
        foreach ($reflector->getParameters() as $key => $parameter) {
            $class = $parameter->getClass();
            if ($class) {
                //Request
                $instance = app()->make($class->name);

                if ($instance instanceof FormRequest) {
                    if ($instance->authorize()) {
                        $instance->validate();
                    } else {
                        $instance->forbiddenResponse();
                    }
                }

                array_splice(
                    $parameters, $key, 0, [$instance]
                );
            }
        }

        return $parameters;
    }
631530
protected function getCommandArguments(InputInterface $input)
    {
        $package = $this->getPackageInformation($input->getOption('package'));

        return [
            $this->getComposer(),
            $this->composerOperation,
            $package,
        ];
    }
363421
public static function reflectorFactory(Reflector $reflector) {
    $args = func_get_args();
    $g = new static($args[1]);
    $g->elevate($args[0]);
    return $g;
  }
370694
protected function getAnnotations(Reflector $reflector): array
    {
        switch (true) {
            case ($reflector instanceof ReflectionClass):
                return $this->annotationReader->getClassAnnotations($reflector);

            case ($reflector instanceof ReflectionMethod):
                return $this->annotationReader->getMethodAnnotations($reflector);

            case ($reflector instanceof ReflectionProperty):
                return $this->annotationReader->getPropertyAnnotations($reflector);

            default:
                throw new InvalidArgumentException('Unsupported reflection point ' . get_class($reflector));
        }
    }
802291
protected function mapReflectorToDescriptor($reflector, $descriptor)
    {
        $descriptor->setFullyQualifiedStructuralElementName($reflector->getName() . '()');
        $descriptor->setName($reflector->getShortName());
        $descriptor->setVisibility($reflector->getVisibility() ? : 'public');
        $descriptor->setFinal($reflector->isFinal());
        $descriptor->setAbstract($reflector->isAbstract());
        $descriptor->setStatic($reflector->isStatic());
        $descriptor->setLine($reflector->getLinenumber());
    }
210929
protected function getPropertyValues(ReflectionClass $reflector, $object, $level)
    {
        $result = "";
        $indenting = str_repeat($this->config["array_indenting"], $level);

        foreach ($reflector->getProperties() as $property) {
            // Make the property readable (accessible) and then read its value.
            $property->setAccessible(true);

            // The issue fix: possible StackOverflowException.
            if (is_object($propertyValue = $property->getValue($object))) {
                $dumpedValue = $this->getGeneralObjectInfo($propertyValue);
            } else {
                $dumpedValue = $this->dump($propertyValue);
            }

            // Indent the output if it's an array.
            if (is_array($propertyValue)) {
                $lines = [];

                foreach (explode(PHP_EOL, $dumpedValue) as $line) {
                    if ($line !== "[") {
                        $lines[] = $indenting . $line;
                    } else {
                        $lines[] = $line;
                    }
                }

                $dumpedValue = implode(PHP_EOL, $lines);
            }

            $result .= sprintf(
                $indenting . "%s: %s" . PHP_EOL,
                $property->getName(),
                $dumpedValue
            );
        }

        return $result;
    }
191551
protected function getProperties($showAll, \Reflector $reflector, $noInherit = false)
    {
        $className = $reflector->getName();

        $properties = [];
        foreach ($reflector->getProperties() as $property) {
            if ($noInherit && $property->getDeclaringClass()->getName() !== $className) {
                continue;
            }

            if ($showAll || $property->isPublic()) {
                $properties[$property->getName()] = $property;
            }
        }

        \ksort($properties, SORT_NATURAL | SORT_FLAG_CASE);

        return $properties;
    }
947735
public function execute(InputInterface $input, OutputInterface $output)
    {
        $filters = array();

        foreach ($input->getOption('name') as $name) {
            $filters[] = new NameFilter($name);
        }

        foreach ($input->getOption('tags') as $tags) {
            $filters[] = new TagFilter($tags);
        }

        if ($role = $input->getOption('role')) {
            $filters[] = new RoleFilter($role);
        }

        if (count($filters)) {
            $this->gherkin->setFilters($filters);
        }
    }
949306
public function process(StorableFileInterface $source, TargetInterface $target, array $options = [])
    {
        $stored = [
            static::ORIGINAL => $this->storage->store($source, $target->original()),
        ];

        if (array_key_exists(static::CONFIG_VARIANTS, $options)) {
            foreach ($options[ static::CONFIG_VARIANTS ] as $variant => $variantOptions) {

                $stored[ $variant ] = $this->processVariant($source, $target, $variant, $variantOptions);
            }
        }

        return $stored;
    }
170117
public function getAnnotations(\Reflector $Reflection)
    {
        $doc = $Reflection->getDocComment();
        if ($this->cache) {
            $key = $this->cache->getKey($doc);
            $ast = $this->cache->get($key);
            if (! $ast) {
                $ast = $this->parser->parse($doc);
                $this->cache->set($key, $ast);
            }
        } else {
            $ast = $this->parser->parse($doc);
        }

        return new AnnotationsBag($ast);
    }
626757
public function transmute(InputDescriptor $input, $targetFormat)
    {
        if (!in_array($targetFormat, array('image', 'audio', 'video', 'flash', 'text'))) {
            return null;
        }

        $mediaType = $this->mediaTypeManager->find($input->getMediaType());

        return $this->extractor->extract($input, $mediaType, $targetFormat);
    }
766009
private static function formatFunctionParams(\ReflectionFunctionAbstract $reflector)
    {
        $params = [];
        foreach ($reflector->getParameters() as $param) {
            $hint = '';
            try {
                if ($param->isArray()) {
                    $hint = '<keyword>array</keyword> ';
                } elseif ($class = $param->getClass()) {
                    $hint = \sprintf('<class>%s</class> ', $class->getName());
                }
            } catch (\Exception $e) {
                // sometimes we just don't know...
                // bad class names, or autoloaded classes that haven't been loaded yet, or whathaveyou.
                // come to think of it, the only time I've seen this is with the intl extension.

                // Hax: we'll try to extract it :P

                // @codeCoverageIgnoreStart
                $chunks = \explode('$' . $param->getName(), (string) $param);
                $chunks = \explode(' ', \trim($chunks[0]));
                $guess  = \end($chunks);

                $hint = \sprintf('<urgent>%s</urgent> ', $guess);
                // @codeCoverageIgnoreEnd
            }

            if ($param->isOptional()) {
                if (!$param->isDefaultValueAvailable()) {
                    $value     = 'unknown';
                    $typeStyle = 'urgent';
                } else {
                    $value     = $param->getDefaultValue();
                    $typeStyle = self::getTypeStyle($value);
                    $value     = \is_array($value) ? 'array()' : \is_null($value) ? 'null' : \var_export($value, true);
                }
                $default = \sprintf(' = <%s>%s</%s>', $typeStyle, OutputFormatter::escape($value), $typeStyle);
            } else {
                $default = '';
            }

            $params[] = \sprintf(
                '%s%s<strong>$%s</strong>%s',
                $param->isPassedByReference() ? '&' : '',
                $hint,
                $param->getName(),
                $default
            );
        }

        return $params;
    }
820841
public static function findFiles(InputInterface $input)
    {
        if ($input->hasParameterOption('--config-file')) {
            $file = $input->getParameterOption('--config-file');
            if (file_exists($file)) {
                return [$file];
            }

            throw new ConfigurationFileNotFoundException(
                sprintf("Couldn't find the configuration file: %s", $file)
            );
        }

        $format = $input->hasParameterOption('--config-format')
            ? $input->getParameterOption('--config-format')
            : static::$DEFAULT_TYPE
        ;

        return [
            sprintf("%s.%s", static::$NAME, $format),
            sprintf("%s.%s.dist", static::$NAME, $format)
        ];
    }