Set native property types
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
This commit is contained in:
parent
aff8826c99
commit
b004f865b4
|
@ -8,6 +8,7 @@
|
||||||
<file>public/index.php</file>
|
<file>public/index.php</file>
|
||||||
<file>src</file>
|
<file>src</file>
|
||||||
<file>tests</file>
|
<file>tests</file>
|
||||||
|
<exclude-pattern>/config/config.php</exclude-pattern>
|
||||||
|
|
||||||
<rule ref="PSR12" />
|
<rule ref="PSR12" />
|
||||||
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
|
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
|
||||||
|
@ -31,5 +32,9 @@
|
||||||
<exclude-pattern>/includes</exclude-pattern>
|
<exclude-pattern>/includes</exclude-pattern>
|
||||||
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification" />
|
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification" />
|
||||||
</rule>
|
</rule>
|
||||||
|
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint">
|
||||||
|
<exclude-pattern>/includes</exclude-pattern>
|
||||||
|
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification" />
|
||||||
|
</rule>
|
||||||
<rule ref="SlevomatCodingStandard.Commenting.EmptyComment" />
|
<rule ref="SlevomatCodingStandard.Commenting.EmptyComment" />
|
||||||
</ruleset>
|
</ruleset>
|
||||||
|
|
|
@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
class AngelTypeFactory extends Factory
|
class AngelTypeFactory extends Factory
|
||||||
{
|
{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $model = AngelType::class;
|
protected $model = AngelType::class; // phpcs:ignore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
class FaqFactory extends Factory
|
class FaqFactory extends Factory
|
||||||
{
|
{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $model = Faq::class;
|
protected $model = Faq::class; // phpcs:ignore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
class GroupFactory extends Factory
|
class GroupFactory extends Factory
|
||||||
{
|
{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $model = Group::class;
|
protected $model = Group::class; // phpcs:ignore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
@ -9,7 +9,7 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
class MessageFactory extends Factory
|
class MessageFactory extends Factory
|
||||||
{
|
{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $model = Message::class;
|
protected $model = Message::class; // phpcs:ignore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
@ -10,7 +10,7 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
class NewsCommentFactory extends Factory
|
class NewsCommentFactory extends Factory
|
||||||
{
|
{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $model = NewsComment::class;
|
protected $model = NewsComment::class; // phpcs:ignore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
@ -9,7 +9,7 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
class NewsFactory extends Factory
|
class NewsFactory extends Factory
|
||||||
{
|
{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $model = News::class;
|
protected $model = News::class; // phpcs:ignore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
class PrivilegeFactory extends Factory
|
class PrivilegeFactory extends Factory
|
||||||
{
|
{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $model = Privilege::class;
|
protected $model = Privilege::class; // phpcs:ignore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
@ -10,7 +10,7 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
class QuestionFactory extends Factory
|
class QuestionFactory extends Factory
|
||||||
{
|
{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $model = Question::class;
|
protected $model = Question::class; // phpcs:ignore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
class RoomFactory extends Factory
|
class RoomFactory extends Factory
|
||||||
{
|
{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $model = Room::class;
|
protected $model = Room::class; // phpcs:ignore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
class ScheduleFactory extends Factory
|
class ScheduleFactory extends Factory
|
||||||
{
|
{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $model = Schedule::class;
|
protected $model = Schedule::class; // phpcs:ignore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
class ShiftTypeFactory extends Factory
|
class ShiftTypeFactory extends Factory
|
||||||
{
|
{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $model = ShiftType::class;
|
protected $model = ShiftType::class; // phpcs:ignore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
class ContactFactory extends Factory
|
class ContactFactory extends Factory
|
||||||
{
|
{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $model = Contact::class;
|
protected $model = Contact::class; // phpcs:ignore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
class LicenseFactory extends Factory
|
class LicenseFactory extends Factory
|
||||||
{
|
{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $model = License::class;
|
protected $model = License::class; // phpcs:ignore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
class PasswordResetFactory extends Factory
|
class PasswordResetFactory extends Factory
|
||||||
{
|
{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $model = PasswordReset::class;
|
protected $model = PasswordReset::class; // phpcs:ignore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
@ -9,7 +9,7 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
class PersonalDataFactory extends Factory
|
class PersonalDataFactory extends Factory
|
||||||
{
|
{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $model = PersonalData::class;
|
protected $model = PersonalData::class; // phpcs:ignore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
class SettingsFactory extends Factory
|
class SettingsFactory extends Factory
|
||||||
{
|
{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $model = Settings::class;
|
protected $model = Settings::class; // phpcs:ignore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
@ -9,7 +9,7 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
class StateFactory extends Factory
|
class StateFactory extends Factory
|
||||||
{
|
{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $model = State::class;
|
protected $model = State::class; // phpcs:ignore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
class UserFactory extends Factory
|
class UserFactory extends Factory
|
||||||
{
|
{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $model = User::class;
|
protected $model = User::class; // phpcs:ignore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
@ -10,7 +10,7 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
class UserAngelTypeFactory extends Factory
|
class UserAngelTypeFactory extends Factory
|
||||||
{
|
{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $model = UserAngelType::class;
|
protected $model = UserAngelType::class; // phpcs:ignore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
@ -9,7 +9,7 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
class WorklogFactory extends Factory
|
class WorklogFactory extends Factory
|
||||||
{
|
{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $model = Worklog::class;
|
protected $model = Worklog::class; // phpcs:ignore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
@ -6,7 +6,8 @@ use Engelsystem\Database\Migration\Migration;
|
||||||
|
|
||||||
class ImportInstallSql extends Migration
|
class ImportInstallSql extends Migration
|
||||||
{
|
{
|
||||||
protected $oldTables = [
|
/** @var array<string> */
|
||||||
|
protected array $oldTables = [
|
||||||
'AngelTypes',
|
'AngelTypes',
|
||||||
'EventConfig',
|
'EventConfig',
|
||||||
'GroupPrivileges',
|
'GroupPrivileges',
|
||||||
|
|
|
@ -7,7 +7,7 @@ use Engelsystem\Database\Migration\Migration;
|
||||||
class AddAngelSupporterPermissions extends Migration
|
class AddAngelSupporterPermissions extends Migration
|
||||||
{
|
{
|
||||||
/** @var string[] */
|
/** @var string[] */
|
||||||
protected $data = [
|
protected array $data = [
|
||||||
'2-Engel',
|
'2-Engel',
|
||||||
'shiftentry_edit_angeltype_supporter',
|
'shiftentry_edit_angeltype_supporter',
|
||||||
];
|
];
|
||||||
|
|
|
@ -8,7 +8,7 @@ use Illuminate\Database\Schema\Blueprint;
|
||||||
class ChangeUsersContactDectFieldSize extends Migration
|
class ChangeUsersContactDectFieldSize extends Migration
|
||||||
{
|
{
|
||||||
/** @var array */
|
/** @var array */
|
||||||
protected $tables = [
|
protected array $tables = [
|
||||||
'AngelTypes' => 'contact_dect',
|
'AngelTypes' => 'contact_dect',
|
||||||
'users_contact' => 'dect',
|
'users_contact' => 'dect',
|
||||||
];
|
];
|
||||||
|
|
|
@ -11,10 +11,8 @@ class SetAdminPassword extends Migration
|
||||||
{
|
{
|
||||||
use Reference;
|
use Reference;
|
||||||
|
|
||||||
/** @var Authenticator */
|
|
||||||
protected Authenticator $auth;
|
protected Authenticator $auth;
|
||||||
|
|
||||||
/** @var Config */
|
|
||||||
protected Config $config;
|
protected Config $config;
|
||||||
|
|
||||||
public function __construct(SchemaBuilder $schemaBuilder, Authenticator $auth, Config $config)
|
public function __construct(SchemaBuilder $schemaBuilder, Authenticator $auth, Config $config)
|
||||||
|
|
|
@ -39,8 +39,7 @@ class ImportSchedule extends BaseController
|
||||||
/** @var LoggerInterface */
|
/** @var LoggerInterface */
|
||||||
protected $log;
|
protected $log;
|
||||||
|
|
||||||
/** @var array */
|
protected array $permissions = [
|
||||||
protected $permissions = [
|
|
||||||
'schedule.import',
|
'schedule.import',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -12,21 +12,19 @@ use Psr\Http\Server\MiddlewareInterface;
|
||||||
|
|
||||||
class Application extends Container
|
class Application extends Container
|
||||||
{
|
{
|
||||||
/** @var string|null */
|
protected ?string $appPath = null;
|
||||||
protected $appPath = null;
|
|
||||||
|
|
||||||
/** @var bool */
|
protected bool $isBootstrapped = false;
|
||||||
protected $isBootstrapped = false;
|
|
||||||
|
|
||||||
/** @var MiddlewareInterface[]|string[] */
|
/** @var MiddlewareInterface[]|string[] */
|
||||||
protected $middleware;
|
protected array $middleware;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registered service providers
|
* Registered service providers
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $serviceProviders = [];
|
protected array $serviceProviders = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Application constructor.
|
* Application constructor.
|
||||||
|
|
|
@ -11,7 +11,7 @@ class Config extends Fluent
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $attributes = [];
|
protected $attributes = []; // phpcs:ignore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string|array $key
|
* @param string|array $key
|
||||||
|
|
|
@ -11,16 +11,11 @@ use Illuminate\Database\QueryException;
|
||||||
class ConfigServiceProvider extends ServiceProvider
|
class ConfigServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
/** @var array */
|
/** @var array */
|
||||||
protected $configFiles = ['app.php', 'config.default.php', 'config.php'];
|
protected array $configFiles = ['app.php', 'config.default.php', 'config.php'];
|
||||||
|
|
||||||
/** @var EventConfig */
|
public function __construct(Application $app, protected ?EventConfig $eventConfig = null)
|
||||||
protected $eventConfig;
|
|
||||||
|
|
||||||
public function __construct(Application $app, EventConfig $eventConfig = null)
|
|
||||||
{
|
{
|
||||||
parent::__construct($app);
|
parent::__construct($app);
|
||||||
|
|
||||||
$this->eventConfig = $eventConfig;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function register(): void
|
public function register(): void
|
||||||
|
|
|
@ -6,8 +6,7 @@ use Engelsystem\Application;
|
||||||
|
|
||||||
abstract class ServiceProvider
|
abstract class ServiceProvider
|
||||||
{
|
{
|
||||||
/** @var Application */
|
protected Application $app;
|
||||||
protected $app;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ServiceProvider constructor.
|
* ServiceProvider constructor.
|
||||||
|
|
|
@ -14,20 +14,16 @@ class FaqController extends BaseController
|
||||||
{
|
{
|
||||||
use HasUserNotifications;
|
use HasUserNotifications;
|
||||||
|
|
||||||
/** @var LoggerInterface */
|
protected LoggerInterface $log;
|
||||||
protected $log;
|
|
||||||
|
|
||||||
/** @var Faq */
|
protected Faq $faq;
|
||||||
protected $faq;
|
|
||||||
|
|
||||||
/** @var Redirector */
|
protected Redirector $redirect;
|
||||||
protected $redirect;
|
|
||||||
|
|
||||||
/** @var Response */
|
protected Response $response;
|
||||||
protected $response;
|
|
||||||
|
|
||||||
/** @var array */
|
/** @var array */
|
||||||
protected $permissions = [
|
protected array $permissions = [
|
||||||
'faq.view',
|
'faq.view',
|
||||||
'faq.edit',
|
'faq.edit',
|
||||||
];
|
];
|
||||||
|
|
|
@ -9,14 +9,12 @@ use Engelsystem\Models\LogEntry;
|
||||||
|
|
||||||
class LogsController extends BaseController
|
class LogsController extends BaseController
|
||||||
{
|
{
|
||||||
/** @var LogEntry */
|
protected LogEntry $log;
|
||||||
protected $log;
|
|
||||||
|
|
||||||
/** @var Response */
|
protected Response $response;
|
||||||
protected $response;
|
|
||||||
|
|
||||||
/** @var array */
|
/** @var array */
|
||||||
protected $permissions = [
|
protected array $permissions = [
|
||||||
'admin_log',
|
'admin_log',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -15,23 +15,18 @@ class NewsController extends BaseController
|
||||||
{
|
{
|
||||||
use HasUserNotifications;
|
use HasUserNotifications;
|
||||||
|
|
||||||
/** @var Authenticator */
|
protected Authenticator $auth;
|
||||||
protected $auth;
|
|
||||||
|
|
||||||
/** @var LoggerInterface */
|
protected LoggerInterface $log;
|
||||||
protected $log;
|
|
||||||
|
|
||||||
/** @var News */
|
protected News $news;
|
||||||
protected $news;
|
|
||||||
|
|
||||||
/** @var Redirector */
|
protected Redirector $redirect;
|
||||||
protected $redirect;
|
|
||||||
|
|
||||||
/** @var Response */
|
protected Response $response;
|
||||||
protected $response;
|
|
||||||
|
|
||||||
/** @var array */
|
/** @var array */
|
||||||
protected $permissions = [
|
protected array $permissions = [
|
||||||
'admin_news',
|
'admin_news',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -16,23 +16,18 @@ class QuestionsController extends BaseController
|
||||||
{
|
{
|
||||||
use HasUserNotifications;
|
use HasUserNotifications;
|
||||||
|
|
||||||
/** @var Authenticator */
|
protected Authenticator $auth;
|
||||||
protected $auth;
|
|
||||||
|
|
||||||
/** @var LoggerInterface */
|
protected LoggerInterface $log;
|
||||||
protected $log;
|
|
||||||
|
|
||||||
/** @var Question */
|
protected Question $question;
|
||||||
protected $question;
|
|
||||||
|
|
||||||
/** @var Redirector */
|
protected Redirector $redirect;
|
||||||
protected $redirect;
|
|
||||||
|
|
||||||
/** @var Response */
|
protected Response $response;
|
||||||
protected $response;
|
|
||||||
|
|
||||||
/** @var array */
|
/** @var array */
|
||||||
protected $permissions = [
|
protected array $permissions = [
|
||||||
'question.add',
|
'question.add',
|
||||||
'question.edit',
|
'question.edit',
|
||||||
];
|
];
|
||||||
|
|
|
@ -16,26 +16,20 @@ class UserShirtController extends BaseController
|
||||||
{
|
{
|
||||||
use HasUserNotifications;
|
use HasUserNotifications;
|
||||||
|
|
||||||
/** @var Authenticator */
|
protected Authenticator $auth;
|
||||||
protected $auth;
|
|
||||||
|
|
||||||
/** @var Config */
|
protected Config $config;
|
||||||
protected $config;
|
|
||||||
|
|
||||||
/** @var LoggerInterface */
|
protected LoggerInterface $log;
|
||||||
protected $log;
|
|
||||||
|
|
||||||
/** @var Redirector */
|
protected Redirector $redirect;
|
||||||
protected $redirect;
|
|
||||||
|
|
||||||
/** @var Response */
|
protected Response $response;
|
||||||
protected $response;
|
|
||||||
|
|
||||||
/** @var User */
|
protected User $user;
|
||||||
protected $user;
|
|
||||||
|
|
||||||
/** @var array */
|
/** @var array */
|
||||||
protected $permissions = [
|
protected array $permissions = [
|
||||||
'editShirt' => 'user.edit.shirt',
|
'editShirt' => 'user.edit.shirt',
|
||||||
'saveShirt' => 'user.edit.shirt',
|
'saveShirt' => 'user.edit.shirt',
|
||||||
];
|
];
|
||||||
|
|
|
@ -19,29 +19,22 @@ class UserWorkLogController extends BaseController
|
||||||
{
|
{
|
||||||
use HasUserNotifications;
|
use HasUserNotifications;
|
||||||
|
|
||||||
/** @var Authenticator */
|
protected Authenticator $auth;
|
||||||
protected $auth;
|
|
||||||
|
|
||||||
/** @var Config */
|
protected Config $config;
|
||||||
protected $config;
|
|
||||||
|
|
||||||
/** @var LoggerInterface */
|
protected LoggerInterface $log;
|
||||||
protected $log;
|
|
||||||
|
|
||||||
/** @var Worklog */
|
protected Worklog $worklog;
|
||||||
protected $worklog;
|
|
||||||
|
|
||||||
/** @var Redirector */
|
protected Redirector $redirect;
|
||||||
protected $redirect;
|
|
||||||
|
|
||||||
/** @var Response */
|
protected Response $response;
|
||||||
protected $response;
|
|
||||||
|
|
||||||
/** @var User */
|
protected User $user;
|
||||||
protected $user;
|
|
||||||
|
|
||||||
/** @var array */
|
/** @var array */
|
||||||
protected $permissions = [
|
protected array $permissions = [
|
||||||
'admin_user_worklog',
|
'admin_user_worklog',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,7 @@ use Engelsystem\Http\Response;
|
||||||
|
|
||||||
class ApiController extends BaseController
|
class ApiController extends BaseController
|
||||||
{
|
{
|
||||||
/** @var Response */
|
protected Response $response;
|
||||||
protected $response;
|
|
||||||
|
|
||||||
public function __construct(Response $response)
|
public function __construct(Response $response)
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,23 +15,18 @@ class AuthController extends BaseController
|
||||||
{
|
{
|
||||||
use HasUserNotifications;
|
use HasUserNotifications;
|
||||||
|
|
||||||
/** @var Response */
|
protected Response $response;
|
||||||
protected $response;
|
|
||||||
|
|
||||||
/** @var SessionInterface */
|
protected SessionInterface $session;
|
||||||
protected $session;
|
|
||||||
|
|
||||||
/** @var Redirector */
|
protected Redirector $redirect;
|
||||||
protected $redirect;
|
|
||||||
|
|
||||||
/** @var Config */
|
protected Config $config;
|
||||||
protected $config;
|
|
||||||
|
|
||||||
/** @var Authenticator */
|
protected Authenticator $auth;
|
||||||
protected $auth;
|
|
||||||
|
|
||||||
/** @var array */
|
/** @var array */
|
||||||
protected $permissions = [
|
protected array $permissions = [
|
||||||
'login' => 'login',
|
'login' => 'login',
|
||||||
'postLogin' => 'login',
|
'postLogin' => 'login',
|
||||||
];
|
];
|
||||||
|
|
|
@ -9,7 +9,7 @@ abstract class BaseController
|
||||||
use ValidatesRequest;
|
use ValidatesRequest;
|
||||||
|
|
||||||
/** @var string[]|string[][] A list of Permissions required to access the controller or certain pages */
|
/** @var string[]|string[][] A list of Permissions required to access the controller or certain pages */
|
||||||
protected $permissions = [];
|
protected array $permissions = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the list of permissions
|
* Returns the list of permissions
|
||||||
|
|
|
@ -8,14 +8,11 @@ use Engelsystem\Http\Response;
|
||||||
|
|
||||||
class CreditsController extends BaseController
|
class CreditsController extends BaseController
|
||||||
{
|
{
|
||||||
/** @var Config */
|
protected Config $config;
|
||||||
protected $config;
|
|
||||||
|
|
||||||
/** @var Response */
|
protected Response $response;
|
||||||
protected $response;
|
|
||||||
|
|
||||||
/** @var Version */
|
protected Version $version;
|
||||||
protected $version;
|
|
||||||
|
|
||||||
public function __construct(Response $response, Config $config, Version $version)
|
public function __construct(Response $response, Config $config, Version $version)
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,11 +11,9 @@ use Engelsystem\Models\User\User;
|
||||||
|
|
||||||
class DesignController extends BaseController
|
class DesignController extends BaseController
|
||||||
{
|
{
|
||||||
/** @var Response */
|
protected Response $response;
|
||||||
protected $response;
|
|
||||||
|
|
||||||
/** @var Config */
|
protected Config $config;
|
||||||
protected $config;
|
|
||||||
|
|
||||||
public function __construct(Response $response, Config $config)
|
public function __construct(Response $response, Config $config)
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,17 +10,14 @@ class FaqController extends BaseController
|
||||||
{
|
{
|
||||||
use HasUserNotifications;
|
use HasUserNotifications;
|
||||||
|
|
||||||
/** @var Config */
|
protected Config $config;
|
||||||
protected $config;
|
|
||||||
|
|
||||||
/** @var Faq */
|
protected Faq $faq;
|
||||||
protected $faq;
|
|
||||||
|
|
||||||
/** @var Response */
|
protected Response $response;
|
||||||
protected $response;
|
|
||||||
|
|
||||||
/** @var string[] */
|
/** @var string[] */
|
||||||
protected $permissions = [
|
protected array $permissions = [
|
||||||
'faq.view',
|
'faq.view',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,7 @@ use Engelsystem\Http\Response;
|
||||||
|
|
||||||
class HealthController extends BaseController
|
class HealthController extends BaseController
|
||||||
{
|
{
|
||||||
/** @var Response */
|
protected Response $response;
|
||||||
protected $response;
|
|
||||||
|
|
||||||
public function __construct(Response $response)
|
public function __construct(Response $response)
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,14 +9,11 @@ use Engelsystem\Http\Response;
|
||||||
|
|
||||||
class HomeController extends BaseController
|
class HomeController extends BaseController
|
||||||
{
|
{
|
||||||
/** @var Authenticator */
|
protected Authenticator $auth;
|
||||||
protected $auth;
|
|
||||||
|
|
||||||
/** @var Config */
|
protected Config $config;
|
||||||
protected $config;
|
|
||||||
|
|
||||||
/** @var Redirector */
|
protected Redirector $redirect;
|
||||||
protected $redirect;
|
|
||||||
|
|
||||||
public function __construct(Authenticator $auth, Config $config, Redirector $redirect)
|
public function __construct(Authenticator $auth, Config $config, Redirector $redirect)
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,32 +12,26 @@ use Engelsystem\Models\User\User;
|
||||||
use Illuminate\Database\Query\Expression as QueryExpression;
|
use Illuminate\Database\Query\Expression as QueryExpression;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Engelsystem\Http\Exceptions\HttpForbidden;
|
use Engelsystem\Http\Exceptions\HttpForbidden;
|
||||||
|
use Psr\Http\Message\RequestInterface;
|
||||||
|
|
||||||
class MessagesController extends BaseController
|
class MessagesController extends BaseController
|
||||||
{
|
{
|
||||||
/** @var Authenticator */
|
protected Authenticator $auth;
|
||||||
protected $auth;
|
|
||||||
|
|
||||||
/** @var Redirector */
|
protected Redirector $redirect;
|
||||||
protected $redirect;
|
|
||||||
|
|
||||||
/** @var Response */
|
protected Response $response;
|
||||||
protected $response;
|
|
||||||
|
|
||||||
/** @var Response */
|
protected RequestInterface $request;
|
||||||
protected $request;
|
|
||||||
|
|
||||||
/** @var Database */
|
protected Database $db;
|
||||||
protected $db;
|
|
||||||
|
|
||||||
/** @var Message */
|
protected Message $message;
|
||||||
protected $message;
|
|
||||||
|
|
||||||
/** @var User */
|
protected User $user;
|
||||||
protected $user;
|
|
||||||
|
|
||||||
/** @var string[] */
|
/** @var string[] */
|
||||||
protected $permissions = [
|
protected array $permissions = [
|
||||||
'user_messages',
|
'user_messages',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -13,23 +13,17 @@ use Psr\Log\LogLevel;
|
||||||
|
|
||||||
class Controller extends BaseController
|
class Controller extends BaseController
|
||||||
{
|
{
|
||||||
/** @var Config */
|
protected Config $config;
|
||||||
protected $config;
|
|
||||||
|
|
||||||
/** @var MetricsEngine */
|
protected MetricsEngine $engine;
|
||||||
protected $engine;
|
|
||||||
|
|
||||||
/** @var Request */
|
protected Request $request;
|
||||||
protected $request;
|
|
||||||
|
|
||||||
/** @var Response */
|
protected Response $response;
|
||||||
protected $response;
|
|
||||||
|
|
||||||
/** @var Stats */
|
protected Stats $stats;
|
||||||
protected $stats;
|
|
||||||
|
|
||||||
/** @var Version */
|
protected Version $version;
|
||||||
protected $version;
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
Response $response,
|
Response $response,
|
||||||
|
|
|
@ -6,8 +6,7 @@ use Engelsystem\Renderer\EngineInterface;
|
||||||
|
|
||||||
class MetricsEngine implements EngineInterface
|
class MetricsEngine implements EngineInterface
|
||||||
{
|
{
|
||||||
/** @var string */
|
protected string $prefix = 'engelsystem_';
|
||||||
protected $prefix = 'engelsystem_';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Render metrics
|
* Render metrics
|
||||||
|
|
|
@ -30,8 +30,7 @@ use Illuminate\Support\Collection;
|
||||||
|
|
||||||
class Stats
|
class Stats
|
||||||
{
|
{
|
||||||
/** @var Database */
|
protected Database $db;
|
||||||
protected $db;
|
|
||||||
|
|
||||||
public function __construct(Database $db)
|
public function __construct(Database $db)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,32 +16,24 @@ class NewsController extends BaseController
|
||||||
{
|
{
|
||||||
use HasUserNotifications;
|
use HasUserNotifications;
|
||||||
|
|
||||||
/** @var Authenticator */
|
protected Authenticator $auth;
|
||||||
protected $auth;
|
|
||||||
|
|
||||||
/** @var NewsComment */
|
protected NewsComment $comment;
|
||||||
protected $comment;
|
|
||||||
|
|
||||||
/** @var Config */
|
protected Config $config;
|
||||||
protected $config;
|
|
||||||
|
|
||||||
/** @var LoggerInterface */
|
protected LoggerInterface $log;
|
||||||
protected $log;
|
|
||||||
|
|
||||||
/** @var News */
|
protected News $news;
|
||||||
protected $news;
|
|
||||||
|
|
||||||
/** @var Redirector */
|
protected Redirector $redirect;
|
||||||
protected $redirect;
|
|
||||||
|
|
||||||
/** @var Response */
|
protected Response $response;
|
||||||
protected $response;
|
|
||||||
|
|
||||||
/** @var Request */
|
protected Request $request;
|
||||||
protected $request;
|
|
||||||
|
|
||||||
/** @var array */
|
/** @var array */
|
||||||
protected $permissions = [
|
protected array $permissions = [
|
||||||
'news',
|
'news',
|
||||||
'meetings' => 'user_meetings',
|
'meetings' => 'user_meetings',
|
||||||
'comment' => 'news_comments',
|
'comment' => 'news_comments',
|
||||||
|
|
|
@ -25,29 +25,21 @@ class OAuthController extends BaseController
|
||||||
{
|
{
|
||||||
use HasUserNotifications;
|
use HasUserNotifications;
|
||||||
|
|
||||||
/** @var Authenticator */
|
protected Authenticator $auth;
|
||||||
protected $auth;
|
|
||||||
|
|
||||||
/** @var AuthController */
|
protected AuthController $authController;
|
||||||
protected $authController;
|
|
||||||
|
|
||||||
/** @var Config */
|
protected Config $config;
|
||||||
protected $config;
|
|
||||||
|
|
||||||
/** @var LoggerInterface */
|
protected LoggerInterface $log;
|
||||||
protected $log;
|
|
||||||
|
|
||||||
/** @var OAuth */
|
protected OAuth $oauth;
|
||||||
protected $oauth;
|
|
||||||
|
|
||||||
/** @var Redirector */
|
protected Redirector $redirector;
|
||||||
protected $redirector;
|
|
||||||
|
|
||||||
/** @var Session */
|
protected Session $session;
|
||||||
protected $session;
|
|
||||||
|
|
||||||
/** @var UrlGenerator */
|
protected UrlGenerator $url;
|
||||||
protected $url;
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
Authenticator $auth,
|
Authenticator $auth,
|
||||||
|
|
|
@ -15,20 +15,16 @@ class PasswordResetController extends BaseController
|
||||||
{
|
{
|
||||||
use HasUserNotifications;
|
use HasUserNotifications;
|
||||||
|
|
||||||
/** @var LoggerInterface */
|
protected LoggerInterface $log;
|
||||||
protected $log;
|
|
||||||
|
|
||||||
/** @var EngelsystemMailer */
|
protected EngelsystemMailer $mail;
|
||||||
protected $mail;
|
|
||||||
|
|
||||||
/** @var Response */
|
protected Response $response;
|
||||||
protected $response;
|
|
||||||
|
|
||||||
/** @var SessionInterface */
|
protected SessionInterface $session;
|
||||||
protected $session;
|
|
||||||
|
|
||||||
/** @var array */
|
/** @var array */
|
||||||
protected $permissions = [
|
protected array $permissions = [
|
||||||
'reset' => 'login',
|
'reset' => 'login',
|
||||||
'postReset' => 'login',
|
'postReset' => 'login',
|
||||||
'resetPassword' => 'login',
|
'resetPassword' => 'login',
|
||||||
|
|
|
@ -14,23 +14,18 @@ class QuestionsController extends BaseController
|
||||||
{
|
{
|
||||||
use HasUserNotifications;
|
use HasUserNotifications;
|
||||||
|
|
||||||
/** @var Authenticator */
|
protected Authenticator $auth;
|
||||||
protected $auth;
|
|
||||||
|
|
||||||
/** @var LoggerInterface */
|
protected LoggerInterface $log;
|
||||||
protected $log;
|
|
||||||
|
|
||||||
/** @var Question */
|
protected Question $question;
|
||||||
protected $question;
|
|
||||||
|
|
||||||
/** @var Redirector */
|
protected Redirector $redirect;
|
||||||
protected $redirect;
|
|
||||||
|
|
||||||
/** @var Response */
|
protected Response $response;
|
||||||
protected $response;
|
|
||||||
|
|
||||||
/** @var string[] */
|
/** @var string[] */
|
||||||
protected $permissions = [
|
protected array $permissions = [
|
||||||
'question.add',
|
'question.add',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -15,23 +15,18 @@ class SettingsController extends BaseController
|
||||||
use HasUserNotifications;
|
use HasUserNotifications;
|
||||||
use ChecksArrivalsAndDepartures;
|
use ChecksArrivalsAndDepartures;
|
||||||
|
|
||||||
/** @var Authenticator */
|
protected Authenticator $auth;
|
||||||
protected $auth;
|
|
||||||
|
|
||||||
/** @var Config */
|
protected Config $config;
|
||||||
protected $config;
|
|
||||||
|
|
||||||
/** @var LoggerInterface */
|
protected LoggerInterface $log;
|
||||||
protected $log;
|
|
||||||
|
|
||||||
/** @var Redirector */
|
protected Redirector $redirect;
|
||||||
protected $redirect;
|
|
||||||
|
|
||||||
/** @var Response */
|
protected Response $response;
|
||||||
protected $response;
|
|
||||||
|
|
||||||
/** @var string[] */
|
/** @var string[] */
|
||||||
protected $permissions = [
|
protected array $permissions = [
|
||||||
'user_settings',
|
'user_settings',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,7 @@ use PDO;
|
||||||
|
|
||||||
class Database
|
class Database
|
||||||
{
|
{
|
||||||
/** @var DatabaseConnection */
|
protected DatabaseConnection $connection;
|
||||||
protected $connection;
|
|
||||||
|
|
||||||
public function __construct(DatabaseConnection $connection)
|
public function __construct(DatabaseConnection $connection)
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,8 +9,7 @@ use PDO;
|
||||||
/** @deprecated */
|
/** @deprecated */
|
||||||
class Db
|
class Db
|
||||||
{
|
{
|
||||||
/** @var CapsuleManager */
|
protected static CapsuleManager $dbManager;
|
||||||
protected static $dbManager;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the database connection manager
|
* Set the database connection manager
|
||||||
|
|
|
@ -19,17 +19,14 @@ class Migrate
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public const DOWN = 'down';
|
public const DOWN = 'down';
|
||||||
|
|
||||||
/** @var Application */
|
protected Application $app;
|
||||||
protected $app;
|
|
||||||
|
|
||||||
/** @var SchemaBuilder */
|
protected SchemaBuilder $schema;
|
||||||
protected $schema;
|
|
||||||
|
|
||||||
/** @var callable */
|
/** @var callable */
|
||||||
protected $output;
|
protected $output;
|
||||||
|
|
||||||
/** @var string */
|
protected string $table = 'migrations';
|
||||||
protected $table = 'migrations';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Migrate constructor
|
* Migrate constructor
|
||||||
|
|
|
@ -6,8 +6,7 @@ use Illuminate\Database\Schema\Builder as SchemaBuilder;
|
||||||
|
|
||||||
abstract class Migration
|
abstract class Migration
|
||||||
{
|
{
|
||||||
/** @var SchemaBuilder */
|
protected SchemaBuilder $schema;
|
||||||
protected $schema;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Migration constructor.
|
* Migration constructor.
|
||||||
|
|
|
@ -8,7 +8,7 @@ use Illuminate\Support\Str;
|
||||||
class EventDispatcher
|
class EventDispatcher
|
||||||
{
|
{
|
||||||
/** @var callable[] */
|
/** @var callable[] */
|
||||||
protected $listeners;
|
protected array $listeners;
|
||||||
|
|
||||||
public function listen(array|string $events, callable|string $listener): void
|
public function listen(array|string $events, callable|string $listener): void
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,14 +12,11 @@ use Symfony\Component\Mailer\Exception\TransportException;
|
||||||
|
|
||||||
class News
|
class News
|
||||||
{
|
{
|
||||||
/** @var LoggerInterface */
|
protected LoggerInterface $log;
|
||||||
protected $log;
|
|
||||||
|
|
||||||
/** @var EngelsystemMailer */
|
protected EngelsystemMailer $mailer;
|
||||||
protected $mailer;
|
|
||||||
|
|
||||||
/** @var UserSettings */
|
protected UserSettings $settings;
|
||||||
protected $settings;
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
LoggerInterface $log,
|
LoggerInterface $log,
|
||||||
|
|
|
@ -12,13 +12,11 @@ use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
class OAuth2
|
class OAuth2
|
||||||
{
|
{
|
||||||
/** @var Authenticator */
|
|
||||||
protected Authenticator $auth;
|
protected Authenticator $auth;
|
||||||
|
|
||||||
/** @var array */
|
/** @var array */
|
||||||
protected array $config;
|
protected array $config;
|
||||||
|
|
||||||
/** @var LoggerInterface */
|
|
||||||
protected LoggerInterface $log;
|
protected LoggerInterface $log;
|
||||||
|
|
||||||
public function __construct(Config $config, LoggerInterface $log, Authenticator $auth)
|
public function __construct(Config $config, LoggerInterface $log, Authenticator $auth)
|
||||||
|
|
|
@ -10,14 +10,12 @@ use Throwable;
|
||||||
|
|
||||||
class Handler
|
class Handler
|
||||||
{
|
{
|
||||||
/** @var string */
|
protected string $environment;
|
||||||
protected $environment;
|
|
||||||
|
|
||||||
/** @var HandlerInterface[] */
|
/** @var HandlerInterface[] */
|
||||||
protected $handler = [];
|
protected array $handler = [];
|
||||||
|
|
||||||
/** @var Request */
|
protected ?Request $request = null;
|
||||||
protected $request;
|
|
||||||
|
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public const ENV_PRODUCTION = 'prod';
|
public const ENV_PRODUCTION = 'prod';
|
||||||
|
|
|
@ -8,8 +8,7 @@ use Throwable;
|
||||||
|
|
||||||
class Legacy implements HandlerInterface
|
class Legacy implements HandlerInterface
|
||||||
{
|
{
|
||||||
/** @var LoggerInterface */
|
protected ?LoggerInterface $log = null;
|
||||||
protected $log;
|
|
||||||
|
|
||||||
public function render(Request $request, Throwable $e): void
|
public function render(Request $request, Throwable $e): void
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,8 +13,7 @@ use Whoops\Run as WhoopsRunner;
|
||||||
|
|
||||||
class Whoops extends Legacy implements HandlerInterface
|
class Whoops extends Legacy implements HandlerInterface
|
||||||
{
|
{
|
||||||
/** @var Application */
|
protected Application $app;
|
||||||
protected $app;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whoops constructor.
|
* Whoops constructor.
|
||||||
|
|
|
@ -4,10 +4,8 @@ namespace Engelsystem\Helpers;
|
||||||
|
|
||||||
class Assets
|
class Assets
|
||||||
{
|
{
|
||||||
/** @var string */
|
|
||||||
protected string $assetsPath;
|
protected string $assetsPath;
|
||||||
|
|
||||||
/** @var string */
|
|
||||||
protected string $manifestFile = 'manifest.json';
|
protected string $manifestFile = 'manifest.json';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -11,28 +11,21 @@ use Symfony\Component\HttpFoundation\Session\Session;
|
||||||
|
|
||||||
class Authenticator
|
class Authenticator
|
||||||
{
|
{
|
||||||
/** @var User|null */
|
|
||||||
protected ?User $user = null;
|
protected ?User $user = null;
|
||||||
|
|
||||||
/** @var ServerRequestInterface */
|
|
||||||
protected ServerRequestInterface $request;
|
protected ServerRequestInterface $request;
|
||||||
|
|
||||||
/** @var Session */
|
|
||||||
protected Session $session;
|
protected Session $session;
|
||||||
|
|
||||||
/** @var UserRepository */
|
|
||||||
protected UserRepository $userRepository;
|
protected UserRepository $userRepository;
|
||||||
|
|
||||||
/** @var string[] */
|
/** @var string[] */
|
||||||
protected array $permissions = [];
|
protected array $permissions = [];
|
||||||
|
|
||||||
/** @var int|string|null */
|
protected int|string|null $passwordAlgorithm = PASSWORD_DEFAULT;
|
||||||
protected $passwordAlgorithm = PASSWORD_DEFAULT;
|
|
||||||
|
|
||||||
/** @var int */
|
|
||||||
protected int $defaultRole = 20;
|
protected int $defaultRole = 20;
|
||||||
|
|
||||||
/** @var int */
|
|
||||||
protected int $guestRole = 10;
|
protected int $guestRole = 10;
|
||||||
|
|
||||||
public function __construct(ServerRequestInterface $request, Session $session, UserRepository $userRepository)
|
public function __construct(ServerRequestInterface $request, Session $session, UserRepository $userRepository)
|
||||||
|
|
|
@ -9,25 +9,20 @@ class Conference
|
||||||
use CalculatesTime;
|
use CalculatesTime;
|
||||||
|
|
||||||
/** @var string required */
|
/** @var string required */
|
||||||
protected $title;
|
protected string $title;
|
||||||
|
|
||||||
/** @var string required */
|
/** @var string required */
|
||||||
protected $acronym;
|
protected string $acronym;
|
||||||
|
|
||||||
/** @var string|null */
|
protected ?string $start = null;
|
||||||
protected $start;
|
|
||||||
|
|
||||||
/** @var string|null */
|
protected ?string $end = null;
|
||||||
protected $end;
|
|
||||||
|
|
||||||
/** @var int|null */
|
protected ?int $days = null;
|
||||||
protected $days;
|
|
||||||
|
|
||||||
/** @var string|null */
|
protected ?string $timeslotDuration = null;
|
||||||
protected $timeslotDuration;
|
|
||||||
|
|
||||||
/** @var string|null */
|
protected ?string $baseUrl = null;
|
||||||
protected $baseUrl;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event constructor.
|
* Event constructor.
|
||||||
|
|
|
@ -9,19 +9,19 @@ use Carbon\Carbon;
|
||||||
class Day
|
class Day
|
||||||
{
|
{
|
||||||
/** @var string required */
|
/** @var string required */
|
||||||
protected $date;
|
protected string $date;
|
||||||
|
|
||||||
/** @var Carbon required */
|
/** @var Carbon required */
|
||||||
protected $start;
|
protected Carbon $start;
|
||||||
|
|
||||||
/** @var Carbon required */
|
/** @var Carbon required */
|
||||||
protected $end;
|
protected Carbon $end;
|
||||||
|
|
||||||
/** @var int required */
|
/** @var int required */
|
||||||
protected $index;
|
protected int $index;
|
||||||
|
|
||||||
/** @var Room[] */
|
/** @var Room[] */
|
||||||
protected $room;
|
protected array $room;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Day constructor.
|
* Day constructor.
|
||||||
|
|
|
@ -11,70 +11,66 @@ class Event
|
||||||
use CalculatesTime;
|
use CalculatesTime;
|
||||||
|
|
||||||
/** @var string required globally unique */
|
/** @var string required globally unique */
|
||||||
protected $guid;
|
protected string $guid;
|
||||||
|
|
||||||
/** @var int required globally unique */
|
/** @var int required globally unique */
|
||||||
protected $id;
|
protected int $id;
|
||||||
|
|
||||||
/** @var Room required, string in XML */
|
/** @var Room required, string in XML */
|
||||||
protected $room;
|
protected Room $room;
|
||||||
|
|
||||||
/** @var string required */
|
/** @var string required */
|
||||||
protected $title;
|
protected string $title;
|
||||||
|
|
||||||
/** @var string required */
|
/** @var string required */
|
||||||
protected $subtitle;
|
protected string $subtitle;
|
||||||
|
|
||||||
/** @var string required */
|
/** @var string required */
|
||||||
protected $type;
|
protected string $type;
|
||||||
|
|
||||||
/** @var Carbon required */
|
/** @var Carbon required */
|
||||||
protected $date;
|
protected Carbon $date;
|
||||||
|
|
||||||
/** @var string required time (hh:mm:ss || hh:mm) */
|
/** @var string required time (hh:mm:ss || hh:mm) */
|
||||||
protected $start;
|
protected string $start;
|
||||||
|
|
||||||
/** @var string required (h?h:mm:ss || h?h:mm) */
|
/** @var string required (h?h:mm:ss || h?h:mm) */
|
||||||
protected $duration;
|
protected string $duration;
|
||||||
|
|
||||||
/** @var string required */
|
/** @var string required */
|
||||||
protected $abstract;
|
protected string $abstract;
|
||||||
|
|
||||||
/** @var string required globally unique */
|
/** @var string required globally unique */
|
||||||
protected $slug;
|
protected string $slug;
|
||||||
|
|
||||||
/** @var string required */
|
/** @var string required */
|
||||||
protected $track;
|
protected string $track;
|
||||||
|
|
||||||
/** @var string|null */
|
protected ?string $logo = null;
|
||||||
protected $logo;
|
|
||||||
|
|
||||||
/** @var string[] id => name */
|
/** @var string[] id => name */
|
||||||
protected $persons;
|
protected array $persons;
|
||||||
|
|
||||||
/** @var string|null two letter code */
|
/** @var string|null two letter code */
|
||||||
protected $language;
|
protected ?string $language = null;
|
||||||
|
|
||||||
/** @var string|null */
|
protected ?string $description = null;
|
||||||
protected $description;
|
|
||||||
|
|
||||||
/** @var string|null license (and opt out in XML, null if not recorded, empty if no license defined) */
|
/** @var string|null license (and opt out in XML, null if not recorded, empty if no license defined) */
|
||||||
protected $recording;
|
protected ?string $recording = null;
|
||||||
|
|
||||||
/** @var array href => title */
|
/** @var array href => title */
|
||||||
protected $links;
|
protected array $links;
|
||||||
|
|
||||||
/** @var array href => name */
|
/** @var array href => name */
|
||||||
protected $attachments;
|
protected array $attachments;
|
||||||
|
|
||||||
/** @var string|null */
|
protected ?string $url = null;
|
||||||
protected $url;
|
|
||||||
|
|
||||||
/** @var string|null */
|
protected ?string $videoDownloadUrl = null;
|
||||||
protected $videoDownloadUrl;
|
|
||||||
|
|
||||||
/** @var Carbon Calculated */
|
/** @var Carbon Calculated */
|
||||||
protected $endDate;
|
protected Carbon $endDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event constructor.
|
* Event constructor.
|
||||||
|
|
|
@ -7,10 +7,10 @@ namespace Engelsystem\Helpers\Schedule;
|
||||||
class Room
|
class Room
|
||||||
{
|
{
|
||||||
/** @var string required */
|
/** @var string required */
|
||||||
protected $name;
|
protected string $name;
|
||||||
|
|
||||||
/** @var Event[] */
|
/** @var Event[] */
|
||||||
protected $event;
|
protected array $event;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Room constructor.
|
* Room constructor.
|
||||||
|
|
|
@ -8,14 +8,12 @@ use Carbon\Carbon;
|
||||||
|
|
||||||
class Schedule
|
class Schedule
|
||||||
{
|
{
|
||||||
/** @var string */
|
protected string $version;
|
||||||
protected $version;
|
|
||||||
|
|
||||||
/** @var Conference */
|
protected Conference $conference;
|
||||||
protected $conference;
|
|
||||||
|
|
||||||
/** @var Day[] */
|
/** @var Day[] */
|
||||||
protected $day;
|
protected array $day;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Day[] $days
|
* @param Day[] $days
|
||||||
|
|
|
@ -9,22 +9,20 @@ use SimpleXMLElement;
|
||||||
|
|
||||||
class XmlParser
|
class XmlParser
|
||||||
{
|
{
|
||||||
/** @var SimpleXMLElement */
|
protected SimpleXMLElement $scheduleXML;
|
||||||
protected $scheduleXML;
|
|
||||||
|
|
||||||
/** @var Schedule */
|
protected Schedule $schedule;
|
||||||
protected $schedule;
|
|
||||||
|
|
||||||
public function load(string $xml): bool
|
public function load(string $xml): bool
|
||||||
{
|
{
|
||||||
$this->scheduleXML = simplexml_load_string($xml);
|
$scheduleXML = simplexml_load_string($xml);
|
||||||
|
|
||||||
if (!$this->scheduleXML) {
|
if (!$scheduleXML) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->scheduleXML = $scheduleXML;
|
||||||
$this->parseXml();
|
$this->parseXml();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,7 @@ use Symfony\Component\HttpFoundation\Session\Session;
|
||||||
|
|
||||||
class TranslationServiceProvider extends ServiceProvider
|
class TranslationServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
/** @var GettextTranslator */
|
protected GettextTranslator|array $translators = [];
|
||||||
protected $translators = [];
|
|
||||||
|
|
||||||
public function register(): void
|
public function register(): void
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,13 +5,11 @@ namespace Engelsystem\Helpers\Translation;
|
||||||
class Translator
|
class Translator
|
||||||
{
|
{
|
||||||
/** @var string[] */
|
/** @var string[] */
|
||||||
protected $locales;
|
protected array $locales;
|
||||||
|
|
||||||
/** @var string */
|
protected string $locale;
|
||||||
protected $locale;
|
|
||||||
|
|
||||||
/** @var string */
|
protected string $fallbackLocale;
|
||||||
protected $fallbackLocale;
|
|
||||||
|
|
||||||
/** @var callable */
|
/** @var callable */
|
||||||
protected $getTranslatorCallback;
|
protected $getTranslatorCallback;
|
||||||
|
|
|
@ -6,14 +6,11 @@ use Engelsystem\Config\Config;
|
||||||
|
|
||||||
class Version
|
class Version
|
||||||
{
|
{
|
||||||
/** @var Config */
|
protected Config $config;
|
||||||
protected $config;
|
|
||||||
|
|
||||||
/** @vat string */
|
protected string $storage;
|
||||||
protected $storage;
|
|
||||||
|
|
||||||
/** @var string */
|
protected string $versionFile = 'VERSION';
|
||||||
protected $versionFile = 'VERSION';
|
|
||||||
|
|
||||||
public function __construct(string $storage, Config $config)
|
public function __construct(string $storage, Config $config)
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,11 +7,10 @@ use Throwable;
|
||||||
|
|
||||||
class HttpException extends RuntimeException
|
class HttpException extends RuntimeException
|
||||||
{
|
{
|
||||||
/** @var int */
|
protected int $statusCode;
|
||||||
protected $statusCode;
|
|
||||||
|
|
||||||
/** @var array */
|
/** @var array */
|
||||||
protected $headers = [];
|
protected array $headers = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $headers
|
* @param array $headers
|
||||||
|
|
|
@ -8,8 +8,7 @@ use Throwable;
|
||||||
|
|
||||||
class ValidationException extends RuntimeException
|
class ValidationException extends RuntimeException
|
||||||
{
|
{
|
||||||
/** @var Validator */
|
protected Validator $validator;
|
||||||
protected $validator;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Throwable|null $previous
|
* @param Throwable|null $previous
|
||||||
|
|
|
@ -4,14 +4,11 @@ namespace Engelsystem\Http;
|
||||||
|
|
||||||
class Redirector
|
class Redirector
|
||||||
{
|
{
|
||||||
/** @var Request */
|
protected Request $request;
|
||||||
protected $request;
|
|
||||||
|
|
||||||
/** @var Response */
|
protected Response $response;
|
||||||
protected $response;
|
|
||||||
|
|
||||||
/** @var UrlGeneratorInterface */
|
protected UrlGeneratorInterface $url;
|
||||||
protected $url;
|
|
||||||
|
|
||||||
public function __construct(Request $request, Response $response, UrlGeneratorInterface $url)
|
public function __construct(Request $request, Response $response, UrlGeneratorInterface $url)
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,27 +12,13 @@ class Response extends SymfonyResponse implements ResponseInterface
|
||||||
{
|
{
|
||||||
use MessageTrait;
|
use MessageTrait;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var SessionInterface
|
|
||||||
*/
|
|
||||||
protected $session;
|
|
||||||
|
|
||||||
/** @var Renderer */
|
|
||||||
protected $renderer;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $headers
|
|
||||||
*/
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
string $content = '',
|
string $content = '',
|
||||||
int $status = 200,
|
int $status = 200,
|
||||||
array $headers = [],
|
array $headers = [],
|
||||||
Renderer $renderer = null,
|
protected ?Renderer $renderer = null,
|
||||||
SessionInterface $session = null
|
protected ?SessionInterface $session = null
|
||||||
) {
|
) {
|
||||||
$this->renderer = $renderer;
|
|
||||||
$this->session = $session;
|
|
||||||
|
|
||||||
parent::__construct($content, $status, $headers);
|
parent::__construct($content, $status, $headers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,7 @@ use Engelsystem\Http\Request;
|
||||||
|
|
||||||
trait ValidatesRequest
|
trait ValidatesRequest
|
||||||
{
|
{
|
||||||
/** @var Validator */
|
protected Validator $validator;
|
||||||
protected $validator;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $rules
|
* @param array $rules
|
||||||
|
|
|
@ -10,13 +10,13 @@ use Respect\Validation\Validator as RespectValidator;
|
||||||
class Validator
|
class Validator
|
||||||
{
|
{
|
||||||
/** @var string[] */
|
/** @var string[] */
|
||||||
protected $errors = [];
|
protected array $errors = [];
|
||||||
|
|
||||||
/** @var array */
|
/** @var array */
|
||||||
protected $data = [];
|
protected array $data = [];
|
||||||
|
|
||||||
/** @var array */
|
/** @var array */
|
||||||
protected $mapping = [
|
protected array $mapping = [
|
||||||
'accepted' => 'TrueVal',
|
'accepted' => 'TrueVal',
|
||||||
'int' => 'IntVal',
|
'int' => 'IntVal',
|
||||||
'float' => 'FloatVal',
|
'float' => 'FloatVal',
|
||||||
|
@ -24,7 +24,7 @@ class Validator
|
||||||
];
|
];
|
||||||
|
|
||||||
/** @var array */
|
/** @var array */
|
||||||
protected $nestedRules = ['optional', 'not'];
|
protected array $nestedRules = ['optional', 'not'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $data
|
* @param array $data
|
||||||
|
|
|
@ -11,7 +11,8 @@ use Throwable;
|
||||||
|
|
||||||
class Logger extends AbstractLogger
|
class Logger extends AbstractLogger
|
||||||
{
|
{
|
||||||
protected $allowedLevels = [
|
/** @var array<string> */
|
||||||
|
protected $allowedLevels = [ // phpcs:ignore
|
||||||
LogLevel::ALERT,
|
LogLevel::ALERT,
|
||||||
LogLevel::CRITICAL,
|
LogLevel::CRITICAL,
|
||||||
LogLevel::DEBUG,
|
LogLevel::DEBUG,
|
||||||
|
@ -22,8 +23,7 @@ class Logger extends AbstractLogger
|
||||||
LogLevel::WARNING,
|
LogLevel::WARNING,
|
||||||
];
|
];
|
||||||
|
|
||||||
/** @var LogEntry */
|
protected LogEntry $log;
|
||||||
protected $log;
|
|
||||||
|
|
||||||
public function __construct(LogEntry $log)
|
public function __construct(LogEntry $log)
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,8 +8,7 @@ use Stringable;
|
||||||
|
|
||||||
class UserAwareLogger extends Logger
|
class UserAwareLogger extends Logger
|
||||||
{
|
{
|
||||||
/** @var Authenticator */
|
protected Authenticator $auth;
|
||||||
protected $auth;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs with an arbitrary level and prepends the user
|
* Logs with an arbitrary level and prepends the user
|
||||||
|
|
|
@ -9,14 +9,11 @@ use Symfony\Component\Mailer\MailerInterface;
|
||||||
|
|
||||||
class EngelsystemMailer extends Mailer
|
class EngelsystemMailer extends Mailer
|
||||||
{
|
{
|
||||||
/** @var Renderer|null */
|
protected ?Renderer $view = null;
|
||||||
protected $view;
|
|
||||||
|
|
||||||
/** @var Translator|null */
|
protected ?Translator $translation = null;
|
||||||
protected $translation;
|
|
||||||
|
|
||||||
/** @var string */
|
protected ?string $subjectPrefix = null;
|
||||||
protected $subjectPrefix = null;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Renderer|null $view
|
* @param Renderer|null $view
|
||||||
|
|
|
@ -7,14 +7,11 @@ use Symfony\Component\Mime\Email;
|
||||||
|
|
||||||
class Mailer
|
class Mailer
|
||||||
{
|
{
|
||||||
/** @var MailerInterface */
|
protected MailerInterface $mailer;
|
||||||
protected $mailer;
|
|
||||||
|
|
||||||
/** @var string */
|
protected string $fromAddress = '';
|
||||||
protected $fromAddress = '';
|
|
||||||
|
|
||||||
/** @var string */
|
protected ?string $fromName = null;
|
||||||
protected $fromName = null;
|
|
||||||
|
|
||||||
public function __construct(MailerInterface $mailer)
|
public function __construct(MailerInterface $mailer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,8 +8,7 @@ use Symfony\Component\Mailer\Transport\AbstractTransport;
|
||||||
|
|
||||||
class LogTransport extends AbstractTransport
|
class LogTransport extends AbstractTransport
|
||||||
{
|
{
|
||||||
/** @var LoggerInterface */
|
protected LoggerInterface $logger;
|
||||||
protected $logger;
|
|
||||||
|
|
||||||
public function __construct(LoggerInterface $logger)
|
public function __construct(LoggerInterface $logger)
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,8 +10,7 @@ use Psr\Http\Server\RequestHandlerInterface;
|
||||||
|
|
||||||
class AddHeaders implements MiddlewareInterface
|
class AddHeaders implements MiddlewareInterface
|
||||||
{
|
{
|
||||||
/** @var Config */
|
protected Config $config;
|
||||||
protected $config;
|
|
||||||
|
|
||||||
public function __construct(Config $config)
|
public function __construct(Config $config)
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,8 +15,7 @@ class CallableHandler implements MiddlewareInterface, RequestHandlerInterface
|
||||||
/** @var callable */
|
/** @var callable */
|
||||||
protected $callable;
|
protected $callable;
|
||||||
|
|
||||||
/** @var Container */
|
protected ?Container $container = null;
|
||||||
protected $container;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param callable $callable The callable that should be wrapped
|
* @param callable $callable The callable that should be wrapped
|
||||||
|
|
|
@ -15,22 +15,16 @@ class Dispatcher implements MiddlewareInterface, RequestHandlerInterface
|
||||||
use ResolvesMiddlewareTrait;
|
use ResolvesMiddlewareTrait;
|
||||||
|
|
||||||
/** @var MiddlewareInterface[]|string[] */
|
/** @var MiddlewareInterface[]|string[] */
|
||||||
protected $stack;
|
protected array $stack;
|
||||||
|
|
||||||
/** @var Application */
|
protected RequestHandlerInterface $next;
|
||||||
protected $container;
|
|
||||||
|
|
||||||
/** @var RequestHandlerInterface */
|
|
||||||
protected $next;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param MiddlewareInterface[]|string[] $stack
|
* @param MiddlewareInterface[]|string[] $stack
|
||||||
* @param Application|null $container
|
|
||||||
*/
|
*/
|
||||||
public function __construct(array $stack = [], Application $container = null)
|
public function __construct(array $stack = [], protected ?Application $container = null)
|
||||||
{
|
{
|
||||||
$this->stack = $stack;
|
$this->stack = $stack;
|
||||||
$this->container = $container;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -16,18 +16,16 @@ use Twig\Loader\LoaderInterface as TwigLoader;
|
||||||
|
|
||||||
class ErrorHandler implements MiddlewareInterface
|
class ErrorHandler implements MiddlewareInterface
|
||||||
{
|
{
|
||||||
/** @var TwigLoader */
|
protected TwigLoader $loader;
|
||||||
protected $loader;
|
|
||||||
|
|
||||||
/** @var string */
|
protected string $viewPrefix = 'errors/';
|
||||||
protected $viewPrefix = 'errors/';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
|
||||||
*/
|
*/
|
||||||
protected $formIgnore = [
|
protected array $formIgnore = [
|
||||||
'password',
|
'password',
|
||||||
'password_confirmation',
|
'password_confirmation',
|
||||||
'password2',
|
'password2',
|
||||||
|
|
|
@ -12,8 +12,7 @@ use Throwable;
|
||||||
|
|
||||||
class ExceptionHandler implements MiddlewareInterface
|
class ExceptionHandler implements MiddlewareInterface
|
||||||
{
|
{
|
||||||
/** @var ContainerInterface */
|
protected ContainerInterface $container;
|
||||||
protected $container;
|
|
||||||
|
|
||||||
public function __construct(ContainerInterface $container)
|
public function __construct(ContainerInterface $container)
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,7 +13,8 @@ use Psr\Http\Server\RequestHandlerInterface;
|
||||||
|
|
||||||
class LegacyMiddleware implements MiddlewareInterface
|
class LegacyMiddleware implements MiddlewareInterface
|
||||||
{
|
{
|
||||||
protected $free_pages = [
|
/** @var array<string> */
|
||||||
|
protected array $free_pages = [
|
||||||
'admin_event_config',
|
'admin_event_config',
|
||||||
'angeltypes',
|
'angeltypes',
|
||||||
'atom',
|
'atom',
|
||||||
|
@ -28,11 +29,9 @@ class LegacyMiddleware implements MiddlewareInterface
|
||||||
'admin_shifts_history',
|
'admin_shifts_history',
|
||||||
];
|
];
|
||||||
|
|
||||||
/** @var ContainerInterface */
|
protected ContainerInterface $container;
|
||||||
protected $container;
|
|
||||||
|
|
||||||
/** @var Authenticator */
|
protected Authenticator $auth;
|
||||||
protected $auth;
|
|
||||||
|
|
||||||
public function __construct(ContainerInterface $container, Authenticator $auth)
|
public function __construct(ContainerInterface $container, Authenticator $auth)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,8 +16,7 @@ class RequestHandler implements MiddlewareInterface
|
||||||
{
|
{
|
||||||
use ResolvesMiddlewareTrait;
|
use ResolvesMiddlewareTrait;
|
||||||
|
|
||||||
/** @var Application */
|
protected Application $container;
|
||||||
protected $container;
|
|
||||||
|
|
||||||
public function __construct(Application $container)
|
public function __construct(Application $container)
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,14 +12,11 @@ use Psr\Http\Server\RequestHandlerInterface;
|
||||||
|
|
||||||
class RouteDispatcher implements MiddlewareInterface
|
class RouteDispatcher implements MiddlewareInterface
|
||||||
{
|
{
|
||||||
/** @var FastRouteDispatcher */
|
protected FastRouteDispatcher $dispatcher;
|
||||||
protected $dispatcher;
|
|
||||||
|
|
||||||
/** @var ResponseInterface */
|
protected ResponseInterface $response;
|
||||||
protected $response;
|
|
||||||
|
|
||||||
/** @var MiddlewareInterface|null */
|
protected ?MiddlewareInterface $notFound = null;
|
||||||
protected $notFound;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ResponseInterface $response Default response
|
* @param ResponseInterface $response Default response
|
||||||
|
|
|
@ -11,11 +11,10 @@ use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface;
|
||||||
|
|
||||||
class SessionHandler implements MiddlewareInterface
|
class SessionHandler implements MiddlewareInterface
|
||||||
{
|
{
|
||||||
/** @var SessionStorageInterface */
|
protected SessionStorageInterface $session;
|
||||||
protected $session;
|
|
||||||
|
|
||||||
/** @var string[] */
|
/** @var string[] */
|
||||||
protected $paths = [];
|
protected array $paths = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $paths
|
* @param array $paths
|
||||||
|
|
|
@ -12,14 +12,11 @@ use Symfony\Component\HttpFoundation\Session\Session;
|
||||||
|
|
||||||
class SetLocale implements MiddlewareInterface
|
class SetLocale implements MiddlewareInterface
|
||||||
{
|
{
|
||||||
/** @var Authenticator */
|
protected Authenticator $auth;
|
||||||
protected $auth;
|
|
||||||
|
|
||||||
/** @var Translator */
|
protected Translator $translator;
|
||||||
protected $translator;
|
|
||||||
|
|
||||||
/** @var Session */
|
protected Session $session;
|
||||||
protected $session;
|
|
||||||
|
|
||||||
public function __construct(Translator $translator, Session $session, Authenticator $auth)
|
public function __construct(Translator $translator, Session $session, Authenticator $auth)
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,8 +11,7 @@ use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
||||||
|
|
||||||
class VerifyCsrfToken implements MiddlewareInterface
|
class VerifyCsrfToken implements MiddlewareInterface
|
||||||
{
|
{
|
||||||
/** @var SessionInterface */
|
protected SessionInterface $session;
|
||||||
protected $session;
|
|
||||||
|
|
||||||
public function __construct(SessionInterface $session)
|
public function __construct(SessionInterface $session)
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,8 +43,8 @@ class AngelType extends BaseModel
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
/** @var string[] */
|
/** @var array<string> */
|
||||||
protected $fillable = [
|
protected $fillable = [ // phpcs:ignore
|
||||||
'name',
|
'name',
|
||||||
'description',
|
'description',
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ class AngelType extends BaseModel
|
||||||
];
|
];
|
||||||
|
|
||||||
/** @var array<string, string> */
|
/** @var array<string, string> */
|
||||||
protected $casts = [
|
protected $casts = [ // phpcs:ignore
|
||||||
'restricted' => 'boolean',
|
'restricted' => 'boolean',
|
||||||
'requires_driver_license' => 'boolean',
|
'requires_driver_license' => 'boolean',
|
||||||
'no_self_signup' => 'boolean',
|
'no_self_signup' => 'boolean',
|
||||||
|
|
|
@ -16,5 +16,5 @@ use Illuminate\Database\Query\Builder as QueryBuilder;
|
||||||
abstract class BaseModel extends Model
|
abstract class BaseModel extends Model
|
||||||
{
|
{
|
||||||
/** @var bool Disable timestamps by default because of "Datensparsamkeit" */
|
/** @var bool Disable timestamps by default because of "Datensparsamkeit" */
|
||||||
public $timestamps = false;
|
public $timestamps = false; // phpcs:ignore
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,19 +19,19 @@ use Illuminate\Database\Query\Builder as QueryBuilder;
|
||||||
class EventConfig extends BaseModel
|
class EventConfig extends BaseModel
|
||||||
{
|
{
|
||||||
/** @var string The primary key for the model */
|
/** @var string The primary key for the model */
|
||||||
protected $primaryKey = 'name';
|
protected $primaryKey = 'name'; // phpcs:ignore
|
||||||
|
|
||||||
/** @var bool Indicates if the IDs are auto-incrementing */
|
/** @var bool Indicates if the IDs are auto-incrementing */
|
||||||
public $incrementing = false;
|
public $incrementing = false; // phpcs:ignore
|
||||||
|
|
||||||
/** @var string Required because it is not event_configs */
|
/** @var string Required because it is not event_configs */
|
||||||
protected $table = 'event_config';
|
protected $table = 'event_config'; // phpcs:ignore
|
||||||
|
|
||||||
/** @var array Values that are mass assignable */
|
/** @var array Values that are mass assignable */
|
||||||
protected $fillable = ['name', 'value'];
|
protected $fillable = ['name', 'value']; // phpcs:ignore
|
||||||
|
|
||||||
/** @var array The configuration values that should be cast to native types */
|
/** @var array<string, string> The configuration values that should be cast to native types */
|
||||||
protected $valueCasts = [
|
protected array $valueCasts = [
|
||||||
'buildup_start' => 'datetime_human',
|
'buildup_start' => 'datetime_human',
|
||||||
'event_start' => 'datetime_human',
|
'event_start' => 'datetime_human',
|
||||||
'event_end' => 'datetime_human',
|
'event_end' => 'datetime_human',
|
||||||
|
@ -40,7 +40,7 @@ class EventConfig extends BaseModel
|
||||||
];
|
];
|
||||||
|
|
||||||
/** @var bool It could be interesting to know when a value changed the last time */
|
/** @var bool It could be interesting to know when a value changed the last time */
|
||||||
public $timestamps = true;
|
public $timestamps = true; // phpcs:ignore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Value accessor
|
* Value accessor
|
||||||
|
|
|
@ -24,13 +24,13 @@ class Faq extends BaseModel
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
/** @var bool Enable timestamps */
|
/** @var bool Enable timestamps */
|
||||||
public $timestamps = true;
|
public $timestamps = true; // phpcs:ignore
|
||||||
|
|
||||||
/** @var string The models table */
|
/** @var string The models table */
|
||||||
public $table = 'faq';
|
public $table = 'faq'; // phpcs:ignore
|
||||||
|
|
||||||
/** @var string[] */
|
/** @var array<string> */
|
||||||
protected $fillable = [
|
protected $fillable = [ // phpcs:ignore
|
||||||
'question',
|
'question',
|
||||||
'text',
|
'text',
|
||||||
];
|
];
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue