mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-18 07:38:29 +00:00
Fix various phpstan issues.
This commit is contained in:
@@ -88,7 +88,7 @@ class LinkController extends Controller
|
||||
*/
|
||||
public function delete(Request $request, LinkType $linkType)
|
||||
{
|
||||
if (!$linkType->editable) {
|
||||
if (false === $linkType->editable) {
|
||||
$request->session()->flash('error', (string) trans('firefly.cannot_edit_link_type', ['name' => e($linkType->name)]));
|
||||
|
||||
return redirect(route('admin.links.index'));
|
||||
@@ -139,7 +139,7 @@ class LinkController extends Controller
|
||||
*/
|
||||
public function edit(Request $request, LinkType $linkType)
|
||||
{
|
||||
if (!$linkType->editable) {
|
||||
if (false === $linkType->editable) {
|
||||
$request->session()->flash('error', (string) trans('firefly.cannot_edit_link_type', ['name' => e($linkType->name)]));
|
||||
|
||||
return redirect(route('admin.links.index'));
|
||||
@@ -231,7 +231,7 @@ class LinkController extends Controller
|
||||
*/
|
||||
public function update(LinkTypeFormRequest $request, LinkType $linkType)
|
||||
{
|
||||
if (!$linkType->editable) {
|
||||
if (false === $linkType->editable) {
|
||||
$request->session()->flash('error', (string) trans('firefly.cannot_edit_link_type', ['name' => e($linkType->name)]));
|
||||
|
||||
return redirect(route('admin.links.index'));
|
||||
|
||||
@@ -57,7 +57,7 @@ class NotificationController extends Controller
|
||||
// admin notification settings:
|
||||
$notifications = [];
|
||||
foreach (config('notifications.notifications.owner') as $key => $info) {
|
||||
if ($info['enabled']) {
|
||||
if (true === $info['enabled']) {
|
||||
$notifications[$key] = app('fireflyconfig')->get(sprintf('notification_%s', $key), true)->data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ class UserController extends Controller
|
||||
public function deleteInvite(InvitedUser $invitedUser): JsonResponse
|
||||
{
|
||||
app('log')->debug('Will now delete invitation');
|
||||
if ($invitedUser->redeemed) {
|
||||
if (true === $invitedUser->redeemed) {
|
||||
app('log')->debug('Is already redeemed.');
|
||||
session()->flash('error', trans('firefly.invite_is_already_redeemed', ['address' => $invitedUser->email]));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user