Add useless comment phpcs sniff

This commit is contained in:
Michael Weimann 2022-12-15 20:20:33 +01:00
parent 61139e03c3
commit 2ad4203dd3
No known key found for this signature in database
GPG Key ID: 34F0524D4DA694A1
144 changed files with 18 additions and 554 deletions

View File

@ -38,4 +38,5 @@
</rule> </rule>
<rule ref="SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion" /> <rule ref="SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion" />
<rule ref="SlevomatCodingStandard.Commenting.EmptyComment" /> <rule ref="SlevomatCodingStandard.Commenting.EmptyComment" />
<rule ref="SlevomatCodingStandard.Commenting.UselessFunctionDocComment" />
</ruleset> </ruleset>

View File

@ -10,9 +10,6 @@ class AngelTypeFactory extends Factory
/** @var string */ /** @var string */
protected $model = AngelType::class; // phpcs:ignore protected $model = AngelType::class; // phpcs:ignore
/**
* @return array
*/
public function definition(): array public function definition(): array
{ {
return [ return [

View File

@ -10,9 +10,6 @@ class FaqFactory extends Factory
/** @var string */ /** @var string */
protected $model = Faq::class; // phpcs:ignore protected $model = Faq::class; // phpcs:ignore
/**
* @return array
*/
public function definition(): array public function definition(): array
{ {
return [ return [

View File

@ -10,9 +10,6 @@ class GroupFactory extends Factory
/** @var string */ /** @var string */
protected $model = Group::class; // phpcs:ignore protected $model = Group::class; // phpcs:ignore
/**
* @return array
*/
public function definition(): array public function definition(): array
{ {
return [ return [

View File

@ -11,9 +11,6 @@ class MessageFactory extends Factory
/** @var string */ /** @var string */
protected $model = Message::class; // phpcs:ignore protected $model = Message::class; // phpcs:ignore
/**
* @return array
*/
public function definition(): array public function definition(): array
{ {
return [ return [

View File

@ -12,9 +12,6 @@ class NewsCommentFactory extends Factory
/** @var string */ /** @var string */
protected $model = NewsComment::class; // phpcs:ignore protected $model = NewsComment::class; // phpcs:ignore
/**
* @return array
*/
public function definition(): array public function definition(): array
{ {
return [ return [

View File

@ -11,9 +11,6 @@ class NewsFactory extends Factory
/** @var string */ /** @var string */
protected $model = News::class; // phpcs:ignore protected $model = News::class; // phpcs:ignore
/**
* @return array
*/
public function definition(): array public function definition(): array
{ {
return [ return [

View File

@ -10,9 +10,6 @@ class PrivilegeFactory extends Factory
/** @var string */ /** @var string */
protected $model = Privilege::class; // phpcs:ignore protected $model = Privilege::class; // phpcs:ignore
/**
* @return array
*/
public function definition(): array public function definition(): array
{ {
return [ return [

View File

@ -12,9 +12,6 @@ class QuestionFactory extends Factory
/** @var string */ /** @var string */
protected $model = Question::class; // phpcs:ignore protected $model = Question::class; // phpcs:ignore
/**
* @return array
*/
public function definition(): array public function definition(): array
{ {
return [ return [

View File

@ -10,9 +10,6 @@ class RoomFactory extends Factory
/** @var string */ /** @var string */
protected $model = Room::class; // phpcs:ignore protected $model = Room::class; // phpcs:ignore
/**
* @return array
*/
public function definition(): array public function definition(): array
{ {
return [ return [

View File

@ -10,9 +10,6 @@ class ScheduleFactory extends Factory
/** @var string */ /** @var string */
protected $model = Schedule::class; // phpcs:ignore protected $model = Schedule::class; // phpcs:ignore
/**
* @return array
*/
public function definition(): array public function definition(): array
{ {
return [ return [

View File

@ -10,9 +10,6 @@ class ShiftTypeFactory extends Factory
/** @var string */ /** @var string */
protected $model = ShiftType::class; // phpcs:ignore protected $model = ShiftType::class; // phpcs:ignore
/**
* @return array
*/
public function definition(): array public function definition(): array
{ {
return [ return [

View File

@ -10,9 +10,6 @@ class ContactFactory extends Factory
/** @var string */ /** @var string */
protected $model = Contact::class; // phpcs:ignore protected $model = Contact::class; // phpcs:ignore
/**
* @return array
*/
public function definition(): array public function definition(): array
{ {
return [ return [

View File

@ -10,9 +10,6 @@ class LicenseFactory extends Factory
/** @var string */ /** @var string */
protected $model = License::class; // phpcs:ignore protected $model = License::class; // phpcs:ignore
/**
* @return array
*/
public function definition(): array public function definition(): array
{ {
$drive_car = $this->faker->boolean(.8); $drive_car = $this->faker->boolean(.8);

View File

@ -10,9 +10,6 @@ class PasswordResetFactory extends Factory
/** @var string */ /** @var string */
protected $model = PasswordReset::class; // phpcs:ignore protected $model = PasswordReset::class; // phpcs:ignore
/**
* @return array
*/
public function definition(): array public function definition(): array
{ {
return [ return [

View File

@ -11,9 +11,6 @@ class PersonalDataFactory extends Factory
/** @var string */ /** @var string */
protected $model = PersonalData::class; // phpcs:ignore protected $model = PersonalData::class; // phpcs:ignore
/**
* @return array
*/
public function definition(): array public function definition(): array
{ {
$arrival = $this->faker->optional()->dateTimeThisMonth('2 weeks'); $arrival = $this->faker->optional()->dateTimeThisMonth('2 weeks');

View File

@ -10,9 +10,6 @@ class SettingsFactory extends Factory
/** @var string */ /** @var string */
protected $model = Settings::class; // phpcs:ignore protected $model = Settings::class; // phpcs:ignore
/**
* @return array
*/
public function definition(): array public function definition(): array
{ {
return [ return [

View File

@ -11,9 +11,6 @@ class StateFactory extends Factory
/** @var string */ /** @var string */
protected $model = State::class; // phpcs:ignore protected $model = State::class; // phpcs:ignore
/**
* @return array
*/
public function definition(): array public function definition(): array
{ {
$arrival = $this->faker->optional()->dateTimeThisMonth(); $arrival = $this->faker->optional()->dateTimeThisMonth();
@ -30,7 +27,6 @@ class StateFactory extends Factory
/** /**
* Indicate that the user is arrived * Indicate that the user is arrived
*
*/ */
public function arrived(): self public function arrived(): self
{ {

View File

@ -10,9 +10,6 @@ class UserFactory extends Factory
/** @var string */ /** @var string */
protected $model = User::class; // phpcs:ignore protected $model = User::class; // phpcs:ignore
/**
* @return array
*/
public function definition(): array public function definition(): array
{ {
return [ return [

View File

@ -12,9 +12,6 @@ class UserAngelTypeFactory extends Factory
/** @var string */ /** @var string */
protected $model = UserAngelType::class; // phpcs:ignore protected $model = UserAngelType::class; // phpcs:ignore
/**
* @return array
*/
public function definition(): array public function definition(): array
{ {
return [ return [

View File

@ -11,9 +11,6 @@ class WorklogFactory extends Factory
/** @var string */ /** @var string */
protected $model = Worklog::class; // phpcs:ignore protected $model = Worklog::class; // phpcs:ignore
/**
* @return array
*/
public function definition(): array public function definition(): array
{ {
return [ return [

View File

@ -36,10 +36,6 @@ trait ChangesReferences
} }
} }
/**
*
* @return array
*/
protected function getReferencingTables(string $table, string $column): array protected function getReferencingTables(string $table, string $column): array
{ {
return $this->schema return $this->schema

View File

@ -186,11 +186,6 @@ function user_angeltype_confirm_controller(): array
]; ];
} }
/**
* @param User $user
* @param AngelType $angeltype
* @return void
*/
function user_angeltype_confirm_email(User $user, AngelType $angeltype): void function user_angeltype_confirm_email(User $user, AngelType $angeltype): void
{ {
if (!$user->settings->email_shiftinfo) { if (!$user->settings->email_shiftinfo) {
@ -216,11 +211,6 @@ function user_angeltype_confirm_email(User $user, AngelType $angeltype): void
} }
} }
/**
* @param User $user
* @param AngelType $angeltype
* @return void
*/
function user_angeltype_add_email(User $user, AngelType $angeltype): void function user_angeltype_add_email(User $user, AngelType $angeltype): void
{ {
if (!$user->settings->email_shiftinfo || $user->id == auth()->user()->id) { if (!$user->settings->email_shiftinfo || $user->id == auth()->user()->id) {

View File

@ -4,9 +4,6 @@ declare(strict_types=1);
use Engelsystem\Renderer\Twig\Extensions\Globals; use Engelsystem\Renderer\Twig\Extensions\Globals;
/**
* @return int
*/
function theme_id(): int function theme_id(): int
{ {
/** @var Globals $globals */ /** @var Globals $globals */
@ -24,9 +21,6 @@ function theme(): array
return config('themes')[$theme_id]; return config('themes')[$theme_id];
} }
/**
* @return string
*/
function theme_type(): string function theme_type(): string
{ {
return theme()['type']; return theme()['type'];

View File

@ -13,26 +13,12 @@ use Symfony\Component\Mailer\Exception\TransportException;
class Shift class Shift
{ {
/**
* @param LoggerInterface $log
* @param EngelsystemMailer $mailer
*/
public function __construct( public function __construct(
protected LoggerInterface $log, protected LoggerInterface $log,
protected EngelsystemMailer $mailer protected EngelsystemMailer $mailer
) { ) {
} }
/**
* @param User $user
* @param Carbon $start
* @param Carbon $end
* @param string $name
* @param string $title
* @param string $type
* @param Room $room
* @return void
*/
public function deletedEntryCreateWorklog( public function deletedEntryCreateWorklog(
User $user, User $user,
Carbon $start, Carbon $start,
@ -71,16 +57,6 @@ class Shift
); );
} }
/**
* @param User $user
* @param Carbon $start
* @param Carbon $end
* @param string $name
* @param string $title
* @param string $type
* @param Room $room
* @return void
*/
public function deletedEntrySendEmail( public function deletedEntrySendEmail(
User $user, User $user,
Carbon $start, Carbon $start,

View File

@ -511,9 +511,6 @@ function admin_shifts()
); );
} }
/**
* @return string
*/
function admin_shifts_history_title(): string function admin_shifts_history_title(): string
{ {
return __('Shifts history'); return __('Shifts history');

View File

@ -58,14 +58,6 @@ class ImportSchedule extends BaseController
/** @var GuzzleClient */ /** @var GuzzleClient */
protected $guzzle; protected $guzzle;
/**
* @param Response $response
* @param SessionInterface $session
* @param GuzzleClient $guzzle
* @param XmlParser $parser
* @param DatabaseConnection $db
* @param LoggerInterface $log
*/
public function __construct( public function __construct(
Response $response, Response $response,
SessionInterface $session, SessionInterface $session,
@ -82,9 +74,6 @@ class ImportSchedule extends BaseController
$this->log = $log; $this->log = $log;
} }
/**
* @return Response
*/
public function index(): Response public function index(): Response
{ {
return $this->response->withView( return $this->response->withView(
@ -96,11 +85,6 @@ class ImportSchedule extends BaseController
); );
} }
/**
* @param Request $request
*
* @return Response
*/
public function edit(Request $request): Response public function edit(Request $request): Response
{ {
$scheduleId = $request->getAttribute('schedule_id'); // optional $scheduleId = $request->getAttribute('schedule_id'); // optional
@ -116,11 +100,6 @@ class ImportSchedule extends BaseController
); );
} }
/**
* @param Request $request
*
* @return Response
*/
public function save(Request $request): Response public function save(Request $request): Response
{ {
$scheduleId = $request->getAttribute('schedule_id'); // optional $scheduleId = $request->getAttribute('schedule_id'); // optional
@ -164,10 +143,6 @@ class ImportSchedule extends BaseController
return redirect('/admin/schedule/load/' . $schedule->id); return redirect('/admin/schedule/load/' . $schedule->id);
} }
/**
* @param Request $request
* @return Response
*/
public function loadSchedule(Request $request): Response public function loadSchedule(Request $request): Response
{ {
try { try {
@ -213,11 +188,6 @@ class ImportSchedule extends BaseController
); );
} }
/**
* @param Request $request
*
* @return Response
*/
public function importSchedule(Request $request): Response public function importSchedule(Request $request): Response
{ {
try { try {
@ -282,9 +252,6 @@ class ImportSchedule extends BaseController
->with('messages', ['schedule.import.success']); ->with('messages', ['schedule.import.success']);
} }
/**
* @param Room $room
*/
protected function createRoom(Room $room): void protected function createRoom(Room $room): void
{ {
$roomModel = new RoomModel(); $roomModel = new RoomModel();
@ -294,9 +261,6 @@ class ImportSchedule extends BaseController
$this->log('Created schedule room "{room}"', ['room' => $room->getName()]); $this->log('Created schedule room "{room}"', ['room' => $room->getName()]);
} }
/**
* @param Event $event
*/
protected function fireDeleteShiftEntryEvents(Event $event): void protected function fireDeleteShiftEntryEvents(Event $event): void
{ {
$shiftEntries = $this->db $shiftEntries = $this->db
@ -327,12 +291,6 @@ class ImportSchedule extends BaseController
} }
} }
/**
* @param Event $shift
* @param int $shiftTypeId
* @param RoomModel $room
* @param ScheduleUrl $scheduleUrl
*/
protected function createEvent(Event $shift, int $shiftTypeId, RoomModel $room, ScheduleUrl $scheduleUrl): void protected function createEvent(Event $shift, int $shiftTypeId, RoomModel $room, ScheduleUrl $scheduleUrl): void
{ {
$user = auth()->user(); $user = auth()->user();
@ -372,11 +330,6 @@ class ImportSchedule extends BaseController
); );
} }
/**
* @param Event $shift
* @param int $shiftTypeId
* @param RoomModel $room
*/
protected function updateEvent(Event $shift, int $shiftTypeId, RoomModel $room): void protected function updateEvent(Event $shift, int $shiftTypeId, RoomModel $room): void
{ {
$user = auth()->user(); $user = auth()->user();
@ -410,9 +363,6 @@ class ImportSchedule extends BaseController
); );
} }
/**
* @param Event $shift
*/
protected function deleteEvent(Event $shift): void protected function deleteEvent(Event $shift): void
{ {
$this->db $this->db
@ -557,10 +507,6 @@ class ImportSchedule extends BaseController
return [$newEvents, $changeEvents, $deleteEvents]; return [$newEvents, $changeEvents, $deleteEvents];
} }
/**
* @param ScheduleShift $scheduleShift
* @return Event
*/
protected function eventFromScheduleShift(ScheduleShift $scheduleShift): Event protected function eventFromScheduleShift(ScheduleShift $scheduleShift): Event
{ {
$shift = $this->loadShift($scheduleShift->shift_id); $shift = $this->loadShift($scheduleShift->shift_id);

View File

@ -21,14 +21,11 @@ class Application extends Container
/** /**
* Registered service providers * Registered service providers
*
* @var array
*/ */
protected array $serviceProviders = []; protected array $serviceProviders = [];
/** /**
* Application constructor. * Application constructor.
*
*/ */
public function __construct(string $appPath = null) public function __construct(string $appPath = null)
{ {

View File

@ -8,8 +8,6 @@ class Config extends Fluent
{ {
/** /**
* The config values * The config values
*
* @var array
*/ */
protected $attributes = []; // phpcs:ignore protected $attributes = []; // phpcs:ignore

View File

@ -10,7 +10,6 @@ use Illuminate\Database\QueryException;
class ConfigServiceProvider extends ServiceProvider class ConfigServiceProvider extends ServiceProvider
{ {
/** @var array */
protected array $configFiles = ['app.php', 'config.default.php', 'config.php']; protected array $configFiles = ['app.php', 'config.default.php', 'config.php'];
public function __construct(Application $app, protected ?EventConfig $eventConfig = null) public function __construct(Application $app, protected ?EventConfig $eventConfig = null)
@ -74,7 +73,6 @@ class ConfigServiceProvider extends ServiceProvider
/** /**
* Get the config path * Get the config path
*
*/ */
protected function getConfigPath(string $path = ''): string protected function getConfigPath(string $path = ''): string
{ {

View File

@ -8,7 +8,6 @@ abstract class ServiceProvider
{ {
/** /**
* ServiceProvider constructor. * ServiceProvider constructor.
*
*/ */
public function __construct(protected Application $app) public function __construct(protected Application $app)
{ {

View File

@ -16,7 +16,7 @@ class FaqController extends BaseController
protected Redirector $redirect; protected Redirector $redirect;
/** @var array */ /** @var array<string> */
protected array $permissions = [ protected array $permissions = [
'faq.view', 'faq.view',
'faq.edit', 'faq.edit',

View File

@ -9,7 +9,7 @@ use Engelsystem\Models\LogEntry;
class LogsController extends BaseController class LogsController extends BaseController
{ {
/** @var array */ /** @var array<string> */
protected array $permissions = [ protected array $permissions = [
'admin_log', 'admin_log',
]; ];

View File

@ -17,7 +17,7 @@ class NewsController extends BaseController
protected Redirector $redirect; protected Redirector $redirect;
/** @var array */ /** @var array<string> */
protected array $permissions = [ protected array $permissions = [
'admin_news', 'admin_news',
]; ];

View File

@ -18,7 +18,7 @@ class QuestionsController extends BaseController
protected Redirector $redirect; protected Redirector $redirect;
/** @var array */ /** @var array<string> */
protected array $permissions = [ protected array $permissions = [
'question.add', 'question.add',
'question.edit', 'question.edit',

View File

@ -18,7 +18,7 @@ class UserShirtController extends BaseController
protected Redirector $redirect; protected Redirector $redirect;
/** @var array */ /** @var array<string, string> */
protected array $permissions = [ protected array $permissions = [
'editShirt' => 'user.edit.shirt', 'editShirt' => 'user.edit.shirt',
'saveShirt' => 'user.edit.shirt', 'saveShirt' => 'user.edit.shirt',

View File

@ -21,7 +21,7 @@ class UserWorkLogController extends BaseController
protected Redirector $redirect; protected Redirector $redirect;
/** @var array */ /** @var array<string> */
protected array $permissions = [ protected array $permissions = [
'admin_user_worklog', 'admin_user_worklog',
]; ];

View File

@ -15,7 +15,7 @@ class AuthController extends BaseController
{ {
use HasUserNotifications; use HasUserNotifications;
/** @var array */ /** @var array<string, string> */
protected array $permissions = [ protected array $permissions = [
'login' => 'login', 'login' => 'login',
'postLogin' => 'login', 'postLogin' => 'login',
@ -45,7 +45,6 @@ class AuthController extends BaseController
/** /**
* Posted login form * Posted login form
*
*/ */
public function postLogin(Request $request): Response public function postLogin(Request $request): Response
{ {

View File

@ -17,7 +17,6 @@ class DesignController extends BaseController
/** /**
* Show the design overview page * Show the design overview page
*
*/ */
public function index(): Response public function index(): Response
{ {

View File

@ -15,9 +15,6 @@ trait HasUserNotifications
); );
} }
/**
* @return array
*/
protected function getNotifications(): array protected function getNotifications(): array
{ {
$return = []; $return = [];

View File

@ -203,7 +203,6 @@ class Controller extends BaseController
/** /**
* Ensure that the if the request is authorized * Ensure that the if the request is authorized
*
*/ */
protected function checkAuth(bool $isJson = false): void protected function checkAuth(bool $isJson = false): void
{ {
@ -225,8 +224,6 @@ class Controller extends BaseController
/** /**
* Formats the stats collection as stats data * Formats the stats collection as stats data
*
* @return array
*/ */
protected function formatStats(Collection $data, string $config, string $dataField, ?string $label = null): array protected function formatStats(Collection $data, string $config, string $dataField, ?string $label = null): array
{ {

View File

@ -58,8 +58,6 @@ class MetricsEngine implements EngineInterface
} }
/** /**
* @param array $row
*
* @return array[] * @return array[]
*/ */
protected function formatHistogram(array $row, string $name): array protected function formatHistogram(array $row, string $name): array
@ -89,8 +87,6 @@ class MetricsEngine implements EngineInterface
/** /**
* Expand the value to be an array * Expand the value to be an array
*
* @return array
*/ */
protected function expandData(mixed $data): array protected function expandData(mixed $data): array
{ {
@ -131,11 +127,6 @@ class MetricsEngine implements EngineInterface
); );
} }
/**
* @param array $labels
*
* @return mixed
*/
protected function renderLabels(array $labels): string protected function renderLabels(array $labels): string
{ {
if (empty($labels)) { if (empty($labels)) {

View File

@ -72,7 +72,6 @@ class Stats
/** /**
* The number of not arrived users * The number of not arrived users
*
*/ */
public function newUsers(): int public function newUsers(): int
{ {
@ -142,11 +141,6 @@ class Stats
return (int)$this->vouchersQuery()->sum('got_voucher'); return (int)$this->vouchersQuery()->sum('got_voucher');
} }
/**
* @param array $buckets
*
* @return array
*/
public function vouchersBuckets(array $buckets): array public function vouchersBuckets(array $buckets): array
{ {
$return = []; $return = [];
@ -255,11 +249,9 @@ class Stats
/** /**
* The number of worked shifts * The number of worked shifts
* *
* @param array $buckets
* @param bool|null $done * @param bool|null $done
* @param bool|null $freeloaded * @param bool|null $freeloaded
* *
* @return array
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function workBuckets(array $buckets, bool $done = null, bool $freeloaded = null): array public function workBuckets(array $buckets, bool $done = null, bool $freeloaded = null): array
@ -274,9 +266,6 @@ class Stats
} }
/** /**
* @param array $buckets
*
* @return array
* @codeCoverageIgnore As long as its only used for old tables * @codeCoverageIgnore As long as its only used for old tables
*/ */
protected function getBuckets( protected function getBuckets(
@ -312,9 +301,6 @@ class Stats
} }
/** /**
* @param array $buckets
*
* @return array
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function worklogBuckets(array $buckets): array public function worklogBuckets(array $buckets): array

View File

@ -18,7 +18,7 @@ class NewsController extends BaseController
protected Redirector $redirect; protected Redirector $redirect;
/** @var array */ /** @var array<string, string> */
protected array $permissions = [ protected array $permissions = [
'news', 'news',
'meetings' => 'user_meetings', 'meetings' => 'user_meetings',
@ -153,9 +153,6 @@ class NewsController extends BaseController
); );
} }
/**
* @param array $data
*/
protected function renderView(string $page, array $data): Response protected function renderView(string $page, array $data): Response
{ {
$data += $this->getNotifications(); $data += $this->getNotifications();

View File

@ -281,10 +281,6 @@ class OAuthController extends BaseController
throw new HttpNotFound('oauth.provider-error'); throw new HttpNotFound('oauth.provider-error');
} }
/**
* @param array $config
*
*/
protected function redirectRegister( protected function redirectRegister(
string $providerName, string $providerName,
string $providerUserIdentifier, string $providerUserIdentifier,

View File

@ -15,7 +15,7 @@ class PasswordResetController extends BaseController
{ {
use HasUserNotifications; use HasUserNotifications;
/** @var array */ /** @var array<string, string> */
protected array $permissions = [ protected array $permissions = [
'reset' => 'login', 'reset' => 'login',
'postReset' => 'login', 'postReset' => 'login',
@ -97,9 +97,6 @@ class PasswordResetController extends BaseController
return $this->showView('pages/password/reset-success', ['type' => 'reset']); return $this->showView('pages/password/reset-success', ['type' => 'reset']);
} }
/**
* @param array $data
*/
protected function showView(string $view = 'pages/password/reset', array $data = []): Response protected function showView(string $view = 'pages/password/reset', array $data = []): Response
{ {
return $this->response->withView( return $this->response->withView(

View File

@ -229,9 +229,6 @@ class SettingsController extends BaseController
); );
} }
/**
* @return array
*/
public function settingsMenu(): array public function settingsMenu(): array
{ {
$menu = [ $menu = [

View File

@ -14,7 +14,6 @@ class Database
/** /**
* Run a select query * Run a select query
* *
* @param array $bindings
* @return object[] * @return object[]
*/ */
public function select(string $query, array $bindings = []): array public function select(string $query, array $bindings = []): array
@ -24,8 +23,6 @@ class Database
/** /**
* Run a select query and return only the first result or null if no result is found. * Run a select query and return only the first result or null if no result is found.
*
* @param array $bindings
*/ */
public function selectOne(string $query, array $bindings = []): ?object public function selectOne(string $query, array $bindings = []): ?object
{ {
@ -34,8 +31,6 @@ class Database
/** /**
* Run an insert query * Run an insert query
*
* @param array $bindings
*/ */
public function insert(string $query, array $bindings = []): bool public function insert(string $query, array $bindings = []): bool
{ {
@ -44,8 +39,6 @@ class Database
/** /**
* Run an update query * Run an update query
*
* @param array $bindings
*/ */
public function update(string $query, array $bindings = []): int public function update(string $query, array $bindings = []): int
{ {
@ -54,8 +47,6 @@ class Database
/** /**
* Run a delete query * Run a delete query
*
* @param array $bindings
*/ */
public function delete(string $query, array $bindings = []): int public function delete(string $query, array $bindings = []): int
{ {
@ -64,7 +55,6 @@ class Database
/** /**
* Get the PDO instance * Get the PDO instance
*
*/ */
public function getPdo(): PDO public function getPdo(): PDO
{ {

View File

@ -13,7 +13,6 @@ class Db
/** /**
* Set the database connection manager * Set the database connection manager
*
*/ */
public static function setDbManager(CapsuleManager $dbManager): void public static function setDbManager(CapsuleManager $dbManager): void
{ {
@ -23,7 +22,6 @@ class Db
/** /**
* Run a select query * Run a select query
* *
* @param array $bindings
* @return array[] * @return array[]
*/ */
public static function select(string $query, array $bindings = []): array public static function select(string $query, array $bindings = []): array
@ -41,7 +39,6 @@ class Db
/** /**
* Run a select query and return only the first result or null if no result is found. * Run a select query and return only the first result or null if no result is found.
* *
* @param array $bindings
* @return array|null * @return array|null
*/ */
public static function selectOne(string $query, array $bindings = []): ?array public static function selectOne(string $query, array $bindings = []): ?array
@ -59,8 +56,6 @@ class Db
/** /**
* Run an insert query * Run an insert query
*
* @param array $bindings
*/ */
public static function insert(string $query, array $bindings = []): bool public static function insert(string $query, array $bindings = []): bool
{ {
@ -69,8 +64,6 @@ class Db
/** /**
* Run an update query * Run an update query
*
* @param array $bindings
*/ */
public static function update(string $query, array $bindings = []): int public static function update(string $query, array $bindings = []): int
{ {
@ -79,8 +72,6 @@ class Db
/** /**
* Run a delete query * Run a delete query
*
* @param array $bindings
*/ */
public static function delete(string $query, array $bindings = []): int public static function delete(string $query, array $bindings = []): int
{ {
@ -94,7 +85,6 @@ class Db
/** /**
* Get the PDO instance * Get the PDO instance
*
*/ */
public static function getPdo(): PDO public static function getPdo(): PDO
{ {

View File

@ -26,7 +26,6 @@ class Migrate
/** /**
* Migrate constructor * Migrate constructor
*
*/ */
public function __construct(protected SchemaBuilder $schema, protected Application $app) public function __construct(protected SchemaBuilder $schema, protected Application $app)
{ {
@ -107,7 +106,6 @@ class Migrate
/** /**
* Merge file migrations with already migrated tables * Merge file migrations with already migrated tables
*
*/ */
protected function mergeMigrations(Collection $migrations, Collection $migrated): Collection protected function mergeMigrations(Collection $migrations, Collection $migrated): Collection
{ {
@ -136,7 +134,6 @@ class Migrate
/** /**
* Get all migrated migrations * Get all migrated migrations
*
*/ */
protected function getMigrated(): Collection protected function getMigrated(): Collection
{ {
@ -216,8 +213,6 @@ class Migrate
/** /**
* Get a list of migration files * Get a list of migration files
*
*
*/ */
protected function getMigrations(string $dir): Collection protected function getMigrations(string $dir): Collection
{ {
@ -239,9 +234,6 @@ class Migrate
/** /**
* List all migration files from the given directory * List all migration files from the given directory
*
*
* @return array
*/ */
protected function getMigrationFiles(string $dir): array protected function getMigrationFiles(string $dir): array
{ {
@ -250,7 +242,6 @@ class Migrate
/** /**
* Init a table query * Init a table query
*
*/ */
protected function getTableQuery(): Builder protected function getTableQuery(): Builder
{ {
@ -259,7 +250,6 @@ class Migrate
/** /**
* Set the output function * Set the output function
*
*/ */
public function setOutput(callable $output): void public function setOutput(callable $output): void
{ {

View File

@ -10,7 +10,6 @@ abstract class Migration
/** /**
* Migration constructor. * Migration constructor.
*
*/ */
public function __construct(SchemaBuilder $schemaBuilder) public function __construct(SchemaBuilder $schemaBuilder)
{ {

View File

@ -29,7 +29,6 @@ class EventDispatcher
/** /**
* @param bool $halt Stop on first non-null return * @param bool $halt Stop on first non-null return
*
*/ */
public function dispatch(string|object $event, mixed $payload = [], bool $halt = false): mixed public function dispatch(string|object $event, mixed $payload = [], bool $halt = false): mixed
{ {

View File

@ -12,7 +12,6 @@ use Psr\Log\LoggerInterface;
class OAuth2 class OAuth2
{ {
/** @var array */
protected array $config; protected array $config;
public function __construct(Config $config, protected LoggerInterface $log, protected Authenticator $auth) public function __construct(Config $config, protected LoggerInterface $log, protected Authenticator $auth)

View File

@ -32,10 +32,6 @@ class LegacyDevelopment extends Legacy
echo '</pre>'; echo '</pre>';
} }
/**
* @param array $stackTrace
* @return array
*/
protected function formatStackTrace(array $stackTrace): array protected function formatStackTrace(array $stackTrace): array
{ {
$return = []; $return = [];

View File

@ -17,7 +17,6 @@ class Whoops extends Legacy implements HandlerInterface
/** /**
* Whoops constructor. * Whoops constructor.
*
*/ */
public function __construct(Container $app) public function __construct(Container $app)
{ {
@ -71,8 +70,6 @@ class Whoops extends Legacy implements HandlerInterface
/** /**
* Aggregate application data * Aggregate application data
*
* @return array
*/ */
protected function getData(): array protected function getData(): array
{ {

View File

@ -31,7 +31,6 @@ class Authenticator
/** /**
* Load the user from session * Load the user from session
*
*/ */
public function user(): ?User public function user(): ?User
{ {
@ -58,7 +57,6 @@ class Authenticator
/** /**
* Get the user by his api key * Get the user by his api key
*
*/ */
public function apiUser(string $parameter = 'api_key'): ?User public function apiUser(string $parameter = 'api_key'): ?User
{ {

View File

@ -10,7 +10,6 @@ class Conference
/** /**
* Event constructor. * Event constructor.
*
*/ */
public function __construct( public function __construct(
protected string $title, protected string $title,

View File

@ -14,8 +14,6 @@ class Event
protected Carbon $endDate; protected Carbon $endDate;
/** /**
* Event constructor.
*
* @param string $guid globally unique * @param string $guid globally unique
* @param int $id globally unique * @param int $id globally unique
* @param string $start time (hh:mm:ss || hh:mm) * @param string $start time (hh:mm:ss || hh:mm)
@ -153,17 +151,11 @@ class Event
return $this->recording; return $this->recording;
} }
/**
* @return array
*/
public function getLinks(): array public function getLinks(): array
{ {
return $this->links; return $this->links;
} }
/**
* @return array
*/
public function getAttachments(): array public function getAttachments(): array
{ {
return $this->attachments; return $this->attachments;

View File

@ -76,7 +76,6 @@ class XmlParser
/** /**
* @param SimpleXMLElement[] $eventElements * @param SimpleXMLElement[] $eventElements
* @return array
*/ */
protected function parseEvents(array $eventElements, Room $room): array protected function parseEvents(array $eventElements, Room $room): array
{ {
@ -130,8 +129,6 @@ class XmlParser
/** /**
* Resolves a list from a sequence of elements * Resolves a list from a sequence of elements
*
* @return array
*/ */
protected function getListFromSequence( protected function getListFromSequence(
SimpleXMLElement $element, SimpleXMLElement $element,

View File

@ -9,7 +9,6 @@ class Shifts
{ {
/** /**
* Check if a time range is a night shift * Check if a time range is a night shift
*
*/ */
public static function isNightShift(Carbon $start, Carbon $end): bool public static function isNightShift(Carbon $start, Carbon $end): bool
{ {
@ -23,7 +22,6 @@ class Shifts
/** /**
* Calculate a shifts night multiplier * Calculate a shifts night multiplier
*
*/ */
public static function getNightShiftMultiplier(Carbon $start, Carbon $end): float public static function getNightShiftMultiplier(Carbon $start, Carbon $end): float
{ {

View File

@ -32,8 +32,6 @@ class Translator
/** /**
* Get the translation for a given key * Get the translation for a given key
*
* @param array $replace
*/ */
public function translate(string $key, array $replace = []): string public function translate(string $key, array $replace = []): string
{ {
@ -42,18 +40,12 @@ class Translator
/** /**
* Get the translation for a given key * Get the translation for a given key
*
* @param array $replace
*/ */
public function translatePlural(string $key, string $pluralKey, int $number, array $replace = []): string public function translatePlural(string $key, string $pluralKey, int $number, array $replace = []): string
{ {
return $this->translateText('ngettext', [$key, $pluralKey, $number], $replace); return $this->translateText('ngettext', [$key, $pluralKey, $number], $replace);
} }
/**
* @param array $parameters
* @param array $replace
*/
protected function translateText(string $type, array $parameters, array $replace = []): mixed protected function translateText(string $type, array $parameters, array $replace = []): mixed
{ {
$translated = $parameters[0]; $translated = $parameters[0];
@ -74,8 +66,6 @@ class Translator
/** /**
* Replace placeholders * Replace placeholders
*
* @param array $replace
*/ */
protected function replaceText(string $key, array $replace = []): mixed protected function replaceText(string $key, array $replace = []): mixed
{ {

View File

@ -7,7 +7,6 @@ use Throwable;
class HttpAuthExpired extends HttpException class HttpAuthExpired extends HttpException
{ {
/** /**
* @param array $headers
* @param Throwable|null $previous * @param Throwable|null $previous
*/ */
public function __construct( public function __construct(

View File

@ -8,7 +8,6 @@ use Throwable;
class HttpException extends RuntimeException class HttpException extends RuntimeException
{ {
/** /**
* @param array $headers
* @param Throwable|null $previous * @param Throwable|null $previous
*/ */
public function __construct( public function __construct(
@ -22,9 +21,6 @@ class HttpException extends RuntimeException
parent::__construct($message, $code, $previous); parent::__construct($message, $code, $previous);
} }
/**
* @return array
*/
public function getHeaders(): array public function getHeaders(): array
{ {
return $this->headers; return $this->headers;

View File

@ -7,7 +7,6 @@ use Throwable;
class HttpForbidden extends HttpException class HttpForbidden extends HttpException
{ {
/** /**
* @param array $headers
* @param Throwable|null $previous * @param Throwable|null $previous
*/ */
public function __construct( public function __construct(

View File

@ -7,7 +7,6 @@ use Throwable;
class HttpNotFound extends HttpException class HttpNotFound extends HttpException
{ {
/** /**
* @param array $headers
* @param Throwable|null $previous * @param Throwable|null $previous
*/ */
public function __construct( public function __construct(

View File

@ -4,9 +4,6 @@ namespace Engelsystem\Http\Exceptions;
class HttpPermanentRedirect extends HttpRedirect class HttpPermanentRedirect extends HttpRedirect
{ {
/**
* @param array $headers
*/
public function __construct( public function __construct(
string $url, string $url,
array $headers = [] array $headers = []

View File

@ -4,9 +4,6 @@ namespace Engelsystem\Http\Exceptions;
class HttpRedirect extends HttpException class HttpRedirect extends HttpException
{ {
/**
* @param array $headers
*/
public function __construct( public function __construct(
string $url, string $url,
int $statusCode = 302, int $statusCode = 302,

View File

@ -4,9 +4,6 @@ namespace Engelsystem\Http\Exceptions;
class HttpTemporaryRedirect extends HttpRedirect class HttpTemporaryRedirect extends HttpRedirect
{ {
/**
* @param array $headers
*/
public function __construct( public function __construct(
string $url, string $url,
array $headers = [] array $headers = []

View File

@ -13,17 +13,12 @@ class Redirector
/** /**
* Redirects to a path, generating a full URL * Redirects to a path, generating a full URL
*
* @param array $headers
*/ */
public function to(string $path, int $status = 302, array $headers = []): Response public function to(string $path, int $status = 302, array $headers = []): Response
{ {
return $this->response->redirectTo($this->url->to($path), $status, $headers); return $this->response->redirectTo($this->url->to($path), $status, $headers);
} }
/**
* @param array $headers
*/
public function back(int $status = 302, array $headers = []): Response public function back(int $status = 302, array $headers = []): Response
{ {
return $this->to($this->getPreviousUrl(), $status, $headers); return $this->to($this->getPreviousUrl(), $status, $headers);

View File

@ -15,7 +15,6 @@ class Request extends SymfonyRequest implements ServerRequestInterface
/** /**
* Get POST input * Get POST input
*
*/ */
public function postData(string $key, mixed $default = null): mixed public function postData(string $key, mixed $default = null): mixed
{ {
@ -24,7 +23,6 @@ class Request extends SymfonyRequest implements ServerRequestInterface
/** /**
* Get input data * Get input data
*
*/ */
public function input(string $key, mixed $default = null): mixed public function input(string $key, mixed $default = null): mixed
{ {
@ -33,7 +31,6 @@ class Request extends SymfonyRequest implements ServerRequestInterface
/** /**
* Checks if the input exists * Checks if the input exists
*
*/ */
public function has(string $key): bool public function has(string $key): bool
{ {
@ -44,7 +41,6 @@ class Request extends SymfonyRequest implements ServerRequestInterface
/** /**
* Checks if the POST data exists * Checks if the POST data exists
*
*/ */
public function hasPostData(string $key): bool public function hasPostData(string $key): bool
{ {
@ -55,7 +51,6 @@ class Request extends SymfonyRequest implements ServerRequestInterface
/** /**
* Get the requested path * Get the requested path
*
*/ */
public function path(): string public function path(): string
{ {
@ -66,7 +61,6 @@ class Request extends SymfonyRequest implements ServerRequestInterface
/** /**
* Return the current URL * Return the current URL
*
*/ */
public function url(): string public function url(): string
{ {
@ -87,7 +81,6 @@ class Request extends SymfonyRequest implements ServerRequestInterface
* *
* If no URI is available, and no request-target has been specifically * If no URI is available, and no request-target has been specifically
* provided, this method MUST return the string "/". * provided, this method MUST return the string "/".
*
*/ */
public function getRequestTarget(): string public function getRequestTarget(): string
{ {
@ -185,8 +178,6 @@ class Request extends SymfonyRequest implements ServerRequestInterface
* Retrieves data related to the incoming request environment, * Retrieves data related to the incoming request environment,
* typically derived from PHP's $_SERVER superglobal. The data IS NOT * typically derived from PHP's $_SERVER superglobal. The data IS NOT
* REQUIRED to originate from $_SERVER. * REQUIRED to originate from $_SERVER.
*
* @return array
*/ */
public function getServerParams(): array public function getServerParams(): array
{ {
@ -200,8 +191,6 @@ class Request extends SymfonyRequest implements ServerRequestInterface
* *
* The data MUST be compatible with the structure of the $_COOKIE * The data MUST be compatible with the structure of the $_COOKIE
* superglobal. * superglobal.
*
* @return array
*/ */
public function getCookieParams(): array public function getCookieParams(): array
{ {
@ -243,8 +232,6 @@ class Request extends SymfonyRequest implements ServerRequestInterface
* params. If you need to ensure you are only getting the original * params. If you need to ensure you are only getting the original
* values, you may need to parse the query string from `getUri()->getQuery()` * values, you may need to parse the query string from `getUri()->getQuery()`
* or from the `QUERY_STRING` server param. * or from the `QUERY_STRING` server param.
*
* @return array
*/ */
public function getQueryParams(): array public function getQueryParams(): array
{ {

View File

@ -9,7 +9,6 @@ use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
class RequestServiceProvider extends ServiceProvider class RequestServiceProvider extends ServiceProvider
{ {
/** @var array */
protected array $appUrl; protected array $appUrl;
public function register(): void public function register(): void
@ -79,8 +78,6 @@ class RequestServiceProvider extends ServiceProvider
* Set the trusted Proxies * Set the trusted Proxies
* *
* Required for unit tests (static methods can't be mocked) * Required for unit tests (static methods can't be mocked)
*
* @param array $proxies
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
protected function setTrustedProxies( protected function setTrustedProxies(

View File

@ -92,7 +92,6 @@ class Response extends SymfonyResponse implements ResponseInterface
* This method retains the immutability of the message and returns * This method retains the immutability of the message and returns
* an instance with the updated status and headers * an instance with the updated status and headers
* *
* @param array $data
* @param string[]|string[][] $headers * @param string[]|string[][] $headers
*/ */
public function withView(string $view, array $data = [], int $status = 200, array $headers = []): Response public function withView(string $view, array $data = [], int $status = 200, array $headers = []): Response
@ -117,8 +116,6 @@ class Response extends SymfonyResponse implements ResponseInterface
* *
* This method retains the immutability of the message and returns * This method retains the immutability of the message and returns
* an instance with the updated status and headers * an instance with the updated status and headers
*
* @param array $headers
*/ */
public function redirectTo(string $path, int $status = 302, array $headers = []): Response public function redirectTo(string $path, int $status = 302, array $headers = []): Response
{ {
@ -134,7 +131,6 @@ class Response extends SymfonyResponse implements ResponseInterface
/** /**
* Set the renderer to use * Set the renderer to use
*
*/ */
public function setRenderer(Renderer $renderer): void public function setRenderer(Renderer $renderer): void
{ {
@ -143,7 +139,6 @@ class Response extends SymfonyResponse implements ResponseInterface
/** /**
* Sets a session attribute (which is mutable) * Sets a session attribute (which is mutable)
*
*/ */
public function with(string $key, mixed $value): Response public function with(string $key, mixed $value): Response
{ {
@ -163,8 +158,6 @@ class Response extends SymfonyResponse implements ResponseInterface
/** /**
* Sets form data to the mutable session * Sets form data to the mutable session
*
* @param array $input
*/ */
public function withInput(array $input): Response public function withInput(array $input): Response
{ {

View File

@ -38,7 +38,6 @@ class SessionServiceProvider extends ServiceProvider
/** /**
* Returns the session storage * Returns the session storage
*
*/ */
protected function getSessionStorage(): SessionStorageInterface protected function getSessionStorage(): SessionStorageInterface
{ {
@ -69,7 +68,6 @@ class SessionServiceProvider extends ServiceProvider
/** /**
* Test if is called from cli * Test if is called from cli
*
*/ */
protected function isCli(): bool protected function isCli(): bool
{ {

View File

@ -12,7 +12,6 @@ class UrlGenerator implements UrlGeneratorInterface
/** /**
* Create a URL for the given path, using the applications base url if configured * Create a URL for the given path, using the applications base url if configured
* *
* @param array $parameters
* @return string url in the form [app url]/[path]?[parameters] * @return string url in the form [app url]/[path]?[parameters]
*/ */
public function to(string $path, array $parameters = []): string public function to(string $path, array $parameters = []): string
@ -33,7 +32,6 @@ class UrlGenerator implements UrlGeneratorInterface
/** /**
* Check if the URL is valid * Check if the URL is valid
*
*/ */
public function isValidUrl(string $path): bool public function isValidUrl(string $path): bool
{ {

View File

@ -7,8 +7,5 @@ namespace Engelsystem\Http;
*/ */
interface UrlGeneratorInterface interface UrlGeneratorInterface
{ {
/**
* @param array $parameters
*/
public function to(string $path, array $parameters = []): string; public function to(string $path, array $parameters = []): string;
} }

View File

@ -10,7 +10,6 @@ trait StringInputLength
{ {
/** /**
* Use the input length of a string * Use the input length of a string
*
*/ */
public function validate(mixed $input): bool public function validate(mixed $input): bool
{ {

View File

@ -9,10 +9,6 @@ trait ValidatesRequest
{ {
protected Validator $validator; protected Validator $validator;
/**
* @param array $rules
* @return array
*/
protected function validate(Request $request, array $rules): array protected function validate(Request $request, array $rules): array
{ {
$isValid = $this->validator->validate( $isValid = $this->validator->validate(

View File

@ -12,10 +12,8 @@ class Validator
/** @var string[] */ /** @var string[] */
protected array $errors = []; protected array $errors = [];
/** @var array */
protected array $data = []; protected array $data = [];
/** @var array */
protected array $mapping = [ protected array $mapping = [
'accepted' => 'TrueVal', 'accepted' => 'TrueVal',
'int' => 'IntVal', 'int' => 'IntVal',
@ -23,13 +21,8 @@ class Validator
'required' => 'NotEmpty', 'required' => 'NotEmpty',
]; ];
/** @var array */
protected array $nestedRules = ['optional', 'not']; protected array $nestedRules = ['optional', 'not'];
/**
* @param array $data
* @param array $rules
*/
public function validate(array $data, array $rules): bool public function validate(array $data, array $rules): bool
{ {
$this->errors = []; $this->errors = [];
@ -96,9 +89,6 @@ class Validator
return $mapping[$rule] ?? $rule; return $mapping[$rule] ?? $rule;
} }
/**
* @return array
*/
public function getData(): array public function getData(): array
{ {
return $this->data; return $this->data;

View File

@ -29,9 +29,6 @@ class Logger extends AbstractLogger
/** /**
* Logs with an arbitrary level. * Logs with an arbitrary level.
*
* @param array $context
*
*/ */
public function log(mixed $level, string|Stringable $message, array $context = []): void public function log(mixed $level, string|Stringable $message, array $context = []): void
{ {
@ -50,8 +47,6 @@ class Logger extends AbstractLogger
/** /**
* Interpolates context values into the message placeholders. * Interpolates context values into the message placeholders.
*
* @param array $context
*/ */
protected function interpolate(string $message, array $context = []): string protected function interpolate(string $message, array $context = []): string
{ {

View File

@ -12,9 +12,6 @@ class UserAwareLogger extends Logger
/** /**
* Logs with an arbitrary level and prepends the user * Logs with an arbitrary level and prepends the user
*
* @param array $context
*
* @throws InvalidArgumentException * @throws InvalidArgumentException
*/ */
public function log(mixed $level, string|Stringable $message, array $context = []): void public function log(mixed $level, string|Stringable $message, array $context = []): void

View File

@ -29,7 +29,6 @@ class EngelsystemMailer extends Mailer
/** /**
* @param string|string[]|User $to * @param string|string[]|User $to
* @param array $data
*/ */
public function sendViewTranslated( public function sendViewTranslated(
string|array|User $to, string|array|User $to,
@ -65,7 +64,6 @@ class EngelsystemMailer extends Mailer
* Send a template * Send a template
* *
* @param string|string[] $to * @param string|string[] $to
* @param array $data
*/ */
public function sendView(string|array $to, string $subject, string $template, array $data = []): void public function sendView(string|array $to, string $subject, string $template, array $data = []): void
{ {

View File

@ -44,9 +44,6 @@ class MailerServiceProvider extends ServiceProvider
$this->app->instance('mailer', $mailer); $this->app->instance('mailer', $mailer);
} }
/**
* @param array $config
*/
protected function getTransport(?string $transport, array $config): TransportInterface protected function getTransport(?string $transport, array $config): TransportInterface
{ {
switch ($transport) { switch ($transport) {
@ -62,9 +59,6 @@ class MailerServiceProvider extends ServiceProvider
} }
} }
/**
* @param array $config
*/
protected function getSmtpTransport(array $config): SmtpTransport protected function getSmtpTransport(array $config): SmtpTransport
{ {
/** @var EsmtpTransport $transport */ /** @var EsmtpTransport $transport */

View File

@ -16,7 +16,6 @@ class LogTransport extends AbstractTransport
/** /**
* Send the message to log * Send the message to log
*
*/ */
protected function doSend(SentMessage $message): void protected function doSend(SentMessage $message): void
{ {

View File

@ -16,7 +16,6 @@ class AddHeaders implements MiddlewareInterface
/** /**
* Process an incoming server request and setting the locale if required * Process an incoming server request and setting the locale if required
*
*/ */
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{ {

View File

@ -29,7 +29,6 @@ class CallableHandler implements MiddlewareInterface, RequestHandlerInterface
/** /**
* Process an incoming server request and return a response, optionally delegating * Process an incoming server request and return a response, optionally delegating
* response creation to a handler. * response creation to a handler.
*
*/ */
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{ {
@ -38,7 +37,6 @@ class CallableHandler implements MiddlewareInterface, RequestHandlerInterface
/** /**
* Handle the request and return a response. * Handle the request and return a response.
*
*/ */
public function handle(ServerRequestInterface $request): ResponseInterface public function handle(ServerRequestInterface $request): ResponseInterface
{ {
@ -47,8 +45,6 @@ class CallableHandler implements MiddlewareInterface, RequestHandlerInterface
/** /**
* Execute the callable and return a response * Execute the callable and return a response
*
* @param array $arguments
*/ */
protected function execute(array $arguments = []): ResponseInterface protected function execute(array $arguments = []): ResponseInterface
{ {

View File

@ -28,7 +28,6 @@ class Dispatcher implements MiddlewareInterface, RequestHandlerInterface
* response creation to a handler. * response creation to a handler.
* *
* Could be used to group middleware * Could be used to group middleware
*
*/ */
public function process( public function process(
ServerRequestInterface $request, ServerRequestInterface $request,
@ -43,7 +42,6 @@ class Dispatcher implements MiddlewareInterface, RequestHandlerInterface
* Handle the request and return a response. * Handle the request and return a response.
* *
* It calls all configured middleware and handles their response * It calls all configured middleware and handles their response
*
*/ */
public function handle(ServerRequestInterface $request): ResponseInterface public function handle(ServerRequestInterface $request): ResponseInterface
{ {

View File

@ -21,7 +21,7 @@ class ErrorHandler implements MiddlewareInterface
/** /**
* A list of inputs that are not saved from form input * A list of inputs that are not saved from form input
* *
* @var array * @var array<string>
*/ */
protected array $formIgnore = [ protected array $formIgnore = [
'password', 'password',
@ -42,7 +42,6 @@ class ErrorHandler implements MiddlewareInterface
* Handles any error messages * Handles any error messages
* *
* Should be added at the beginning * Should be added at the beginning
*
*/ */
public function process( public function process(
ServerRequestInterface $request, ServerRequestInterface $request,
@ -93,7 +92,6 @@ class ErrorHandler implements MiddlewareInterface
/** /**
* Select a view based on the given status code * Select a view based on the given status code
*
*/ */
protected function selectView(int $statusCode): string protected function selectView(int $statusCode): string
{ {
@ -112,7 +110,6 @@ class ErrorHandler implements MiddlewareInterface
/** /**
* Create a new response * Create a new response
* *
* @param array $headers
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
protected function createResponse(string $content = '', int $status = 200, array $headers = []): ResponseInterface protected function createResponse(string $content = '', int $status = 200, array $headers = []): ResponseInterface
@ -122,7 +119,6 @@ class ErrorHandler implements MiddlewareInterface
/** /**
* Create a redirect back response * Create a redirect back response
*
*/ */
protected function redirectBack(): Response protected function redirectBack(): Response
{ {

View File

@ -20,7 +20,6 @@ class ExceptionHandler implements MiddlewareInterface
* Handles any exceptions that occurred inside other middleware while returning it to the default response handler * Handles any exceptions that occurred inside other middleware while returning it to the default response handler
* *
* Should be added at the beginning * Should be added at the beginning
*
*/ */
public function process( public function process(
ServerRequestInterface $request, ServerRequestInterface $request,

View File

@ -37,7 +37,6 @@ class LegacyMiddleware implements MiddlewareInterface
* Handle the request the old way * Handle the request the old way
* *
* Should be used before a 404 is send * Should be used before a 404 is send
*
*/ */
public function process( public function process(
ServerRequestInterface $request, ServerRequestInterface $request,

View File

@ -23,7 +23,6 @@ class RequestHandler implements MiddlewareInterface
/** /**
* Process an incoming server request and return a response, optionally delegating * Process an incoming server request and return a response, optionally delegating
* response creation to a handler. * response creation to a handler.
*
*/ */
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{ {
@ -52,7 +51,6 @@ class RequestHandler implements MiddlewareInterface
/** /**
* Resolve the given class * Resolve the given class
*
*/ */
protected function resolveRequestHandler( protected function resolveRequestHandler(
string|callable|MiddlewareInterface|RequestHandlerInterface $handler string|callable|MiddlewareInterface|RequestHandlerInterface $handler
@ -82,7 +80,6 @@ class RequestHandler implements MiddlewareInterface
/** /**
* Check required page permissions * Check required page permissions
*
*/ */
protected function checkPermissions(BaseController $controller, string $method): bool protected function checkPermissions(BaseController $controller, string $method): bool
{ {

View File

@ -11,7 +11,6 @@ trait ResolvesMiddlewareTrait
{ {
/** /**
* Resolve the middleware with the container * Resolve the middleware with the container
*
*/ */
protected function resolveMiddleware( protected function resolveMiddleware(
string|callable|MiddlewareInterface|RequestHandlerInterface $middleware string|callable|MiddlewareInterface|RequestHandlerInterface $middleware
@ -44,7 +43,6 @@ trait ResolvesMiddlewareTrait
/** /**
* Checks if the given object is a middleware or middleware or request handler * Checks if the given object is a middleware or middleware or request handler
*
*/ */
protected function isMiddleware(mixed $middleware): bool protected function isMiddleware(mixed $middleware): bool
{ {

View File

@ -29,7 +29,6 @@ class RouteDispatcher implements MiddlewareInterface
/** /**
* Process an incoming server request and return a response, optionally delegating * Process an incoming server request and return a response, optionally delegating
* response creation to a handler. * response creation to a handler.
*
*/ */
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{ {

View File

@ -43,7 +43,6 @@ class RouteDispatcherServiceProvider extends ServiceProvider
/** /**
* Includes the routes.php file * Includes the routes.php file
* *
* @param array $options
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
protected function generateRouting(array $options = []): FastRouteDispatcher protected function generateRouting(array $options = []): FastRouteDispatcher

View File

@ -13,7 +13,6 @@ class SendResponseHandler implements MiddlewareInterface
* Send the server response to the client * Send the server response to the client
* *
* This should be the first middleware * This should be the first middleware
*
*/ */
public function process( public function process(
ServerRequestInterface $request, ServerRequestInterface $request,

View File

@ -11,9 +11,6 @@ use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface;
class SessionHandler implements MiddlewareInterface class SessionHandler implements MiddlewareInterface
{ {
/**
* @param array $paths
*/
public function __construct(protected SessionStorageInterface $session, protected array $paths = []) public function __construct(protected SessionStorageInterface $session, protected array $paths = [])
{ {
} }

View File

@ -21,7 +21,6 @@ class SetLocale implements MiddlewareInterface
/** /**
* Process an incoming server request and setting the locale if required * Process an incoming server request and setting the locale if required
*
*/ */
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{ {

View File

@ -17,7 +17,6 @@ class VerifyCsrfToken implements MiddlewareInterface
/** /**
* Verify csrf tokens * Verify csrf tokens
*
*/ */
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{ {

View File

@ -44,7 +44,6 @@ class EventConfig extends BaseModel
/** /**
* Value accessor * Value accessor
*
*/ */
public function getValueAttribute(mixed $value): mixed public function getValueAttribute(mixed $value): mixed
{ {
@ -91,7 +90,6 @@ class EventConfig extends BaseModel
/** /**
* Check if the value has to be casted * Check if the value has to be casted
*
*/ */
protected function getValueCast(string $value): ?string protected function getValueCast(string $value): ?string
{ {

View File

@ -29,8 +29,6 @@ class LogEntry extends BaseModel
/** /**
* The attributes that are mass assignable. * The attributes that are mass assignable.
*
* @var array
*/ */
protected $fillable = [ // phpcs:ignore protected $fillable = [ // phpcs:ignore
'level', 'level',

View File

@ -64,7 +64,6 @@ class License extends HasUserModel
/** /**
* If the user wants to drive at the event * If the user wants to drive at the event
*
*/ */
public function wantsToDrive(): bool public function wantsToDrive(): bool
{ {

Some files were not shown because too many files have changed in this diff Show More