Upgraded composer packages, fixed class naming and return types

This commit is contained in:
Igor Scheller 2021-11-30 23:29:51 +01:00 committed by msquare
parent a95fc0fbd1
commit 643c4c8da7
23 changed files with 679 additions and 500 deletions

View File

@ -69,5 +69,10 @@
"Database\\Factories\\Engelsystem\\Models\\": "db/factories/", "Database\\Factories\\Engelsystem\\Models\\": "db/factories/",
"Engelsystem\\Test\\": "tests/" "Engelsystem\\Test\\": "tests/"
} }
},
"config": {
"allow-plugins": {
"composer/package-versions-deprecated": true
}
} }
} }

1104
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -13,7 +13,7 @@ use Engelsystem\ShiftsFilterRenderer;
* *
* @return array * @return array
*/ */
function room_controller() function room_controller(): array
{ {
if (!auth()->can('view_rooms')) { if (!auth()->can('view_rooms')) {
throw_redirect(page_link_to()); throw_redirect(page_link_to());
@ -62,7 +62,7 @@ function room_controller()
* *
* @return array * @return array
*/ */
function rooms_controller() function rooms_controller(): array
{ {
$request = request(); $request = request();
$action = $request->input('action'); $action = $request->input('action');
@ -77,6 +77,8 @@ function rooms_controller()
default: default:
throw_redirect(page_link_to('admin_rooms')); throw_redirect(page_link_to('admin_rooms'));
} }
return ['', ''];
} }
/** /**

View File

@ -10,7 +10,7 @@ use Illuminate\Database\Eloquent\Collection;
* *
* @return array * @return array
*/ */
function shift_entries_controller() function shift_entries_controller(): array
{ {
$user = auth()->user(); $user = auth()->user();
if (!$user) { if (!$user) {
@ -28,6 +28,8 @@ function shift_entries_controller()
case 'delete': case 'delete':
return shift_entry_delete_controller(); return shift_entry_delete_controller();
} }
return ['', ''];
} }
/** /**
@ -35,7 +37,7 @@ function shift_entries_controller()
* *
* @return array * @return array
*/ */
function shift_entry_create_controller() function shift_entry_create_controller(): array
{ {
$user = auth()->user(); $user = auth()->user();
$request = request(); $request = request();
@ -74,7 +76,7 @@ function shift_entry_create_controller()
* @param array $angeltype * @param array $angeltype
* @return array * @return array
*/ */
function shift_entry_create_controller_admin($shift, $angeltype) function shift_entry_create_controller_admin($shift, $angeltype): array
{ {
$signup_user = auth()->user(); $signup_user = auth()->user();
$request = request(); $request = request();
@ -138,7 +140,7 @@ function shift_entry_create_controller_admin($shift, $angeltype)
* @param array $angeltype * @param array $angeltype
* @return array * @return array
*/ */
function shift_entry_create_controller_supporter($shift, $angeltype) function shift_entry_create_controller_supporter($shift, $angeltype): array
{ {
$request = request(); $request = request();
$signup_user = auth()->user(); $signup_user = auth()->user();
@ -210,7 +212,7 @@ function shift_entry_error_message(ShiftSignupState $shift_signup_state)
* @param array $angeltype * @param array $angeltype
* @return array * @return array
*/ */
function shift_entry_create_controller_user($shift, $angeltype) function shift_entry_create_controller_user($shift, $angeltype): array
{ {
$request = request(); $request = request();

View File

@ -39,7 +39,7 @@ function user_angeltypes_unconfirmed_hint()
* *
* @return array * @return array
*/ */
function user_angeltypes_delete_all_controller() function user_angeltypes_delete_all_controller(): array
{ {
$request = request(); $request = request();
@ -78,7 +78,7 @@ function user_angeltypes_delete_all_controller()
* *
* @return array * @return array
*/ */
function user_angeltypes_confirm_all_controller() function user_angeltypes_confirm_all_controller(): array
{ {
$user = auth()->user(); $user = auth()->user();
$request = request(); $request = request();
@ -118,7 +118,7 @@ function user_angeltypes_confirm_all_controller()
* *
* @return array * @return array
*/ */
function user_angeltype_confirm_controller() function user_angeltype_confirm_controller(): array
{ {
$user = auth()->user(); $user = auth()->user();
$request = request(); $request = request();
@ -178,7 +178,7 @@ function user_angeltype_confirm_controller()
* *
* @return array * @return array
*/ */
function user_angeltype_delete_controller() function user_angeltype_delete_controller(): array
{ {
$request = request(); $request = request();
$user = auth()->user(); $user = auth()->user();
@ -231,7 +231,7 @@ function user_angeltype_delete_controller()
* *
* @return array * @return array
*/ */
function user_angeltype_update_controller() function user_angeltype_update_controller(): array
{ {
$supporter = false; $supporter = false;
$request = request(); $request = request();
@ -302,7 +302,7 @@ function user_angeltype_update_controller()
* *
* @return array * @return array
*/ */
function user_angeltype_add_controller() function user_angeltype_add_controller(): array
{ {
$angeltype = load_angeltype(); $angeltype = load_angeltype();
@ -403,7 +403,7 @@ function user_angeltype_join_controller($angeltype)
* *
* @return array * @return array
*/ */
function user_angeltypes_controller() function user_angeltypes_controller(): array
{ {
$request = request(); $request = request();
if (!$request->has('action')) { if (!$request->has('action')) {
@ -426,4 +426,6 @@ function user_angeltypes_controller()
default: default:
throw_redirect(page_link_to('angeltypes')); throw_redirect(page_link_to('angeltypes'));
} }
return ['', ''];
} }

View File

@ -1,6 +1,6 @@
<?php <?php
use Engelsystem\Database\DB; use Engelsystem\Database\Db;
use Engelsystem\Models\User\State; use Engelsystem\Models\User\State;
use Engelsystem\Models\User\User; use Engelsystem\Models\User\User;
use Engelsystem\ShiftCalendarRenderer; use Engelsystem\ShiftCalendarRenderer;

View File

@ -1,6 +1,6 @@
<?php <?php
use Engelsystem\Database\DB; use Engelsystem\Database\Db;
use Engelsystem\ValidationResult; use Engelsystem\ValidationResult;
/** /**

View File

@ -1,6 +1,6 @@
<?php <?php
use Engelsystem\Database\DB; use Engelsystem\Database\Db;
/** /**
* Entity needed angeltypes describes how many angels of given type are needed for a shift or in a room. * Entity needed angeltypes describes how many angels of given type are needed for a shift or in a room.

View File

@ -1,7 +1,7 @@
<?php <?php
use Carbon\Carbon; use Carbon\Carbon;
use Engelsystem\Database\DB; use Engelsystem\Database\Db;
use Engelsystem\Models\Room; use Engelsystem\Models\Room;
use Engelsystem\Models\User\User; use Engelsystem\Models\User\User;

View File

@ -1,6 +1,6 @@
<?php <?php
use Engelsystem\Database\DB; use Engelsystem\Database\Db;
/** /**
* Delete a shift type. * Delete a shift type.

View File

@ -1,6 +1,6 @@
<?php <?php
use Engelsystem\Database\DB; use Engelsystem\Database\Db;
use Engelsystem\Models\Room; use Engelsystem\Models\Room;
use Engelsystem\Models\User\User; use Engelsystem\Models\User\User;
use Engelsystem\ShiftsFilter; use Engelsystem\ShiftsFilter;

View File

@ -1,6 +1,6 @@
<?php <?php
use Engelsystem\Database\DB; use Engelsystem\Database\Db;
use Engelsystem\Models\User\User; use Engelsystem\Models\User\User;
/** /**

View File

@ -1,6 +1,6 @@
<?php <?php
use Engelsystem\Database\DB; use Engelsystem\Database\Db;
/** /**
* Returns a new empty UserDriverLicense * Returns a new empty UserDriverLicense

View File

@ -1,6 +1,6 @@
<?php <?php
use Engelsystem\Database\DB; use Engelsystem\Database\Db;
/** /**
* Returns users groups * Returns users groups

View File

@ -1,7 +1,7 @@
<?php <?php
use Carbon\Carbon; use Carbon\Carbon;
use Engelsystem\Database\DB; use Engelsystem\Database\Db;
use Engelsystem\Models\User\User; use Engelsystem\Models\User\User;
use Engelsystem\Models\Worklog; use Engelsystem\Models\Worklog;
use Engelsystem\ValidationResult; use Engelsystem\ValidationResult;

View File

@ -1,6 +1,6 @@
<?php <?php
use Engelsystem\Database\DB; use Engelsystem\Database\Db;
use Engelsystem\Models\User\User; use Engelsystem\Models\User\User;
use Illuminate\Database\Query\JoinClause; use Illuminate\Database\Query\JoinClause;

View File

@ -1,6 +1,6 @@
<?php <?php
use Engelsystem\Database\DB; use Engelsystem\Database\Db;
/** /**
* @return string * @return string

View File

@ -1,6 +1,6 @@
<?php <?php
use Engelsystem\Database\DB; use Engelsystem\Database\Db;
use Engelsystem\Models\Room; use Engelsystem\Models\Room;
/** /**

View File

@ -1,6 +1,6 @@
<?php <?php
use Engelsystem\Database\DB; use Engelsystem\Database\Db;
use Engelsystem\Models\User\User; use Engelsystem\Models\User\User;
/** /**

View File

@ -1,7 +1,7 @@
<?php <?php
use Carbon\Carbon; use Carbon\Carbon;
use Engelsystem\Database\DB; use Engelsystem\Database\Db;
use Engelsystem\Events\Listener\OAuth2; use Engelsystem\Events\Listener\OAuth2;
use Engelsystem\Models\OAuth; use Engelsystem\Models\OAuth;
use Engelsystem\Models\User\Contact; use Engelsystem\Models\User\Contact;

View File

@ -1,6 +1,6 @@
<?php <?php
use Engelsystem\Database\DB; use Engelsystem\Database\Db;
use Engelsystem\Models\User\User; use Engelsystem\Models\User\User;
/** /**

View File

@ -1,6 +1,6 @@
<?php <?php
use Engelsystem\Database\DB; use Engelsystem\Database\Db;
use Engelsystem\Models\Room; use Engelsystem\Models\Room;
use Engelsystem\ShiftsFilter; use Engelsystem\ShiftsFilter;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;

View File

@ -1,6 +1,6 @@
<?php <?php
use Engelsystem\Database\DB; use Engelsystem\Database\Db;
/** /**
* @param int $user_id * @param int $user_id