Fix phpstan issues.

This commit is contained in:
James Cole
2023-11-05 16:55:16 +01:00
parent 4edd9fe3da
commit a0564751d6
72 changed files with 110 additions and 138 deletions

View File

@@ -55,11 +55,7 @@ class AutoBudgetCronjob extends AbstractCronjob
return;
}
// fire job regardless.
if (true === $this->force) {
app('log')->info('Execution of the auto budget cron-job has been FORCED.');
}
app('log')->info('Execution of the auto budget cron-job has been FORCED.');
}
if ($lastTime > 0 && $diff > 43200) {

View File

@@ -65,10 +65,7 @@ class BillWarningCronjob extends AbstractCronjob
return;
}
// fire job regardless.
if (true === $this->force) {
app('log')->info('Execution of the bill warning cron-job has been FORCED.');
}
app('log')->info('Execution of the bill warning cron-job has been FORCED.');
}
if ($lastTime > 0 && $diff > 43200) {

View File

@@ -56,10 +56,7 @@ class ExchangeRatesCronjob extends AbstractCronjob
return;
}
// fire job regardless.
if (true === $this->force) {
app('log')->info('Execution of the exchange rates cron-job has been FORCED.');
}
app('log')->info('Execution of the exchange rates cron-job has been FORCED.');
}
if ($lastTime > 0 && $diff > 43200) {

View File

@@ -64,11 +64,7 @@ class RecurringCronjob extends AbstractCronjob
return;
}
// fire job regardless.
if (true === $this->force) {
app('log')->info('Execution of the recurring transaction cron-job has been FORCED.');
}
app('log')->info('Execution of the recurring transaction cron-job has been FORCED.');
}
if ($lastTime > 0 && $diff > 43200) {

View File

@@ -104,7 +104,7 @@ trait FormSupport
protected function getHolderClasses(string $name): string
{
// Get errors from session:
/** @var MessageBag $errors */
/** @var MessageBag|null $errors */
$errors = session('errors');
$classes = 'form-group';

View File

@@ -45,7 +45,7 @@ trait ChecksLogin
if (!$check) {
return false;
}
if (!property_exists($this, 'acceptedRoles')) {
if (!property_exists($this, 'acceptedRoles')) { // @phpstan-ignore-line
app('log')->debug('Request class has no acceptedRoles array');
return true; // check for false already took place.
}

View File

@@ -166,7 +166,7 @@ trait ConvertsDataTypes
/** @var AccountRepositoryInterface $repository */
$repository = app(AccountRepositoryInterface::class);
if (method_exists($this, 'validateUserGroup')) {
if (method_exists($this, 'validateUserGroup')) { /** @phpstan-ignore-line */
$userGroup = $this->validateUserGroup($this);
if (null !== $userGroup) {
$repository->setUserGroup($userGroup);