@param string $name
@param string $param
@param mixed  $class
@param mixed  $method
@param mixed  $default

@return mixed
169142
static function getAnnotationParam($name, $param, $class, $method = NULL, $default = NULL)
	{
		$annotation = self::getAnnotation($name, $class, $method, TRUE);

		return NULL === $annotation || !isset($annotation->{$param})
			? $default
			: $annotation->{$param};
	}
1234693
protected function getParam($name, $defaultValue = null)
    {
        return $this->requestMethod == self::REQUEST_METHOD_GET ?
            Yii::$app->request->getQueryParam($name, $defaultValue) :
            Yii::$app->request->getBodyParam($name, $defaultValue);
    }
718854
protected function objectBuild($name, $method)
    {
        if (!$this->hasInstance($name))
        {
            $this->instances[$name] = $this->init($method);
        }

        return $this->instances[$name];
    }
962315
protected function processMethodParams(array $method, string $file, string $name)
    {
        if (!empty($method['docblock']['inheritdoc'])) {
            return;
        }

        foreach ($method['params'] as $param => $type) {
            if (is_array($type)) {
                $type = implode('|', $type);
            }

            if (!isset($method['docblock']['params'][$param])) {
                $this->warnings[] = [
                    'type' => 'param-missing',
                    'file' => $file,
                    'class' => $name,
                    'method' => $name,
                    'line' => $method['line'],
                    'param' => $param,
                ];

                return;
            }

            if (empty($type)) {
                return;
            }

            $paramType = $method['docblock']['params'][$param];
            if ($paramType !== $type) {
                if (!($type == 'array' && substr($paramType, -2) == '[]')) {
                    $this->warnings[] = [
                        'type' => 'param-mismatch',
                        'file' => $file,
                        'class' => $name,
                        'method' => $name,
                        'line' => $method['line'],
                        'param' => $param,
                        'param-type' => $type,
                        'doc-type' => $method['docblock']['params'][$param],
                    ];
                }
            }
        }
    }
703696
public function getParameter($name, $default = null)
    {
        try {
            return ArrayHelper::get($this->getParameters(), $name, $default);
        } catch (Exception $ex) {
            return $default;
        }
    }
395015
protected function autoWireMethod(string $name, ReflectionMethod $method, array $config, ?array $parameters = null): array
    {
        $params = $method->getParameters();
        $args = [];

        foreach ($params as $param) {
            $type = $param->getClass();
            $param_name = $param->getName();

            if (isset($parameters[$param_name])) {
                $args[$param_name] = $parameters[$param_name];
            } elseif (isset($config['arguments'][$param_name])) {
                $args[$param_name] = $this->parseParam($config['arguments'][$param_name], $name);
            } elseif (null !== $type) {
                $args[$param_name] = $this->resolveServiceArgument($name, $type, $param);
            } elseif ($param->isDefaultValueAvailable()) {
                $args[$param_name] = $param->getDefaultValue();
            } elseif ($param->allowsNull()) {
                $args[$param_name] = null;
            } else {
                throw new Exception\InvalidConfiguration('no value found for argument '.$param_name.' in method '.$method->getName().' for service '.$name);
            }

            if (!$param->canBePassedByValue()) {
                $value = &$args[$param_name];
                $args[$param_name] = &$value;
            }
        }

        return $args;
    }
495378
public MetaMethod getMethod(String name, Class[] parameters) {
        return impl.pickMethod(name, parameters);
    }
425629
public function getParam($name, $default = null, $optional = false)
    {
        if (isset($this->params[$name])) {
            return $this->params[$name];
        } elseif (!$optional) {
            throw new InvalidParameterException("Parameter '{$name}' is missing or invalid");
        } else {
            return $default;
        }
    }
1349620
protected function getParameter($name, $default = null)
    {
        return array_key_exists($name, $this->params)?$this->params[$name]:$default;
    }
1360506
public function getParam($name, $default = null)
    {
        if (\is_array($this->params)) {
            // Check in params that are arrays or implement array access
            return $this->params[$name] ?? $default;
        } elseif (\is_object($this->params)) {
            // Check in normal objects
            return $this->params->{$name} ?? $default;
        } else {
            // Wrong type, return default value
            return $default;
        }
    }
562979
private function getParamValue(RefClass $refClass, $method, $param)
    {
        if (!isset($refClass->methods[$method])) {
            throw new MarkupException(sprintf('method %s::%s() does not exist', $refClass->name, $method));
        }

        $refMethod = $refClass->methods[$method];

        if (!isset($refMethod->params[$param])) {
            throw new MarkupException(sprintf(
                'param %s in method %s::%s() does not exist',
                $param,
                $refClass->name,
                $method
            ));
        }

        return $refMethod->params[$param]->default;
    }
1292020
public function getPartial(array $name, array $params = array())
	{
		list($class, $method) = $name;
		$obj = $this->container->resolve($class);
		return call_user_func_array([$obj, $method], $params);
	}
67722
public function getOrApply(string $name, $default = null, ...$param)
    {
        if (! $this->has($name)) {
            call_user_func_array([$this, 'set'], func_get_args());
        }

        if (isset($this->called[$name]['called'])) {
            $this->called[$name] = [
                'value' => call_user_func_array([$this->hook, 'apply'], $this->called[$name]['value'])
            ];
        }

        return $this->called[$name]['value'];
    }
29558
public function param($param, $default = null)
	{
		if ( ! isset($this->named_params[$param]))
		{
			return \Fuel::value($default);
		}

		return $this->named_params[$param];
	}
455180
public function getRequestParameter($name, $defaultValue = null)
    {
        if (isset($_POST[$name])) {
            $value = $_POST[$name];
        } elseif (isset($_GET[$name])) {
            $value = $_GET[$name];
        } else {
            $value = $defaultValue;
        }

        return $value;
    }
1237658
private function createCreateMockCall(Param $param, Name $name): ?Expression
    {
        /** @var Class_ $classNode */
        $classNode = $param->getAttribute(AttributeKey::CLASS_NODE);

        $classMocks = $this->phpSpecMockCollector->resolveClassMocksFromParam($classNode);

        $variable = $this->getName($param->var);
        $method = $param->getAttribute(AttributeKey::METHOD_NAME);

        $methodsWithWThisMock = $classMocks[$variable];

        // single use: "$mock = $this->createMock()"
        if (! $this->phpSpecMockCollector->isVariableMockInProperty($param->var)) {
            return $this->createNewMockVariableAssign($param, $name);
        }

        $reversedMethodsWithThisMock = array_flip($methodsWithWThisMock);

        // first use of many: "$this->mock = $this->createMock()"
        if ($reversedMethodsWithThisMock[$method] === 0) {
            return $this->createPropertyFetchMockVariableAssign($param, $name);
        }

        return null;
    }
58402
static function hasAnnotation($name, $class, $method = NULL)
	{
		return NULL !== self::getAnnotation($name, $class, $method, TRUE);
	}