mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-18 23:50:09 +00:00
Fix code
This commit is contained in:
@@ -99,7 +99,7 @@ class IndexController extends Controller
|
||||
$activities = app('steam')->getLastActivities($ids);
|
||||
|
||||
$accounts->each(
|
||||
function (Account $account) use ($activities, $startBalances, $endBalances) {
|
||||
function (Account $account) use ($activities, $startBalances, $endBalances): void {
|
||||
$account->lastActivityDate = $this->isInArrayDate($activities, $account->id);
|
||||
$account->startBalance = $this->isInArray($startBalances, $account->id);
|
||||
$account->endBalance = $this->isInArray($endBalances, $account->id);
|
||||
@@ -162,7 +162,7 @@ class IndexController extends Controller
|
||||
$activities = app('steam')->getLastActivities($ids);
|
||||
|
||||
$accounts->each(
|
||||
function (Account $account) use ($activities, $startBalances, $endBalances) {
|
||||
function (Account $account) use ($activities, $startBalances, $endBalances): void {
|
||||
$interest = (string)$this->repository->getMetaValue($account, 'interest');
|
||||
$interest = '' === $interest ? '0' : $interest;
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ class LinkController extends Controller
|
||||
|
||||
Log::channel('audit')->info('User on index of link types in admin.');
|
||||
$linkTypes->each(
|
||||
function (LinkType $linkType) {
|
||||
function (LinkType $linkType): void {
|
||||
$linkType->journalCount = $this->repository->countJournals($linkType);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -173,7 +173,7 @@ class UserController extends Controller
|
||||
|
||||
// add meta stuff.
|
||||
$users->each(
|
||||
function (User $user) {
|
||||
function (User $user): void {
|
||||
$user->isAdmin = $this->repository->hasRole($user, 'owner');
|
||||
$user->has2FA = null !== $user->mfa_secret;
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ class ResetPasswordController extends Controller
|
||||
// database. Otherwise we will parse the error and return the response.
|
||||
$response = $this->broker()->reset(
|
||||
$this->credentials($request),
|
||||
function ($user, $password) {
|
||||
function ($user, $password): void {
|
||||
$this->resetPassword($user, $password);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -77,7 +77,7 @@ class IndexController extends Controller
|
||||
$collection = $collection->slice(($page - 1) * $pageSize, $pageSize);
|
||||
|
||||
$collection->each(
|
||||
function (Category $category) {
|
||||
function (Category $category): void {
|
||||
$category->lastActivity = $this->repository->lastUseDate($category, new Collection());
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user