Updated dependencies; Fixed codeformatting and phpstan

This commit is contained in:
Constantin Graf
2024-07-31 12:53:41 +02:00
committed by Constantin Graf
parent 5b7df869ad
commit d8968399d6
78 changed files with 1038 additions and 1148 deletions

View File

@@ -212,12 +212,12 @@ class TimeEntryController extends Controller
}
if ($request->input('end') === null && TimeEntry::query()->whereBelongsTo($member, 'member')->where('end', null)->exists()) {
throw new TimeEntryStillRunningApiException();
throw new TimeEntryStillRunningApiException;
}
$client = $request->input('project_id') !== null ? Project::findOrFail((string) $request->input('project_id'))->client : null;
$timeEntry = new TimeEntry();
$timeEntry = new TimeEntry;
$timeEntry->fill($request->validated());
$timeEntry->client()->associate($client);
$timeEntry->user_id = $member->user_id;
@@ -247,7 +247,7 @@ class TimeEntryController extends Controller
}
if ($timeEntry->end !== null && $request->has('end') && $request->input('end') === null) {
throw new TimeEntryCanNotBeRestartedApiException();
throw new TimeEntryCanNotBeRestartedApiException;
}
if ($request->has('project_id')) {
@@ -285,7 +285,7 @@ class TimeEntryController extends Controller
$changes = $request->validated('changes');
if (isset($changes['member_id']) && ! $canAccessAll && $this->member($organization)->getKey() !== $changes['member_id']) {
throw new AuthorizationException();
throw new AuthorizationException;
}
$client = null;
@@ -295,8 +295,8 @@ class TimeEntryController extends Controller
$overwriteClient = true;
}
$success = new Collection();
$error = new Collection();
$success = new Collection;
$error = new Collection;
foreach ($ids as $id) {
/** @var TimeEntry|null $timeEntry */