From d45070f32202e50c0060418101ca3be1e720347e Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 21 Mar 2019 09:08:25 -0600 Subject: [PATCH] Property and type handling improvements from Scrutinizer --- admin/inc/class.admin_cmd_category.inc.php | 4 ++-- admin/inc/class.admin_cmd_change_pw.inc.php | 2 ++ admin/inc/class.admin_cmd_delete_category.inc.php | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/admin/inc/class.admin_cmd_category.inc.php b/admin/inc/class.admin_cmd_category.inc.php index b900b67fde..7059cde539 100644 --- a/admin/inc/class.admin_cmd_category.inc.php +++ b/admin/inc/class.admin_cmd_category.inc.php @@ -17,8 +17,8 @@ use EGroupware\Api; * @property-read string $app app whos category to change (Categories->app_name) * @property-read array $set category data to set, value of null or "" to remove * @property-read array $old old values to record - * @property-read int $cat_id Category ID - * @property-read string $cat_name Category name at the time of the change + * @property int $cat_id Category ID + * @property string $cat_name Category name at the time of the change */ class admin_cmd_category extends admin_cmd { diff --git a/admin/inc/class.admin_cmd_change_pw.inc.php b/admin/inc/class.admin_cmd_change_pw.inc.php index 2e54fef6fa..7577cd6599 100644 --- a/admin/inc/class.admin_cmd_change_pw.inc.php +++ b/admin/inc/class.admin_cmd_change_pw.inc.php @@ -14,6 +14,8 @@ use EGroupware\Api; /** * admin command: change the password of a given user + * + * @property int $account Account ID */ class admin_cmd_change_pw extends admin_cmd { diff --git a/admin/inc/class.admin_cmd_delete_category.inc.php b/admin/inc/class.admin_cmd_delete_category.inc.php index 070a40464a..713002c229 100644 --- a/admin/inc/class.admin_cmd_delete_category.inc.php +++ b/admin/inc/class.admin_cmd_delete_category.inc.php @@ -16,9 +16,9 @@ use EGroupware\Api; * * @property-read string $app app whos category to delete (Categories->app_name) * @property-read array $set category data to set, value of null or "" to remove - * @property-read array $old old values to record + * @property array $old old values to record * @property-read int $cat_id category ID to delete - * @property-read string $cat_name Category name at the time of the change + * @property string $cat_name Category name at the time of the change * @property-read boolean $subs Delete subs as well */ class admin_cmd_delete_category extends admin_cmd @@ -62,7 +62,7 @@ class admin_cmd_delete_category extends admin_cmd protected function exec($check_only=false) { $cats = new Api\Categories('',$this->app); - if(!$this->old && $this->cat_id) + if(empty($this->old) && $this->cat_id) { $this->old = $cats->read($this->cat_id); }