Get a declaration of the param for cli command;
@param \ReflectionParameter $param
@return string
355014
protected function paramDetails(\ReflectionParameter $param) {
        return ' ' . ($param->isOptional() ? '[' : '') . '--' . $param->getName() . ($param->isOptional() ? '=' . ($param->isDefaultValueConstant() ? $param->getDefaultValueConstantName() : '"' . $param->getDefaultValue() . '"') : '') . ($param->isOptional() ? ']' : '');
    }
722297
protected static function __getType($param)
    {
        $type = is_object($param)
            ? get_class($param)
            : gettype($param);

        return $type === 'integer' ? 'int' : $type;
    }
652022
public function call($param = null)
    {
        // get the class within the correct namespace
        // initiate object
        $object = $this->prepareObject(new $this->class());

        $return    = new \SplFixedArray(2);
        $return[1] = $object;

        if (!empty($this->method)) {
            if (!empty($param) && !empty($this->param)) {
                $return[0] = $object->{$this->method}(array_merge((array)$this->param, (array)$param));

                return $return;
            }
            $return[0] = $object->{$this->method}();

            return $return;
        }

        return $return;
    }
1158945
protected function findCommand(\ReflectionMethod $reflectionMethod)
    {
        $parameters = $reflectionMethod->getParameters();

        /** @var \ReflectionParameter $parameter */
        foreach ($parameters as $parameter) {
            $class = $parameter->getClass();

            if (null !== $class && true === $class->implementsInterface('RomaricDrigon\OrchestraBundle\Domain\Command\CommandInterface')) {
                return $class->getName();
            }
        }

        return null;
    }
1105260
protected function getDeclaringFunction(ReflectionParameter $parameter): string
	{
		$declaringFunction = $parameter->getDeclaringFunction();

		if($declaringFunction->isClosure())
		{
			return 'Closure';
		}

		if(($class = $parameter->getDeclaringClass()) === null)
		{
			return $declaringFunction->getName();
		}

		return $class->getName() . '::' . $declaringFunction->getName();
	}
430667
protected function getQueryParam(string $param) : ?string
    {
        if ($this->queryParams === null) {
            $this->parseQueryParams();
        }
        return $this->queryParams[$param] ?? null;
    }
1171288
public function getParam($param)
    {
        if (isset($this->_parentConfig))
            return ($this->_parentConfig->getParam($param));
        return (isset($this->_params[$param]) ? $this->_params[$param] : null);
    }
252448
public function getParam($param)
    {
        $value = $this->getGravParam($param);
        if ($value === null) {
            $value = $this->getQueryParam($param);
        }

        return $value;
    }
1193909
public static function getDefaultValue($param = null)
    {
        $result = null;

        if (empty($param)) {
            return static::$defaults;
        }

        if (isset(static::$defaults[$param])) {
            $result = static::$defaults[$param];
        }

        return $result;
    }
355048
final protected function getValueFromParam(string $param)
  {
    if (preg_match(self::$regEx['match'], $param)) {
      $arg = preg_filter(self::$regEx['filter'], '', $param);
      if (preg_match(self::$regEx['config'], $arg)) {
        return $this->getValueFromConfig($arg);
      } elseif (preg_match(self::$regEx['array'], $arg)) {
        return $this->getValueFromArray($arg);
      } else {
        return Fixtures::get($arg);
      }
    } else {
      return $param;
    }
  }
431423
private function initCommand($param)
    {
        if (!preg_match('/^[a-z]+:[a-z]+$/', $param)) {
            $this->options['command'] = $param;

            return;
        }
        
        $part = explode(':', $param);

        $this->options['command'] = $part[0];

        $this->options['action'] = $part[1];
    }
986453
public function getDirective($param)
    {
        $directives = $this->getDirectives();

        return isset($directives[$param]) ? $directives[$param] : null;
    }
762891
public function list_commands($param = []){
    //Prepping, processing and validating the create user parameters
    $param = $this->process_parameters($param);
    //Setting the last action performed
    $this->last_action = "list-commands";

    //Defining  the $url_part and the command to be executed
    $url_part = "list-commands";
    if (isset($param['short'])){//short parameter is set
      $url_part .= "&short";
    }

    if (isset($param['nameonly'])){//nameonly parameter is set
      $url_part .= "&nameonly";
    }
    //Concatenating the closing single quote
    $url_part .="'";
    //Concatenating the header url and $url_part to create the full url to be executed
    $url_part = $this->get_header_url() . $url_part;

    //test
    $uid = $this->hostname;
    if ( !empty($param) ){
      $uid .= md5(json_encode($param));
    }

    if ( $this->cache_has($uid, 'list_commands') ){
      $result_call = $this->cache_get($uid, 'list_commands');
    }
    else {
      $result_call = $this->call_shell_exec($url_part);
      $this->cache_set($uid, 'list_commands', $result_call);
    }
    return $result_call;
  }
1105361
private function getMappedVerticalAlign(string $param) : string
    {
        switch($param) {
            case 'top':
                $align = Style\Alignment::VERTICAL_TOP;
                break;
            case 'middle':
                $align = Style\Alignment::VERTICAL_CENTER;
                break;
            case 'bottom':
                $align = Style\Alignment::VERTICAL_BOTTOM;
                break;
            default:
                $align = Style\Alignment::VERTICAL_CENTER;
        }

        return $align;
    }
309548
private function formatParameter(ReflectionParameter $parameter): string
    {
        return $parameter->hasType() ?
            sprintf('%s $%s', $parameter->getType(), $parameter->getName()) :
            sprintf('$%s', $parameter->getName());
    }
569341
private function getDefaultValue(\ReflectionParameter $param)
    {
        if ($param->isDefaultValueAvailable()) {
            if (method_exists($param, 'isDefaultValueConstant') && $param->isDefaultValueConstant()) {
                $constName = $param->getDefaultValueConstantName();
                if (false !== strpos($constName, '::')) {
                    list($class, $const) = explode('::', $constName);
                    if (in_array($class, ['self', 'static'])) {
                        $constName = $param->getDeclaringClass()->getName().'::'.$const;
                    }
                }

                return $constName;
            }

            return $this->phpEncodeValue($param->getDefaultValue());
        }

        return 'null';
    }
245446
protected static function paramToString($param)
    {
        if (is_string($param)) {
            return '"' . $param . '"';
        }

        if (is_numeric($param)) {
            return $param;
        }

        if (is_null($param)) {
            return 'NULL';
        }

        if (is_bool($param)) {
            return $param ? 'TRUE' : 'FALSE';
        }

        if (is_resource($param)) {
            return '#resource';
        }

        if (is_callable($param)) {
            if (is_string($param)) {
                return $param;
            }

            if (is_array($param)) {
                if (is_string($param[0])) {
                    return $param[0] . '::' . $param[1];
                } else {
                    return get_class($param[0]) . '->' . $param[1];
                }
            }

            return 'Closure';
        }

        if (is_array($param)) {
            return 'Array(' . count($param) . ')';
        }

        if (is_object($param)) {
            return get_class($param);
        }

        return 'unknown';
    }