Code cleanup

This commit is contained in:
James Cole 2023-12-02 07:26:03 +01:00
parent 00410c8486
commit 2b0a3ec818
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80
5 changed files with 14 additions and 14 deletions

View File

@ -539,16 +539,16 @@
},
{
"name": "symfony/console",
"version": "v7.0.0",
"version": "v7.0.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "64e06788686633deb8d9a7c75ab31bcf4b233a26"
"reference": "cdce5c684b2f920bb1343deecdfba356ffad83d5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/64e06788686633deb8d9a7c75ab31bcf4b233a26",
"reference": "64e06788686633deb8d9a7c75ab31bcf4b233a26",
"url": "https://api.github.com/repos/symfony/console/zipball/cdce5c684b2f920bb1343deecdfba356ffad83d5",
"reference": "cdce5c684b2f920bb1343deecdfba356ffad83d5",
"shasum": ""
},
"require": {
@ -612,7 +612,7 @@
"terminal"
],
"support": {
"source": "https://github.com/symfony/console/tree/v7.0.0"
"source": "https://github.com/symfony/console/tree/v7.0.1"
},
"funding": [
{
@ -628,7 +628,7 @@
"type": "tidelift"
}
],
"time": "2023-11-20T16:43:42+00:00"
"time": "2023-12-01T15:10:06+00:00"
},
{
"name": "symfony/deprecation-contracts",

View File

@ -131,7 +131,7 @@ class UserEventHandler
$group = null;
// create a new group.
while (true === $groupExists) { // @phpstan-ignore-line
while (true === $groupExists) { /** @phpstan-ignore-line */
$groupExists = UserGroup::where('title', $groupTitle)->count() > 0;
if (false === $groupExists) {
$group = UserGroup::create(['title' => $groupTitle]);
@ -205,7 +205,7 @@ class UserEventHandler
if (false === $entry['notified']) {
try {
Notification::send($user, new UserLogin($ipAddress));
} catch (Exception $e) {// @phpstan-ignore-line
} catch (Exception $e) {/** @phpstan-ignore-line */
$message = $e->getMessage();
if (str_contains($message, 'Bcc')) {
app('log')->warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');
@ -239,7 +239,7 @@ class UserEventHandler
if ($repository->hasRole($user, 'owner')) {
try {
Notification::send($user, new AdminRegistrationNotification($event->user));
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) { /** @phpstan-ignore-line */
$message = $e->getMessage();
if (str_contains($message, 'Bcc')) {
app('log')->warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');
@ -316,7 +316,7 @@ class UserEventHandler
{
try {
Notification::send($event->user, new UserNewPassword(route('password.reset', [$event->token])));
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) { /** @phpstan-ignore-line */
$message = $e->getMessage();
if (str_contains($message, 'Bcc')) {
app('log')->warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');
@ -364,7 +364,7 @@ class UserEventHandler
if ($sendMail) {
try {
Notification::send($event->user, new UserRegistrationNotification());
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) { /** @phpstan-ignore-line */
$message = $e->getMessage();
if (str_contains($message, 'Bcc')) {
app('log')->warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');

View File

@ -272,7 +272,7 @@ class OperationsRepository implements OperationsRepositoryInterface
'currency_code' => $journal['currency_code'],
'currency_decimal_places' => $journal['currency_decimal_places'],
];
$array[$currencyId]['sum'] = bcadd($array[$currencyId]['sum'], app('steam')->$direction($journal['amount']));// @phpstan-ignore-line
$array[$currencyId]['sum'] = bcadd($array[$currencyId]['sum'], app('steam')->$direction($journal['amount']));/** @phpstan-ignore-line */
// also do foreign amount:
$foreignId = (int)$journal['foreign_currency_id'];

View File

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

View File

@ -229,7 +229,7 @@ class FireflyValidator extends Validator
}
try {
$checksum = bcmod($iban, '97');
} catch (ValueError $e) { // @phpstan-ignore-line
} catch (ValueError $e) { /** @phpstan-ignore-line */
$message = sprintf('Could not validate IBAN check value "%s" (IBAN "%s")', $iban, $value);
app('log')->error($message);
app('log')->error($e->getTraceAsString());