Create a string of the Schema fields that
should be inserted into the sub template.

@param string $method (addColumn | dropColumn)
@return string
514222
protected function setFields($method = 'addColumn')
    {
        $fields = $this->convertFieldsToArray();

        $template = array_map(array($this, $method), $fields);

        return implode("\n\t\t\t", $template);
    }
706517
protected function getMethodBody(ReflectionMethod $method)
    {
        // Get file content for the method

        $file = new SplFileObject($method->getFileName());

        $methodBodyLines = iterator_to_array(
            new LimitIterator(
                $file,
                $method->getStartLine(),
                $method->getEndLine() - $method->getStartLine()
            )
        );

        return implode("\n", $methodBodyLines);
    }
143175
protected function getSupportedParams($method)
    {
        $columns = [];

        if ($this->isEloquentBuilder()) {
            $model = $this->getHandler()->getModel();
            $columns = in_array(ApiHelper::class, class_uses($model))
                ? $model->$method()
                : $model->getFillable();
        }

        return $columns;
    }
349987
protected function getContentType($method)
    {
        // Just to make PHPMD happy.
        $method = null;
        $file = $this->getArgument("file");
        if (!is_null($file)) {
            return "text/csv";
        }
        $soundFile = $this->getArgument("sound_file");
        if (!is_null($soundFile)) {
            return "audio/mpeg";
        }
        return 'application/json';
    }
1076838
public static function generateDoxygenDocumentation()
	{
		foreach (static::$methods as $methodName => $m) {
			@ list($realMethod, $buffer, $label) = $m;
			echo "/**\n";
			echo "@memberof ", get_called_class(), "\n";
			if ($realMethod == 'setFlag') {
				echo "@fn $methodName()\n";
			} else {
				echo "@fn $methodName(\$sql_statement, ...)\n";
				echo "@param \$sql_statement SQL statement (a fragment of SQL query) with placeholders.\n";
				echo "@param ... Values of placeholders (when positional placeholders are used).\n";
			}
			echo "@public\n";
			if ($realMethod == 'setFlag') {
				echo "@brief Sets content of buffer `$buffer` to `$label`.\n";
			} else if (substr($realMethod, 0, 3) == 'add') {
				if ($label) {
					echo "@brief Appends `\$sql_statement` prefixed with `$label` to buffer `$buffer`.\n";
				} else {
					echo "@brief Appends `\$sql_statement` to buffer `$buffer`.\n";
				}
			} else {
				if ($label) {
					echo "@brief Replaces content of buffer `$buffer` with `\$sql_statement` prefixed with `$label`.\n";
				} else {
					echo "@brief Replaces content of buffer `$buffer` with `\$sql_statement`.\n";
				}
			}
			echo "\n";
			echo "@note This method is generated from FlupdoBuilder::\$methods array. See compileQuery() method for buffer usage.\n";
			echo "*/\n";
			echo "\n";
		}
	}
1090769
public function methodDescription( $method )
    {
        return array_key_exists( $method, $this->FunctionList ) ? ( array_key_exists( $method, $this->FunctionDescription ) ? $this->FunctionDescription[$method] : '' ) : false;
    }
538523
public function setMethod($method)
	{
		if($method == 'any')
			$method = array('get', 'post', 'put', 'delete', 'patch', 'options');
		else if(!is_array($method))
			$method = explode('|', $method);

		$method = array_map(function($value){return trim(strtolower($value));}, $method);
	
		$this->setProperty('method', $method);

		return $this;
	}
112436
private function createSchemaForViewMethod($schema, $meta, $type = 'index-header')
    {


        if (!$schema) return '';

        $fields = array_map(function ($field) use ($meta, $type) {
            return $this->AddColumn($field, 'view-' . $type, $meta);
        }, $schema);


        // Format code
        if ($type == 'index-header') {
            return implode("\n" . str_repeat(' ', 24), $fields);
        } else {
            // index-content
            return implode("\n" . str_repeat(' ', 20), $fields);
        }

    }
