meeting the requirements of a static analyzer

This commit is contained in:
Anatoliy Poloz
2024-01-15 17:11:55 +03:00
81 changed files with 1320 additions and 501 deletions

View File

@@ -12,23 +12,20 @@ use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
class CalendarController extends Controller
{
public string|int|null $weekStartsAt;
public int $weekStartsAt;
public string|int|null $weekEndsAt;
public int $weekEndsAt;
public Carbon $startsAt;
public Carbon $endsAt;
public string|int|null $gridStartsAt;
public Carbon $gridStartsAt;
public string|int|null $gridEndsAt;
public Carbon $gridEndsAt;
public function __construct(
string|int|null $initialYear = null,
string|int|null $initialMonth = null,
string|int|null $weekStartsAt = null
) {
public function __construct(?int $initialYear = null, ?int $initialMonth = null, ?int $weekStartsAt = null)
{
$this->weekStartsAt = $weekStartsAt ?? Carbon::MONDAY;
$this->weekEndsAt = $this->weekStartsAt === Carbon::MONDAY
? Carbon::SUNDAY