MCPcopy Create free account
hub / github.com/brainboxdotcc/DPP / getFullParameters

Function getFullParameters

buildtools/make_struct.php:155–164  ·  view source on GitHub ↗

* @brief Get parameters of a function with defaults * @param string $currentFunction Current function name * @param array $parameters Parameter names * @return string Parameter list */

(string $currentFunction, array $parameters)

Source from the content-addressed store, hash-verified

153 * @return string Parameter list
154 */
155function getFullParameters(string $currentFunction, array $parameters): string
156{
157 global $header;
158 foreach ($header as $line) {
159 if (preg_match('/^\s*void\s+' . $currentFunction . '\s*\((.*' . join('.*', $parameters) . '.*)command_completion_event_t\s*callback\s*/', $line, $matches)) {
160 return preg_replace('/,\s*$/', '', $matches[1]);
161 }
162 }
163 return '';
164}
165
166/**
167 * @brief Get the comment block of a function.

Callers 1

make_struct.phpFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected