Fix PHPDOC for void functions
This commit is contained in:
parent
2d1bc519c8
commit
be46eb5d13
@ -243,8 +243,10 @@ class AnnotationsBuilder
|
|||||||
}
|
}
|
||||||
$paramList = $hasVariadic ? "Tools::arr($paramList)" : "[$paramList]";
|
$paramList = $hasVariadic ? "Tools::arr($paramList)" : "[$paramList]";
|
||||||
|
|
||||||
|
$ret = $type && $type->getName() === 'void' ? '' : 'return';
|
||||||
|
|
||||||
$doc .= "\n{\n";
|
$doc .= "\n{\n";
|
||||||
$doc .= " return \$this->__call(__FUNCTION__, $paramList);\n";
|
$doc .= " $ret \$this->__call(__FUNCTION__, $paramList);\n";
|
||||||
$doc .= "}\n";
|
$doc .= "}\n";
|
||||||
|
|
||||||
$internalDoc['InternalDoc'][$name]['method'] = $method->getDocComment() ?? '';
|
$internalDoc['InternalDoc'][$name]['method'] = $method->getDocComment() ?? '';
|
||||||
|
@ -5814,7 +5814,7 @@ class InternalDoc extends APIFactory
|
|||||||
*/
|
*/
|
||||||
public function setWebhook($hook_url, $pem_path = null, array $extra = []): void
|
public function setWebhook($hook_url, $pem_path = null, array $extra = []): void
|
||||||
{
|
{
|
||||||
return $this->__call(__FUNCTION__, [$hook_url, $pem_path, $extra]);
|
$this->__call(__FUNCTION__, [$hook_url, $pem_path, $extra]);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Set update handling callback.
|
* Set update handling callback.
|
||||||
@ -5825,7 +5825,7 @@ class InternalDoc extends APIFactory
|
|||||||
*/
|
*/
|
||||||
public function setCallback($callback, array $extra = []): void
|
public function setCallback($callback, array $extra = []): void
|
||||||
{
|
{
|
||||||
return $this->__call(__FUNCTION__, [$callback, $extra]);
|
$this->__call(__FUNCTION__, [$callback, $extra]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function logout(array $extra = [])
|
public function logout(array $extra = [])
|
||||||
@ -5888,7 +5888,7 @@ class InternalDoc extends APIFactory
|
|||||||
*/
|
*/
|
||||||
public function setLoopCallback($callback, array $extra = []): void
|
public function setLoopCallback($callback, array $extra = []): void
|
||||||
{
|
{
|
||||||
return $this->__call(__FUNCTION__, [$callback, $extra]);
|
$this->__call(__FUNCTION__, [$callback, $extra]);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Start MadelineProto's update handling loop, or run the provided async callable.
|
* Start MadelineProto's update handling loop, or run the provided async callable.
|
||||||
@ -5910,7 +5910,7 @@ class InternalDoc extends APIFactory
|
|||||||
*/
|
*/
|
||||||
public function closeConnection($message = 'OK!', array $extra = []): void
|
public function closeConnection($message = 'OK!', array $extra = []): void
|
||||||
{
|
{
|
||||||
return $this->__call(__FUNCTION__, [$message, $extra]);
|
$this->__call(__FUNCTION__, [$message, $extra]);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Set NOOP update handler, ignoring all updates.
|
* Set NOOP update handler, ignoring all updates.
|
||||||
@ -5919,7 +5919,7 @@ class InternalDoc extends APIFactory
|
|||||||
*/
|
*/
|
||||||
public function setNoop(array $extra = []): void
|
public function setNoop(array $extra = []): void
|
||||||
{
|
{
|
||||||
return $this->__call(__FUNCTION__, [$extra]);
|
$this->__call(__FUNCTION__, [$extra]);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Noop update handler.
|
* Noop update handler.
|
||||||
@ -5928,7 +5928,7 @@ class InternalDoc extends APIFactory
|
|||||||
*/
|
*/
|
||||||
public function noop(array $extra = []): void
|
public function noop(array $extra = []): void
|
||||||
{
|
{
|
||||||
return $this->__call(__FUNCTION__, [$extra]);
|
$this->__call(__FUNCTION__, [$extra]);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Log in to telegram (via CLI or web).
|
* Log in to telegram (via CLI or web).
|
||||||
@ -5992,7 +5992,7 @@ class InternalDoc extends APIFactory
|
|||||||
*/
|
*/
|
||||||
public function setWebTemplate(string $template, array $extra = []): void
|
public function setWebTemplate(string $template, array $extra = []): void
|
||||||
{
|
{
|
||||||
return $this->__call(__FUNCTION__, [$template, $extra]);
|
$this->__call(__FUNCTION__, [$template, $extra]);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Check for terms of service update.
|
* Check for terms of service update.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user