Improves annotations for API

This commit is contained in:
Michael Rosenberger
2018-12-03 22:34:56 +01:00
parent 456875905d
commit df3ad9ed12
8 changed files with 17 additions and 5 deletions

View File

@@ -181,6 +181,7 @@ abstract class ApiCommand extends ApiParameter
/**
* initialize mail interface so an API wide mail-object is available
* @throws phpmailerException
*/
private function initMail()
{
@@ -224,6 +225,7 @@ abstract class ApiCommand extends ApiParameter
* array of parameters for the command
*
* @return ApiCommand
* @throws Exception
*/
public static function getLocal($userinfo = null, $params = null)
{
@@ -285,8 +287,7 @@ abstract class ApiCommand extends ApiParameter
/**
* call an api-command internally
*
* @param string $module
* @param string $function
* @param string $command
* @param array|null $params
*
* @return array

View File

@@ -117,6 +117,7 @@ abstract class ApiParameter
* value which is returned if optional=true and param is not set
*
* @return mixed
* @throws Exception
*/
protected function getUlParam($param = null, $ul_field = null, $optional = false, $default = 0)
{
@@ -145,6 +146,9 @@ abstract class ApiParameter
* @param int $level
* depth of backtrace, default 2
*
* @param int $max_level
* @param array|null $trace
*
* @return string
*/
private function getModFunctionString($level = 1, $max_level = 5, $trace = null)

View File

@@ -79,10 +79,10 @@ class FroxlorRPC
/**
* validates the given command
*
* @param array $body
* @param array $request
*
* @return array
* @throws Exception
* @return boolean
*/
private static function validateBody($request)
{

View File

@@ -208,6 +208,7 @@ class Certificates extends ApiCommand implements ResourceEntity
* @param int $id
*
* @return array
* @throws Exception
*/
public function delete()
{
@@ -261,6 +262,7 @@ class Certificates extends ApiCommand implements ResourceEntity
* optional default false
*
* @return boolean
* @throws Exception
*/
private function addOrUpdateCertificate($domainid = 0, $ssl_cert_file = '', $ssl_key_file = '', $ssl_ca_file = '', $ssl_cert_chainfile = '', $do_insert = false)
{

View File

@@ -52,6 +52,7 @@ class CustomerBackups extends ApiCommand implements ResourceEntity
*
* @access admin, customer
* @return array
* @throws Exception
*/
public function add()
{

View File

@@ -1743,6 +1743,7 @@ class Customers extends ApiCommand implements ResourceEntity
* @param string $resource
* @param string $extra
* optional, default empty
* @param int $increase_by
*/
public static function increaseUsage($customerid = 0, $resource = null, $extra = '', $increase_by = 1)
{
@@ -1756,6 +1757,7 @@ class Customers extends ApiCommand implements ResourceEntity
* @param string $resource
* @param string $extra
* optional, default empty
* @param int $decrease_by
*/
public static function decreaseUsage($customerid = 0, $resource = null, $extra = '', $decrease_by = 1)
{

View File

@@ -284,8 +284,9 @@ class IpsAndPorts extends ApiCommand implements ResourceEntity
* @param string $ssl_cert_chainfile
* optional, requires $ssl = 1, default empty
*
*
* @access admin
* @throws ErrorException
* @throws Exception
* @return array
*/
public function update()

View File

@@ -846,6 +846,7 @@ class SubDomains extends ApiCommand implements ResourceEntity
* @param boolean $_doredirect
*
* @return string validated path
* @throws Exception
*/
private function validateDomainDocumentRoot($path = null, $url = null, $customer = null, $completedomain = null, &$_doredirect = false)
{