Get the number of required parameters that a function defines.

@return int The number of required parameters
548816
public function getNumberOfRequiredParameters()
    {
        $parameters = $this->getParameters();
        $required   = 0;

        foreach ($parameters as $param) {
            if (!$param->isOptional()) {
                $required++;
            }
        }
        return $required;
    }
961216
private function getFunctionName(): string
    {
        if (!$this->functionName) {
            $this->functionName = $this->loadFunctionName();
        }

        return $this->functionName;
    }
681883
public function countVariables()
	{
		$total	= 0;
		foreach( $this->methods as $method => $data )
			foreach( $this->methods[$method]['variables'] as $variable => $count )
				$total++;
		return $total;
	}
748882
public function get_param_validation() {
        switch ($this->vtype) {
            case self::IS_BOOLEAN:
                return PARAM_BOOL;
            case self::IS_INTEGER:
                return PARAM_INT;
            case self::IS_FILENAME:
                return PARAM_FILE;
            case self::IS_PATH:
                return PARAM_PATH;
            case self::IS_TEXT:
                return PARAM_TEXT;
        }
        return null;
    }
1257662
protected function getParametersFile()
    {
        $file_name = $this->appDir . '/config/' . self::PARAMETERS_FILE . '.php';
        if (!file_exists($file_name)) {
            return [];
        }

        if (null === $this->parameters) {
            foreach (require($file_name) as $k => $v) {
                $this->parameters["%{$k}%"] = $v;
            }
        }
        return $this->parameters;
    }
783075
function get_line_num(){
		if( ! isset($this->l) ){
			if( isset($this->children[0]) ){
				$this->l = $this->children[0]->get_line_num();
			}
			else {
				$this->l = 0;
			}
		}
		return $this->l;
	}
618470
public function getParametersArray()
    {
        $result = parent::getParametersArray();

        if (!empty($this->getRole())) {
            $result['f_role'] = $this->getRole();
        }

        return $result;
    }
738549
public function _getRequiredParamsCount($paramsDef)
    {
        $result = 0;
        if ($paramsDef) {
            $result = 1;
            $commas = substr_count($paramsDef, ',');
            $equals = substr_count($paramsDef, '=');
            $result += ($commas - $equals);
        }
        return $result;
    }
485475
private function _checkUnusedFunctionParameters() {
		if ($this->_isActive('checkUnusedFunctionParameters')) {

			// If the docblock is inherited, this means that the function implements a parent function
			// We may have some unused parameters in this case, we don't generate a warnings
			if (!$this->statementStack->getParentStackItem()->docblocInheritDoc) {

				foreach ($this->_functionParameters as $variableName => $value) {
					if ($value !== "used") {
						$msg = $this->_getMessage('UNUSED_FUNCTION_PARAMETER', $this->_currentFunctionName, $variableName);
						$this->_writeError('checkUnusedFunctionParameters', $msg);
					}
				}
			}
		}
	}
5771
public int getNumParameters() {
        int count = 0;
        for (Iterator<String> i = parameterSignatureIterator(); i.hasNext();) {
            i.next();
            ++count;
        }
        return count;
    }
98655
function getPageCount() {
		if (!$this->limit) {
			return 1;
		}
		$rem = ($this->getTotal() % $this->limit);
		$rem = ($rem >= 0) ? $rem : 0;
		$total_pages = ($this->getTotal() - $rem) / $this->limit;
		if ($rem)
			$total_pages++;
		return $total_pages;
	}
1037860
public function getParams()
    {
        $filters = array_filter($this->filters, function ($value) {
            return $value !== null;
        });

        $filters = array_map(function ($value) {
            return is_array($value) ? ['value' => $value, 'operator' => 'IN'] : $value;
        }, $filters);

        return count($filters) ? ['filter' => $filters] : [];
    }
619854
public function getCount()
    {
        /** @var Count $constraint */
        if ($constraint = $this->docBlockUtility->getConstraint($this->property, Count::class)) {
            return [
                'min' => $constraint->min,
                'max' => $constraint->max,
            ];
        }
    }
291976
protected function getFindMethodAndParameters()
    {
        $method = '';
        $parameters = [];

        switch ($this->type) {
            case 'string':
                $method = 'get';
                break;
            case 'list':
                $method = 'lrange';
                $parameters = [0, -1];
                break;
            case 'set':
                $method = 'smembers';
                break;
            case 'zset':
                $method = 'zrange';
                $parameters = [0, -1];
                break;
            case 'hash':
                $method = 'hgetall';
                break;
            default:
                break;
        }

        return [$method, $parameters];
    }
162331
public function getParameterValues()
    {
        $values = array();

        foreach ($this->parameters as $name => $parameter) {
            if (!$parameter->isRequired()) {
                $values[$name] = $parameter->getDefaultValue();
            }
        }

        return $values;
    }
193995
public function getParams()
    {
        $params = array(
            'compilation_level' => $this->getMode(),
            'output_format'     => 'xml',
            'warning_level'     => $this->getWarningLevel(),
            'output_info_1'     => 'compiled_code',
            'output_info_2'     => 'statistics',
            'output_info_3'     => 'warnings',
            'output_info_4'     => 'errors',
        );

        $formattingOptions = $this->getFormattingOptions();

        if ($formattingOptions->getPrettyPrintEnabled()) {
            $params['formatting'] = 'pretty_print';
        }

        if ($formattingOptions->getPrintInputDelimiterEnabled()) {
            $params['formatting'] = 'print_input_delimiter';
        }

        if (count($this->scripts) > 0) {
            $params['js_code'] = implode("\n\n", $this->scripts);
        }

        foreach ($this->files as $key => $file) {
            $params['code_url_' . $key] = $file;
        }

        return $params;
    }
493077
public function parameterize($method)
    {
        $parameterArray = array();
        switch ($method) {
            case 'create':
                $parameterArray['Identifier'] = $this->getIdentifier();
                break;
            case 'update':
                $parameterArray['Identifier'] = $this->getIdentifier();
                break;
            case 'delete':
                break;
            case 'getOne':
                $parameterArray['count'] = 1;
                $parameterArray['offset'] = 0;
                break;
            case 'getAll':
                $parameterArray = $this->getFilter();
                break;
        }

        return $parameterArray;
    }