Update files using Rector.

This commit is contained in:
James Cole
2025-05-29 15:01:06 +02:00
parent 189a323f3c
commit 5be6bb755d
126 changed files with 668 additions and 612 deletions

View File

@@ -64,8 +64,7 @@ class JournalServiceProvider extends ServiceProvider
private function registerRepository(): void
{
$this->app->bind(
JournalRepositoryInterface::class,
static function (Application $app) {
static function (Application $app): JournalRepositoryInterface {
/** @var JournalRepositoryInterface $repository */
$repository = app(JournalRepository::class);
if ($app->auth->check()) { // @phpstan-ignore-line (phpstan does not understand the reference to auth)
@@ -78,8 +77,7 @@ class JournalServiceProvider extends ServiceProvider
// also bind new API repository
$this->app->bind(
JournalAPIRepositoryInterface::class,
static function (Application $app) {
static function (Application $app): JournalAPIRepositoryInterface {
/** @var JournalAPIRepositoryInterface $repository */
$repository = app(JournalAPIRepository::class);
if ($app->auth->check()) { // @phpstan-ignore-line (phpstan does not understand the reference to auth)
@@ -92,8 +90,7 @@ class JournalServiceProvider extends ServiceProvider
// also bind new CLI repository
$this->app->bind(
JournalCLIRepositoryInterface::class,
static function (Application $app) {
static function (Application $app): JournalCLIRepositoryInterface {
/** @var JournalCLIRepositoryInterface $repository */
$repository = app(JournalCLIRepository::class);
if ($app->auth->check()) { // @phpstan-ignore-line (phpstan does not understand the reference to auth)
@@ -111,8 +108,7 @@ class JournalServiceProvider extends ServiceProvider
private function registerGroupRepository(): void
{
$this->app->bind(
TransactionGroupRepositoryInterface::class,
static function (Application $app) {
static function (Application $app): TransactionGroupRepositoryInterface {
/** @var TransactionGroupRepositoryInterface $repository */
$repository = app(TransactionGroupRepository::class);
if ($app->auth->check()) { // @phpstan-ignore-line (phpstan does not understand the reference to auth)
@@ -127,8 +123,7 @@ class JournalServiceProvider extends ServiceProvider
private function registerGroupCollector(): void
{
$this->app->bind(
GroupCollectorInterface::class,
static function (Application $app) {
static function (Application $app): GroupCollectorInterface {
/** @var GroupCollectorInterface $collector */
$collector = app(GroupCollector::class);
if ($app->auth->check()) { // @phpstan-ignore-line (phpstan does not understand the reference to auth)