From 98f6ad183e5117075bb1daccd810dce75e03d650 Mon Sep 17 00:00:00 2001 From: Michael Rosenberger Date: Wed, 5 Dec 2018 11:42:02 +0100 Subject: [PATCH] Corrects annotations in API --- lib/classes/api/abstract.ApiCommand.php | 1 + lib/classes/api/commands/class.Admins.php | 16 ++++++++-------- lib/classes/api/commands/class.Certificates.php | 10 +++++----- lib/classes/api/commands/class.Cronjobs.php | 6 +++--- .../api/commands/class.CustomerBackups.php | 4 ++-- lib/classes/api/commands/class.Customers.php | 14 +++++++------- lib/classes/api/commands/class.DirOptions.php | 10 +++++----- .../api/commands/class.DirProtections.php | 10 +++++----- lib/classes/api/commands/class.DomainZones.php | 4 ++-- lib/classes/api/commands/class.Domains.php | 16 ++++++++-------- lib/classes/api/commands/class.EmailAccounts.php | 6 +++--- .../api/commands/class.EmailForwarders.php | 4 ++-- lib/classes/api/commands/class.Emails.php | 10 +++++----- lib/classes/api/commands/class.FpmDaemons.php | 8 ++++---- lib/classes/api/commands/class.Froxlor.php | 4 ++-- lib/classes/api/commands/class.Ftps.php | 10 +++++----- lib/classes/api/commands/class.IpsAndPorts.php | 10 +++++----- lib/classes/api/commands/class.Mysqls.php | 10 +++++----- lib/classes/api/commands/class.PhpSettings.php | 10 +++++----- lib/classes/api/commands/class.SubDomains.php | 10 +++++----- lib/classes/api/commands/class.Traffic.php | 2 +- 21 files changed, 88 insertions(+), 87 deletions(-) diff --git a/lib/classes/api/abstract.ApiCommand.php b/lib/classes/api/abstract.ApiCommand.php index 139f2d6c..4c9b8cbd 100644 --- a/lib/classes/api/abstract.ApiCommand.php +++ b/lib/classes/api/abstract.ApiCommand.php @@ -417,6 +417,7 @@ abstract class ApiCommand extends ApiParameter * @param string $operator * @param string $resource * @param string $extra + * @param int $step */ protected static function updateResourceUsage($table = null, $keyfield = null, $key = null, $operator = '+', $resource = null, $extra = null, $step = 1) { diff --git a/lib/classes/api/commands/class.Admins.php b/lib/classes/api/commands/class.Admins.php index 4ad593c8..45756c1c 100644 --- a/lib/classes/api/commands/class.Admins.php +++ b/lib/classes/api/commands/class.Admins.php @@ -23,7 +23,7 @@ class Admins extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array count|list + * @return string json-encoded array count|list */ public function listing() { @@ -57,7 +57,7 @@ class Admins extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function get() { @@ -160,7 +160,7 @@ class Admins extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function add() { @@ -437,7 +437,7 @@ class Admins extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function update() { @@ -694,7 +694,7 @@ class Admins extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function delete() { @@ -794,7 +794,7 @@ class Admins extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function unlock() { @@ -829,7 +829,7 @@ class Admins extends ApiCommand implements ResourceEntity /** * increase resource-usage * - * @param int $customerid + * @param int $adminid * @param string $resource * @param string $extra * optional, default empty @@ -842,7 +842,7 @@ class Admins extends ApiCommand implements ResourceEntity /** * decrease resource-usage * - * @param int $customerid + * @param int $adminid * @param string $resource * @param string $extra * optional, default empty diff --git a/lib/classes/api/commands/class.Certificates.php b/lib/classes/api/commands/class.Certificates.php index 00ec9f99..71ca4e42 100644 --- a/lib/classes/api/commands/class.Certificates.php +++ b/lib/classes/api/commands/class.Certificates.php @@ -34,7 +34,7 @@ class Certificates extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function add() { @@ -83,7 +83,7 @@ class Certificates extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function get() { @@ -125,7 +125,7 @@ class Certificates extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function update() { @@ -160,7 +160,7 @@ class Certificates extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array count|list + * @return string json-encoded array count|list */ public function listing() { @@ -207,7 +207,7 @@ class Certificates extends ApiCommand implements ResourceEntity * * @param int $id * - * @return array + * @return string json-encoded array * @throws Exception */ public function delete() diff --git a/lib/classes/api/commands/class.Cronjobs.php b/lib/classes/api/commands/class.Cronjobs.php index 0e839f12..3989cd12 100644 --- a/lib/classes/api/commands/class.Cronjobs.php +++ b/lib/classes/api/commands/class.Cronjobs.php @@ -34,7 +34,7 @@ class Cronjobs extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function get() { @@ -68,7 +68,7 @@ class Cronjobs extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function update() { @@ -126,7 +126,7 @@ class Cronjobs extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array count|list + * @return string json-encoded array count|list */ public function listing() { diff --git a/lib/classes/api/commands/class.CustomerBackups.php b/lib/classes/api/commands/class.CustomerBackups.php index 97123045..2f08780a 100644 --- a/lib/classes/api/commands/class.CustomerBackups.php +++ b/lib/classes/api/commands/class.CustomerBackups.php @@ -51,7 +51,7 @@ class CustomerBackups extends ApiCommand implements ResourceEntity * required when called as admin, not needed when called as customer * * @access admin, customer - * @return array + * @return string json-encoded array * @throws Exception */ public function add() @@ -136,7 +136,7 @@ class CustomerBackups extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array count|list + * @return string json-encoded array count|list */ public function listing() { diff --git a/lib/classes/api/commands/class.Customers.php b/lib/classes/api/commands/class.Customers.php index cfa49985..cedcd5a0 100644 --- a/lib/classes/api/commands/class.Customers.php +++ b/lib/classes/api/commands/class.Customers.php @@ -23,7 +23,7 @@ class Customers extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array count|list + * @return string json-encoded array count|list */ public function listing() { @@ -65,7 +65,7 @@ class Customers extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function get() { @@ -205,7 +205,7 @@ class Customers extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function add() { @@ -845,7 +845,7 @@ class Customers extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function update() { @@ -1378,7 +1378,7 @@ class Customers extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function delete() { @@ -1625,7 +1625,7 @@ class Customers extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function unlock() { @@ -1670,7 +1670,7 @@ class Customers extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function move() { diff --git a/lib/classes/api/commands/class.DirOptions.php b/lib/classes/api/commands/class.DirOptions.php index 1b8a3f01..219da0e7 100644 --- a/lib/classes/api/commands/class.DirOptions.php +++ b/lib/classes/api/commands/class.DirOptions.php @@ -40,7 +40,7 @@ class DirOptions extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function add() { @@ -135,7 +135,7 @@ class DirOptions extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function get() { @@ -210,7 +210,7 @@ class DirOptions extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function update() { @@ -284,7 +284,7 @@ class DirOptions extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array count|list + * @return string json-encoded array count|list */ public function listing() { @@ -317,7 +317,7 @@ class DirOptions extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function delete() { diff --git a/lib/classes/api/commands/class.DirProtections.php b/lib/classes/api/commands/class.DirProtections.php index bb746bbf..df02d52a 100644 --- a/lib/classes/api/commands/class.DirProtections.php +++ b/lib/classes/api/commands/class.DirProtections.php @@ -33,7 +33,7 @@ class DirProtections extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function add() { @@ -126,7 +126,7 @@ class DirProtections extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function get() { @@ -199,7 +199,7 @@ class DirProtections extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function update() { @@ -277,7 +277,7 @@ class DirProtections extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array count|list + * @return string json-encoded array count|list */ public function listing() { @@ -312,7 +312,7 @@ class DirProtections extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function delete() { diff --git a/lib/classes/api/commands/class.DomainZones.php b/lib/classes/api/commands/class.DomainZones.php index bef5d986..adc92bd9 100644 --- a/lib/classes/api/commands/class.DomainZones.php +++ b/lib/classes/api/commands/class.DomainZones.php @@ -38,7 +38,7 @@ class DomainZones extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function add() { @@ -298,7 +298,7 @@ class DomainZones extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function get() { diff --git a/lib/classes/api/commands/class.Domains.php b/lib/classes/api/commands/class.Domains.php index b9a72d65..fb1b5a99 100644 --- a/lib/classes/api/commands/class.Domains.php +++ b/lib/classes/api/commands/class.Domains.php @@ -23,7 +23,7 @@ class Domains extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array count|list + * @return string json-encoded array count|list */ public function listing() { @@ -66,7 +66,7 @@ class Domains extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function get() { @@ -180,7 +180,7 @@ class Domains extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function add() { @@ -737,7 +737,7 @@ class Domains extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function update() { @@ -1478,7 +1478,7 @@ class Domains extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function delete() { @@ -1625,11 +1625,11 @@ class Domains extends ApiCommand implements ResourceEntity /** * validate given ips * - * @param int|string|array $p_ipsandports - * @param boolean $edit - * default false + * @param int|string|array $p_ipandports * @param boolean $ssl * default false + * @param int $edit_id + * default 0 * * @throws Exception * @return array diff --git a/lib/classes/api/commands/class.EmailAccounts.php b/lib/classes/api/commands/class.EmailAccounts.php index 3dacdad5..e6a01536 100644 --- a/lib/classes/api/commands/class.EmailAccounts.php +++ b/lib/classes/api/commands/class.EmailAccounts.php @@ -40,7 +40,7 @@ class EmailAccounts extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function add() { @@ -300,7 +300,7 @@ class EmailAccounts extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function update() { @@ -412,7 +412,7 @@ class EmailAccounts extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function delete() { diff --git a/lib/classes/api/commands/class.EmailForwarders.php b/lib/classes/api/commands/class.EmailForwarders.php index efb94ded..5982dd26 100644 --- a/lib/classes/api/commands/class.EmailForwarders.php +++ b/lib/classes/api/commands/class.EmailForwarders.php @@ -34,7 +34,7 @@ class EmailForwarders extends ApiCommand implements ResourceEntity * * @access admin,customer * @throws Exception - * @return array + * @return string json-encoded array */ public function add() { @@ -149,7 +149,7 @@ class EmailForwarders extends ApiCommand implements ResourceEntity * * @access admin,customer * @throws Exception - * @return array + * @return string json-encoded array */ public function delete() { diff --git a/lib/classes/api/commands/class.Emails.php b/lib/classes/api/commands/class.Emails.php index 7dbcf37e..99c0bb7f 100644 --- a/lib/classes/api/commands/class.Emails.php +++ b/lib/classes/api/commands/class.Emails.php @@ -34,7 +34,7 @@ class Emails extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function add() { @@ -151,7 +151,7 @@ class Emails extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function get() { @@ -194,7 +194,7 @@ class Emails extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function update() { @@ -267,7 +267,7 @@ class Emails extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array count|list + * @return string json-encoded array count|list */ public function listing() { @@ -307,7 +307,7 @@ class Emails extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function delete() { diff --git a/lib/classes/api/commands/class.FpmDaemons.php b/lib/classes/api/commands/class.FpmDaemons.php index 89ba7fdb..aec41e13 100644 --- a/lib/classes/api/commands/class.FpmDaemons.php +++ b/lib/classes/api/commands/class.FpmDaemons.php @@ -23,7 +23,7 @@ class FpmDaemons extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array count|list + * @return string json-encoded array count|list */ public function listing() { @@ -77,7 +77,7 @@ class FpmDaemons extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function get() { @@ -123,7 +123,7 @@ class FpmDaemons extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function add() { @@ -329,7 +329,7 @@ class FpmDaemons extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function delete() { diff --git a/lib/classes/api/commands/class.Froxlor.php b/lib/classes/api/commands/class.Froxlor.php index 554c6276..f68edb59 100644 --- a/lib/classes/api/commands/class.Froxlor.php +++ b/lib/classes/api/commands/class.Froxlor.php @@ -151,7 +151,7 @@ class Froxlor extends ApiCommand * * @access admin * @throws Exception - * @return array count|list + * @return string json-encoded array count|list */ public function listSettings() { @@ -232,7 +232,7 @@ class Froxlor extends ApiCommand * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function listFunctions() { diff --git a/lib/classes/api/commands/class.Ftps.php b/lib/classes/api/commands/class.Ftps.php index 4191482d..2e65c72c 100644 --- a/lib/classes/api/commands/class.Ftps.php +++ b/lib/classes/api/commands/class.Ftps.php @@ -40,7 +40,7 @@ class Ftps extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function add() { @@ -238,7 +238,7 @@ class Ftps extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function get() { @@ -309,7 +309,7 @@ class Ftps extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function update() { @@ -421,7 +421,7 @@ class Ftps extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array count|list + * @return string json-encoded array count|list */ public function listing() { @@ -454,7 +454,7 @@ class Ftps extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function delete() { diff --git a/lib/classes/api/commands/class.IpsAndPorts.php b/lib/classes/api/commands/class.IpsAndPorts.php index 5509dc0d..e75139fb 100644 --- a/lib/classes/api/commands/class.IpsAndPorts.php +++ b/lib/classes/api/commands/class.IpsAndPorts.php @@ -23,7 +23,7 @@ class IpsAndPorts extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array count|list + * @return string json-encoded array count|list */ public function listing() { @@ -57,7 +57,7 @@ class IpsAndPorts extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function get() { @@ -117,7 +117,7 @@ class IpsAndPorts extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function add() { @@ -287,7 +287,7 @@ class IpsAndPorts extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function update() { @@ -445,7 +445,7 @@ class IpsAndPorts extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function delete() { diff --git a/lib/classes/api/commands/class.Mysqls.php b/lib/classes/api/commands/class.Mysqls.php index b9f10f3f..c46d2e48 100644 --- a/lib/classes/api/commands/class.Mysqls.php +++ b/lib/classes/api/commands/class.Mysqls.php @@ -34,7 +34,7 @@ class Mysqls extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function add() { @@ -182,7 +182,7 @@ class Mysqls extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function get() { @@ -278,7 +278,7 @@ class Mysqls extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function update() { @@ -366,7 +366,7 @@ class Mysqls extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array count|list + * @return string json-encoded array count|list */ public function listing() { @@ -432,7 +432,7 @@ class Mysqls extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function delete() { diff --git a/lib/classes/api/commands/class.PhpSettings.php b/lib/classes/api/commands/class.PhpSettings.php index 701c2dab..042c480e 100644 --- a/lib/classes/api/commands/class.PhpSettings.php +++ b/lib/classes/api/commands/class.PhpSettings.php @@ -26,7 +26,7 @@ class PhpSettings extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array count|list + * @return string json-encoded array count|list */ public function listing() { @@ -119,7 +119,7 @@ class PhpSettings extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function get() { @@ -188,7 +188,7 @@ class PhpSettings extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function add() { @@ -389,7 +389,7 @@ class PhpSettings extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function update() { @@ -544,7 +544,7 @@ class PhpSettings extends ApiCommand implements ResourceEntity * * @access admin * @throws Exception - * @return array + * @return string json-encoded array */ public function delete() { diff --git a/lib/classes/api/commands/class.SubDomains.php b/lib/classes/api/commands/class.SubDomains.php index 21110564..67d87c4b 100644 --- a/lib/classes/api/commands/class.SubDomains.php +++ b/lib/classes/api/commands/class.SubDomains.php @@ -52,7 +52,7 @@ class SubDomains extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function add() { @@ -328,7 +328,7 @@ class SubDomains extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function get() { @@ -438,7 +438,7 @@ class SubDomains extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function update() { @@ -656,7 +656,7 @@ class SubDomains extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array count|list + * @return string json-encoded array count|list */ public function listing() { @@ -733,7 +733,7 @@ class SubDomains extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array + * @return string json-encoded array */ public function delete() { diff --git a/lib/classes/api/commands/class.Traffic.php b/lib/classes/api/commands/class.Traffic.php index 7cdad848..0e0f9558 100644 --- a/lib/classes/api/commands/class.Traffic.php +++ b/lib/classes/api/commands/class.Traffic.php @@ -66,7 +66,7 @@ class Traffic extends ApiCommand implements ResourceEntity * * @access admin, customer * @throws Exception - * @return array count|list + * @return string json-encoded array count|list */ public function listing() {