mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-13 03:23:18 +03:00
Add return types
This commit is contained in:
parent
7a8832d311
commit
aee7bb80c0
11 changed files with 49 additions and 49 deletions
|
@ -37,7 +37,7 @@ class Admins_api_v1 extends EA_Controller
|
|||
/**
|
||||
* Get an admin collection.
|
||||
*/
|
||||
public function index()
|
||||
public function index(): void
|
||||
{
|
||||
try {
|
||||
$keyword = $this->api->request_keyword();
|
||||
|
@ -79,7 +79,7 @@ class Admins_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int|null $id Admin ID.
|
||||
*/
|
||||
public function show(int $id = null)
|
||||
public function show(int $id = null): void
|
||||
{
|
||||
try {
|
||||
$fields = $this->api->request_fields();
|
||||
|
@ -113,7 +113,7 @@ class Admins_api_v1 extends EA_Controller
|
|||
/**
|
||||
* Store a new admin.
|
||||
*/
|
||||
public function store()
|
||||
public function store(): void
|
||||
{
|
||||
try {
|
||||
$admin = request();
|
||||
|
@ -145,7 +145,7 @@ class Admins_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int $id Admin ID.
|
||||
*/
|
||||
public function update(int $id)
|
||||
public function update(int $id): void
|
||||
{
|
||||
try {
|
||||
$occurrences = $this->admins_model->get(['id' => $id]);
|
||||
|
@ -179,7 +179,7 @@ class Admins_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int $id Admin ID.
|
||||
*/
|
||||
public function destroy(int $id)
|
||||
public function destroy(int $id): void
|
||||
{
|
||||
try {
|
||||
$occurrences = $this->admins_model->get(['id' => $id]);
|
||||
|
|
|
@ -43,7 +43,7 @@ class Appointments_api_v1 extends EA_Controller
|
|||
/**
|
||||
* Get an appointment collection.
|
||||
*/
|
||||
public function index()
|
||||
public function index(): void
|
||||
{
|
||||
try {
|
||||
$keyword = $this->api->request_keyword();
|
||||
|
@ -143,7 +143,7 @@ class Appointments_api_v1 extends EA_Controller
|
|||
*
|
||||
* @deprecated Since 1.5
|
||||
*/
|
||||
private function aggregates(array &$appointment)
|
||||
private function aggregates(array &$appointment): void
|
||||
{
|
||||
$aggregates = request('aggregates') !== null;
|
||||
|
||||
|
@ -171,7 +171,7 @@ class Appointments_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int|null $id Appointment ID.
|
||||
*/
|
||||
public function show(int $id = null)
|
||||
public function show(int $id = null): void
|
||||
{
|
||||
try {
|
||||
$fields = $this->api->request_fields();
|
||||
|
@ -205,7 +205,7 @@ class Appointments_api_v1 extends EA_Controller
|
|||
/**
|
||||
* Store a new appointment.
|
||||
*/
|
||||
public function store()
|
||||
public function store(): void
|
||||
{
|
||||
try {
|
||||
$appointment = request();
|
||||
|
@ -295,7 +295,7 @@ class Appointments_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int $id Appointment ID.
|
||||
*/
|
||||
public function update(int $id)
|
||||
public function update(int $id): void
|
||||
{
|
||||
try {
|
||||
$occurrences = $this->appointments_model->get(['id' => $id]);
|
||||
|
@ -331,7 +331,7 @@ class Appointments_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int $id Appointment ID.
|
||||
*/
|
||||
public function destroy(int $id)
|
||||
public function destroy(int $id): void
|
||||
{
|
||||
try {
|
||||
$occurrences = $this->appointments_model->get(['id' => $id]);
|
||||
|
|
|
@ -54,7 +54,7 @@ class Availabilities_api_v1 extends EA_Controller
|
|||
*
|
||||
* If no date parameter is provided then the current date will be used.
|
||||
*/
|
||||
public function get()
|
||||
public function get(): void
|
||||
{
|
||||
try {
|
||||
$provider_id = request('providerId');
|
||||
|
|
|
@ -35,7 +35,7 @@ class Customers_api_v1 extends EA_Controller
|
|||
/**
|
||||
* Get a customer collection.
|
||||
*/
|
||||
public function index()
|
||||
public function index(): void
|
||||
{
|
||||
try {
|
||||
$keyword = $this->api->request_keyword();
|
||||
|
@ -77,7 +77,7 @@ class Customers_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int|null $id Customer ID.
|
||||
*/
|
||||
public function show(int $id = null)
|
||||
public function show(int $id = null): void
|
||||
{
|
||||
try {
|
||||
$fields = $this->api->request_fields();
|
||||
|
@ -105,7 +105,7 @@ class Customers_api_v1 extends EA_Controller
|
|||
/**
|
||||
* Store a new customer.
|
||||
*/
|
||||
public function store()
|
||||
public function store(): void
|
||||
{
|
||||
try {
|
||||
$customer = request();
|
||||
|
@ -133,7 +133,7 @@ class Customers_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int $id Customer ID.
|
||||
*/
|
||||
public function update(int $id)
|
||||
public function update(int $id): void
|
||||
{
|
||||
try {
|
||||
$occurrences = $this->customers_model->get(['id' => $id]);
|
||||
|
@ -167,7 +167,7 @@ class Customers_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int $id Customer ID.
|
||||
*/
|
||||
public function destroy(int $id)
|
||||
public function destroy(int $id): void
|
||||
{
|
||||
try {
|
||||
$occurrences = $this->customers_model->get(['id' => $id]);
|
||||
|
|
|
@ -35,7 +35,7 @@ class Providers_api_v1 extends EA_Controller
|
|||
/**
|
||||
* Get a provider collection.
|
||||
*/
|
||||
public function index()
|
||||
public function index(): void
|
||||
{
|
||||
try {
|
||||
$keyword = $this->api->request_keyword();
|
||||
|
@ -77,7 +77,7 @@ class Providers_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int|null $id Provider ID.
|
||||
*/
|
||||
public function show(int $id = null)
|
||||
public function show(int $id = null): void
|
||||
{
|
||||
try {
|
||||
$fields = $this->api->request_fields();
|
||||
|
@ -111,7 +111,7 @@ class Providers_api_v1 extends EA_Controller
|
|||
/**
|
||||
* Store a new provider.
|
||||
*/
|
||||
public function store()
|
||||
public function store(): void
|
||||
{
|
||||
try {
|
||||
$provider = request();
|
||||
|
@ -151,7 +151,7 @@ class Providers_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int $id Provider ID.
|
||||
*/
|
||||
public function update(int $id)
|
||||
public function update(int $id): void
|
||||
{
|
||||
try {
|
||||
$occurrences = $this->providers_model->get(['id' => $id]);
|
||||
|
@ -185,7 +185,7 @@ class Providers_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int $id Provider ID.
|
||||
*/
|
||||
public function destroy(int $id)
|
||||
public function destroy(int $id): void
|
||||
{
|
||||
try {
|
||||
$occurrences = $this->providers_model->get(['id' => $id]);
|
||||
|
|
|
@ -35,7 +35,7 @@ class Secretaries_api_v1 extends EA_Controller
|
|||
/**
|
||||
* Get a secretary collection.
|
||||
*/
|
||||
public function index()
|
||||
public function index(): void
|
||||
{
|
||||
try {
|
||||
$keyword = $this->api->request_keyword();
|
||||
|
@ -77,7 +77,7 @@ class Secretaries_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int|null $id Secretary ID.
|
||||
*/
|
||||
public function show(int $id = null)
|
||||
public function show(int $id = null): void
|
||||
{
|
||||
try {
|
||||
$fields = $this->api->request_fields();
|
||||
|
@ -105,7 +105,7 @@ class Secretaries_api_v1 extends EA_Controller
|
|||
/**
|
||||
* Store a new secretary.
|
||||
*/
|
||||
public function store()
|
||||
public function store(): void
|
||||
{
|
||||
try {
|
||||
$secretary = request();
|
||||
|
@ -141,7 +141,7 @@ class Secretaries_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int $id Secretary ID.
|
||||
*/
|
||||
public function update(int $id)
|
||||
public function update(int $id): void
|
||||
{
|
||||
try {
|
||||
$occurrences = $this->secretaries_model->get(['id' => $id]);
|
||||
|
@ -175,7 +175,7 @@ class Secretaries_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int $id Secretary ID.
|
||||
*/
|
||||
public function destroy(int $id)
|
||||
public function destroy(int $id): void
|
||||
{
|
||||
try {
|
||||
$occurrences = $this->secretaries_model->get(['id' => $id]);
|
||||
|
|
|
@ -35,7 +35,7 @@ class Service_categories_api_v1 extends EA_Controller
|
|||
/**
|
||||
* Get a service-category collection.
|
||||
*/
|
||||
public function index()
|
||||
public function index(): void
|
||||
{
|
||||
try {
|
||||
$keyword = $this->api->request_keyword();
|
||||
|
@ -77,7 +77,7 @@ class Service_categories_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int|null $id Service-category ID.
|
||||
*/
|
||||
public function show(int $id = null)
|
||||
public function show(int $id = null): void
|
||||
{
|
||||
try {
|
||||
$fields = $this->api->request_fields();
|
||||
|
@ -111,7 +111,7 @@ class Service_categories_api_v1 extends EA_Controller
|
|||
/**
|
||||
* Store a new service-category.
|
||||
*/
|
||||
public function store()
|
||||
public function store(): void
|
||||
{
|
||||
try {
|
||||
$service_category = request();
|
||||
|
@ -139,7 +139,7 @@ class Service_categories_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int $id Service-category ID.
|
||||
*/
|
||||
public function update(int $id)
|
||||
public function update(int $id): void
|
||||
{
|
||||
try {
|
||||
$occurrences = $this->service_categories_model->get(['id' => $id]);
|
||||
|
@ -173,7 +173,7 @@ class Service_categories_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int $id Service-category ID.
|
||||
*/
|
||||
public function destroy(int $id)
|
||||
public function destroy(int $id): void
|
||||
{
|
||||
try {
|
||||
$occurrences = $this->service_categories_model->get(['id' => $id]);
|
||||
|
|
|
@ -35,7 +35,7 @@ class Services_api_v1 extends EA_Controller
|
|||
/**
|
||||
* Get an service collection.
|
||||
*/
|
||||
public function index()
|
||||
public function index(): void
|
||||
{
|
||||
try {
|
||||
$keyword = $this->api->request_keyword();
|
||||
|
@ -77,7 +77,7 @@ class Services_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int|null $id Service ID.
|
||||
*/
|
||||
public function show(int $id = null)
|
||||
public function show(int $id = null): void
|
||||
{
|
||||
try {
|
||||
$fields = $this->api->request_fields();
|
||||
|
@ -111,7 +111,7 @@ class Services_api_v1 extends EA_Controller
|
|||
/**
|
||||
* Store a new service.
|
||||
*/
|
||||
public function store()
|
||||
public function store(): void
|
||||
{
|
||||
try {
|
||||
$service = request();
|
||||
|
@ -139,7 +139,7 @@ class Services_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int $id Service ID.
|
||||
*/
|
||||
public function update(int $id)
|
||||
public function update(int $id): void
|
||||
{
|
||||
try {
|
||||
$occurrences = $this->services_model->get(['id' => $id]);
|
||||
|
@ -173,7 +173,7 @@ class Services_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int $id Service ID.
|
||||
*/
|
||||
public function destroy(int $id)
|
||||
public function destroy(int $id): void
|
||||
{
|
||||
try {
|
||||
$occurrences = $this->services_model->get(['id' => $id]);
|
||||
|
|
|
@ -71,7 +71,7 @@ class Settings_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param string $name Setting name.
|
||||
*/
|
||||
public function show(string $name)
|
||||
public function show(string $name): void
|
||||
{
|
||||
try {
|
||||
$value = setting($name);
|
||||
|
@ -90,7 +90,7 @@ class Settings_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param string $name Setting name.
|
||||
*/
|
||||
public function update(string $name)
|
||||
public function update(string $name): void
|
||||
{
|
||||
try {
|
||||
$value = request('value');
|
||||
|
|
|
@ -35,7 +35,7 @@ class Unavailabilities_api_v1 extends EA_Controller
|
|||
/**
|
||||
* Get an unavailability collection.
|
||||
*/
|
||||
public function index()
|
||||
public function index(): void
|
||||
{
|
||||
try {
|
||||
$keyword = $this->api->request_keyword();
|
||||
|
@ -77,7 +77,7 @@ class Unavailabilities_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int|null $id Unavailability ID.
|
||||
*/
|
||||
public function show(int $id = null)
|
||||
public function show(int $id = null): void
|
||||
{
|
||||
try {
|
||||
$fields = $this->api->request_fields();
|
||||
|
@ -111,7 +111,7 @@ class Unavailabilities_api_v1 extends EA_Controller
|
|||
/**
|
||||
* Store a new unavailability.
|
||||
*/
|
||||
public function store()
|
||||
public function store(): void
|
||||
{
|
||||
try {
|
||||
$unavailability = request();
|
||||
|
@ -139,7 +139,7 @@ class Unavailabilities_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int $id Unavailability ID.
|
||||
*/
|
||||
public function update(int $id)
|
||||
public function update(int $id): void
|
||||
{
|
||||
try {
|
||||
$occurrences = $this->unavailabilities_model->get(['id' => $id]);
|
||||
|
@ -173,7 +173,7 @@ class Unavailabilities_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int $id Unavailability ID.
|
||||
*/
|
||||
public function destroy(int $id)
|
||||
public function destroy(int $id): void
|
||||
{
|
||||
try {
|
||||
$occurrences = $this->unavailabilities_model->get(['id' => $id]);
|
||||
|
|
|
@ -35,7 +35,7 @@ class Webhooks_api_v1 extends EA_Controller
|
|||
/**
|
||||
* Get a webhook collection.
|
||||
*/
|
||||
public function index()
|
||||
public function index(): void
|
||||
{
|
||||
try {
|
||||
$keyword = $this->api->request_keyword();
|
||||
|
@ -77,7 +77,7 @@ class Webhooks_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int|null $id Webhook ID.
|
||||
*/
|
||||
public function show(int $id = null)
|
||||
public function show(int $id = null): void
|
||||
{
|
||||
try {
|
||||
$fields = $this->api->request_fields();
|
||||
|
@ -111,7 +111,7 @@ class Webhooks_api_v1 extends EA_Controller
|
|||
/**
|
||||
* Store a new webhook.
|
||||
*/
|
||||
public function store()
|
||||
public function store(): void
|
||||
{
|
||||
try {
|
||||
$webhook = request();
|
||||
|
@ -139,7 +139,7 @@ class Webhooks_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int $id Webhook ID.
|
||||
*/
|
||||
public function update(int $id)
|
||||
public function update(int $id): void
|
||||
{
|
||||
try {
|
||||
$occurrences = $this->webhooks_model->get(['id' => $id]);
|
||||
|
@ -173,7 +173,7 @@ class Webhooks_api_v1 extends EA_Controller
|
|||
*
|
||||
* @param int $id Webhook ID.
|
||||
*/
|
||||
public function destroy(int $id)
|
||||
public function destroy(int $id): void
|
||||
{
|
||||
try {
|
||||
$occurrences = $this->webhooks_model->get(['id' => $id]);
|
||||
|
|
Loading…
Reference in a new issue