Merge pull request #609 from foliengriller/annotations

Improves annotations in /lib/classes/api/
This commit is contained in:
Michael Kaufmann
2018-12-04 22:03:07 +01:00
committed by GitHub
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 * initialize mail interface so an API wide mail-object is available
* @throws phpmailerException
*/ */
private function initMail() private function initMail()
{ {
@@ -224,6 +225,7 @@ abstract class ApiCommand extends ApiParameter
* array of parameters for the command * array of parameters for the command
* *
* @return ApiCommand * @return ApiCommand
* @throws Exception
*/ */
public static function getLocal($userinfo = null, $params = null) public static function getLocal($userinfo = null, $params = null)
{ {
@@ -285,8 +287,7 @@ abstract class ApiCommand extends ApiParameter
/** /**
* call an api-command internally * call an api-command internally
* *
* @param string $module * @param string $command
* @param string $function
* @param array|null $params * @param array|null $params
* *
* @return array * @return array

View File

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

View File

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

View File

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

View File

@@ -1743,6 +1743,7 @@ class Customers extends ApiCommand implements ResourceEntity
* @param string $resource * @param string $resource
* @param string $extra * @param string $extra
* optional, default empty * optional, default empty
* @param int $increase_by
*/ */
public static function increaseUsage($customerid = 0, $resource = null, $extra = '', $increase_by = 1) 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 $resource
* @param string $extra * @param string $extra
* optional, default empty * optional, default empty
* @param int $decrease_by
*/ */
public static function decreaseUsage($customerid = 0, $resource = null, $extra = '', $decrease_by = 1) 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 * @param string $ssl_cert_chainfile
* optional, requires $ssl = 1, default empty * optional, requires $ssl = 1, default empty
* *
*
* @access admin * @access admin
* @throws ErrorException * @throws Exception
* @return array * @return array
*/ */
public function update() public function update()

View File

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