diff --git a/application/models/Admins_model.php b/application/models/Admins_model.php index 357ed6ad..5408a039 100644 --- a/application/models/Admins_model.php +++ b/application/models/Admins_model.php @@ -278,9 +278,9 @@ class Admins_model extends EA_Model { { $role_id = $this->get_admin_role_id(); - $count = $this->db->get_where('users', ['id_roles' => $role_id, 'delete_datetime !=' => NULL])->num_rows(); + $count = $this->db->get_where('users', ['id_roles' => $role_id, 'delete_datetime' => NULL])->num_rows(); - if ($count === 1) + if ($count <= 1) { throw new RuntimeException('Record could not be deleted as the app requires at least one admin user.'); } @@ -338,11 +338,11 @@ class Admins_model extends EA_Model { * @param int $admin_id Admin ID. * @param string $field Name of the value to be returned. * - * @return string Returns the selected admin value from the database. + * @return mixed Returns the selected admin value from the database. * * @throws InvalidArgumentException */ - public function value(int $admin_id, string $field): string + public function value(int $admin_id, string $field): mixed { if (empty($field)) { diff --git a/application/models/Appointments_model.php b/application/models/Appointments_model.php index 329a149b..a4a8df30 100644 --- a/application/models/Appointments_model.php +++ b/application/models/Appointments_model.php @@ -264,11 +264,11 @@ class Appointments_model extends EA_Model { * @param int $appointment_id Appointment ID. * @param string $field Name of the value to be returned. * - * @return string Returns the selected appointment value from the database. + * @return mixed Returns the selected appointment value from the database. * * @throws InvalidArgumentException */ - public function value(int $appointment_id, string $field): string + public function value(int $appointment_id, string $field): mixed { if (empty($field)) { diff --git a/application/models/Categories_model.php b/application/models/Categories_model.php index 63e64435..62adcd47 100644 --- a/application/models/Categories_model.php +++ b/application/models/Categories_model.php @@ -185,11 +185,11 @@ class Categories_model extends EA_Model { * @param int $category_id Category ID. * @param string $field Name of the value to be returned. * - * @return string Returns the selected category value from the database. + * @return mixed Returns the selected category value from the database. * * @throws InvalidArgumentException */ - public function value(int $category_id, string $field): string + public function value(int $category_id, string $field): mixed { if (empty($field)) { diff --git a/application/models/Consents_model.php b/application/models/Consents_model.php index da79c7f5..eb41cd3d 100644 --- a/application/models/Consents_model.php +++ b/application/models/Consents_model.php @@ -167,11 +167,11 @@ class Consents_model extends EA_Model { * @param int $consent_id Consent ID. * @param string $field Name of the value to be returned. * - * @return string Returns the selected consent value from the database. + * @return mixed Returns the selected consent value from the database. * * @throws InvalidArgumentException */ - public function value(int $consent_id, string $field): string + public function value(int $consent_id, string $field): mixed { if (empty($field)) { diff --git a/application/models/Customers_model.php b/application/models/Customers_model.php index 8bbdb3f2..d9c9bf4d 100644 --- a/application/models/Customers_model.php +++ b/application/models/Customers_model.php @@ -245,11 +245,11 @@ class Customers_model extends EA_Model { * @param int $customer_id Customer ID. * @param string $field Name of the value to be returned. * - * @return string Returns the selected customer value from the database. + * @return mixed Returns the selected customer value from the database. * * @throws InvalidArgumentException */ - public function value(int $customer_id, string $field): string + public function value(int $customer_id, string $field): mixed { if (empty($field)) { diff --git a/application/models/Providers_model.php b/application/models/Providers_model.php index e64ececa..6b2777d3 100755 --- a/application/models/Providers_model.php +++ b/application/models/Providers_model.php @@ -358,11 +358,11 @@ class Providers_model extends EA_Model { * @param int $provider_id Provider ID. * @param string $field Name of the value to be returned. * - * @return string Returns the selected provider value from the database. + * @return mixed Returns the selected provider value from the database. * * @throws InvalidArgumentException */ - public function value(int $provider_id, string $field): string + public function value(int $provider_id, string $field): mixed { if (empty($field)) { diff --git a/application/models/Roles_model.php b/application/models/Roles_model.php index 48924284..525fc4ad 100644 --- a/application/models/Roles_model.php +++ b/application/models/Roles_model.php @@ -183,11 +183,11 @@ class Roles_model extends EA_Model { * @param int $role_id Role ID. * @param string $field Name of the value to be returned. * - * @return string Returns the selected role value from the database. + * @return mixed Returns the selected role value from the database. * * @throws InvalidArgumentException */ - public function value(int $role_id, string $field): string + public function value(int $role_id, string $field): mixed { if (empty($field)) { diff --git a/application/models/Secretaries_model.php b/application/models/Secretaries_model.php index 0f2ee758..741908d5 100644 --- a/application/models/Secretaries_model.php +++ b/application/models/Secretaries_model.php @@ -355,11 +355,11 @@ class Secretaries_model extends EA_Model { * @param int $secretary_id Secretary ID. * @param string $field Name of the value to be returned. * - * @return string Returns the selected secretary value from the database. + * @return mixed Returns the selected secretary value from the database. * * @throws InvalidArgumentException */ - public function value(int $secretary_id, string $field): string + public function value(int $secretary_id, string $field): mixed { if (empty($field)) { diff --git a/application/models/Services_model.php b/application/models/Services_model.php index 1d2b1c19..a66851ae 100644 --- a/application/models/Services_model.php +++ b/application/models/Services_model.php @@ -241,11 +241,11 @@ class Services_model extends EA_Model { * @param int $service_id Service ID. * @param string $field Name of the value to be returned. * - * @return string Returns the selected service value from the database. + * @return mixed Returns the selected service value from the database. * * @throws InvalidArgumentException */ - public function value(int $service_id, string $field): string + public function value(int $service_id, string $field): mixed { if (empty($field)) { diff --git a/application/models/Settings_model.php b/application/models/Settings_model.php index ee2cf658..bf56ea73 100644 --- a/application/models/Settings_model.php +++ b/application/models/Settings_model.php @@ -184,11 +184,11 @@ class Settings_model extends EA_Model { * @param int $setting_id Setting ID. * @param string $field Name of the value to be returned. * - * @return string Returns the selected setting value from the database. + * @return mixed Returns the selected setting value from the database. * * @throws InvalidArgumentException */ - public function value(int $setting_id, string $field): string + public function value(int $setting_id, string $field): mixed { if (empty($field)) { diff --git a/application/models/Unavailabilities_model.php b/application/models/Unavailabilities_model.php index a560c4d9..5bbf6bea 100644 --- a/application/models/Unavailabilities_model.php +++ b/application/models/Unavailabilities_model.php @@ -218,11 +218,11 @@ class Unavailabilities_model extends EA_Model { * @param int $unavailability_id Unavailability ID. * @param string $field Name of the value to be returned. * - * @return string Returns the selected unavailability value from the database. + * @return mixed Returns the selected unavailability value from the database. * * @throws InvalidArgumentException */ - public function value(int $unavailability_id, string $field): string + public function value(int $unavailability_id, string $field): mixed { if (empty($field)) { diff --git a/application/models/Users_model.php b/application/models/Users_model.php index 33fe525a..7e3db0af 100644 --- a/application/models/Users_model.php +++ b/application/models/Users_model.php @@ -234,11 +234,11 @@ class Users_model extends EA_Model { * @param int $user_id User ID. * @param string $field Name of the value to be returned. * - * @return string Returns the selected user value from the database. + * @return mixed Returns the selected user value from the database. * * @throws InvalidArgumentException */ - public function value(int $user_id, string $field): string + public function value(int $user_id, string $field): mixed { if (empty($field)) { diff --git a/application/models/Webhooks_model.php b/application/models/Webhooks_model.php index d360b57a..57dd9cb1 100644 --- a/application/models/Webhooks_model.php +++ b/application/models/Webhooks_model.php @@ -182,11 +182,11 @@ class Webhooks_model extends EA_Model { * @param int $webhook_id Webhook ID. * @param string $field Name of the value to be returned. * - * @return string Returns the selected webhook value from the database. + * @return mixed Returns the selected webhook value from the database. * * @throws InvalidArgumentException */ - public function value(int $webhook_id, string $field): string + public function value(int $webhook_id, string $field): mixed { if (empty($field)) {