mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-18 13:12:16 +01:00
Fixed static code analysis
This commit is contained in:
committed by
Constantin Graf
parent
54d8c8a894
commit
09a79508ae
@@ -215,7 +215,7 @@ class TimeEntryController extends Controller
|
|||||||
throw new TimeEntryStillRunningApiException();
|
throw new TimeEntryStillRunningApiException();
|
||||||
}
|
}
|
||||||
|
|
||||||
$client = $request->input('project_id') !== null ? Project::findOrFail($request->input('project_id'))->client : null;
|
$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->fill($request->validated());
|
||||||
@@ -251,7 +251,7 @@ class TimeEntryController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($request->has('project_id')) {
|
if ($request->has('project_id')) {
|
||||||
$client = $request->input('project_id') !== null ? Project::findOrFail($request->input('project_id'))->client : null;
|
$client = $request->input('project_id') !== null ? Project::findOrFail((string) $request->input('project_id'))->client : null;
|
||||||
$timeEntry->client()->associate($client);
|
$timeEntry->client()->associate($client);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -286,7 +286,7 @@ class TimeEntryController extends Controller
|
|||||||
$client = null;
|
$client = null;
|
||||||
$overwriteClient = false;
|
$overwriteClient = false;
|
||||||
if ($request->has('changes.project_id')) {
|
if ($request->has('changes.project_id')) {
|
||||||
$client = $request->input('changes.project_id') !== null ? Project::findOrFail($request->input('changes.project_id'))?->client : null;
|
$client = $request->input('changes.project_id') !== null ? Project::findOrFail((string) $request->input('changes.project_id'))->client : null;
|
||||||
$overwriteClient = true;
|
$overwriteClient = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user