821918
private function init($method)
    {
        if (is_string($method) && method_exists($this, $method))
        {
            return $this->$method();
        }

        return $method();
    }
1031067
private static function getCalledMethod($method)
    {
        if (strpos($method, '::') !== false) {
            $methodChunks = explode('::', $method);
            $method = $methodChunks[1];
        }

        return $method;
    }
368191
private function createRequestPayload($method)
    {
        $config = array_merge([
            'USER'      => $this->config['username'],
            'PWD'       => $this->config['password'],
            'SIGNATURE' => $this->config['signature'],
            'VERSION'   => 123,
            'METHOD'    => $method,
        ], $this->options);

        $this->post = $this->post->merge($config);
        if ($method === 'verifyipn') {
            $this->post->forget('METHOD');
        }
    }
684497
protected function createInstallationMethod($method)
    {
        if (is_string($method)) {
            return InstallationMethod::memberByValue($method, false);
        }

        if (is_object($method)) {
            $methods = array();

            foreach ($method as $project => $projectMethod) {
                $methods[$project] =
                    InstallationMethod::memberByValue($projectMethod, false);
            }

            return $methods;
        }

        return null;
    }
398689
public function generateMethod(Method $method): string
    {
        return $this->twig->render('method.html', [
            'method' => $method,
            'namespace' => $this->getNamespace(),
            'full_namespace' => $this->getFullNamespace()
        ]);
    }
879558
public function toDocTypeString(Method $method) {
        $longestType = 0;
        $longestName = 0;
        foreach($method->getParameters() as $parameter) {
            if(strlen($parameter->getType()) > $longestType) {
                $longestType = strlen($parameter->getType());
            }
            if(strlen($parameter->getName()) > $longestName) {
                $longestName = strlen($parameter->getName());
            }
        }
        $returnVar = '	 * @param';
        $returnVar .= ' ' . $this->getType() . (str_repeat(' ', $longestType - strlen($this->getType())));
        $returnVar .= ' $' . $this->getName();
        if(strlen($this->getDescription()) > 0) {
            $returnVar .= str_repeat(' ', $longestName - strlen($this->getName())) . ' ' . $this->getDescription();
        }
        $returnVar .= "\n";
        return $returnVar;
    }
114204
public function getUri(string $method) : string
    {
        $serviceUri = (string) self::uri('swagger/request', [
            'renderer' => 'Json',
            'version' => $this->getVersion(),
            'namespace' => $this->getNamespace(),
            'service' => $this->getName(),
            'method' => $method,
        ]);

        $uri = new Uri();
        $uri->setPath($serviceUri);
        $uri->setQuerystring();
        $uri->setFragment();

        return $uri->get(false);
    }
235679
public function saveMethod($method = null)
    {
        if ($method === null) {
            return $this->getConfig('saveMethod');
        }

        return $this->setConfig('saveMethod', $method);
    }
1221213
protected function buildMethod(ReflectionMethod $method)
    {
        $argString = "";
        $paramString = "";
        $returnString = "";
        foreach ($method->getParameters() as $value) {
            $argString .= "\${$value->getName()}, ";
            $paramString .= $this->getParamString($value);
        }

        $methodReturn = $method->getReturnType();
        if (!is_null($methodReturn)) {
            if (!$methodReturn->isBuiltin()) {
                $this->useList[] = sprintf("%s", $methodReturn);
                $arr = explode("\\", $methodReturn);
                $methodReturn = array_pop($arr);
            }

            $returnString = ": {$methodReturn}";
        }

        $argString = trim($argString, ", ");
        $paramString = trim($paramString, ", ");
        $replaces = array(
            $method->getDocComment(),
            $method->getName(),
            $paramString,
            $returnString,
            $argString
        );
        return str_replace(self::METHOD_TPL_SEARCHES, $replaces, $this->template->getMethodTemplate());
    }