Drop to level 6, that should fix the build.

This commit is contained in:
James Cole 2023-11-04 12:10:17 +01:00
parent b77b3e3fc8
commit 94b0028254
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80
6 changed files with 35 additions and 9 deletions

View File

@ -68,7 +68,6 @@ parameters:
message: '#Either catch a more specific exception#'
paths:
- ../app/Support/Form/FormSupport.php
paths:
- ../app
- ../database
@ -77,5 +76,5 @@ parameters:
- ../bootstrap/app.php
# The level 8 is the highest level. original was 5
level: 7
level: 6

View File

@ -66,8 +66,13 @@ class TestRequest extends FormRequest
*/
private function getDate(string $field): ?Carbon
{
$result = null === $this->query($field) ? null : Carbon::createFromFormat('Y-m-d', substr((string)$this->query($field), 0, 10));
if(false === $result) {
$value = $this->query($field);
if (is_array($value)) {
return null;
}
$value = (string)$value;
$result = null === $this->query($field) ? null : Carbon::createFromFormat('Y-m-d', substr($value, 0, 10));
if (false === $result) {
return null;
}
return $result;

View File

@ -56,8 +56,13 @@ class TriggerRequest extends FormRequest
*/
private function getDate(string $field): ?Carbon
{
$result = null === $this->query($field) ? null : Carbon::createFromFormat('Y-m-d', substr((string)$this->query($field), 0, 10));
if(false === $result) {
$value = $this->query($field);
if (is_array($value)) {
return null;
}
$value = (string)$value;
$result = null === $this->query($field) ? null : Carbon::createFromFormat('Y-m-d', substr($value, 0, 10));
if (false === $result) {
return null;
}
return $result;

View File

@ -56,7 +56,16 @@ class TestRequest extends FormRequest
*/
private function getDate(string $field): ?Carbon
{
return null === $this->query($field) ? null : Carbon::createFromFormat('Y-m-d', $this->query($field));
$value = $this->query($field);
if (is_array($value)) {
return null;
}
$value = (string)$value;
$result = null === $this->query($field) ? null : Carbon::createFromFormat('Y-m-d', substr($value, 0, 10));
if (false === $result) {
return null;
}
return $result;
}
/**

View File

@ -56,8 +56,13 @@ class TriggerRequest extends FormRequest
*/
private function getDate(string $field): ?Carbon
{
$result = null === $this->query($field) ? null : Carbon::createFromFormat('Y-m-d', substr((string)$this->query($field), 0, 10));
if(false === $result) {
$value = $this->query($field);
if (is_array($value)) {
return null;
}
$value = (string)$value;
$result = null === $this->query($field) ? null : Carbon::createFromFormat('Y-m-d', substr($value, 0, 10));
if (false === $result) {
return null;
}
return $result;

View File

@ -127,6 +127,9 @@ class LoginController extends Controller
Log::channel('audit')->info(sprintf('Login failed. Attempt for user "%s" failed.', $request->get($this->username())));
$this->sendFailedLoginResponse($request);
/** @noinspection PhpUnreachableStatementInspection */
return response()->json([]);
}
/**