Change the "value" method signature

This commit is contained in:
Alex Tselegidis 2023-01-14 09:39:14 +01:00
parent 2e3e766f73
commit b62e458258
13 changed files with 28 additions and 28 deletions

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{