PHP Insights added

This commit is contained in:
Anatoliy Poloz
2023-12-18 14:51:58 +03:00
parent 31128488ac
commit 1b9998cdef
71 changed files with 1655 additions and 575 deletions

View File

@@ -27,7 +27,7 @@ class CalendarController extends Controller
public function __construct($initialYear = null, $initialMonth = null, $weekStartsAt = null)
{
$this->weekStartsAt = $weekStartsAt ?? Carbon::MONDAY;
$this->weekEndsAt = $this->weekStartsAt == Carbon::MONDAY
$this->weekEndsAt = $this->weekStartsAt === Carbon::MONDAY
? Carbon::SUNDAY
: collect([0, 1, 2, 3, 4, 5, 6])->get($this->weekStartsAt + 6 - 7);
@@ -37,7 +37,6 @@ class CalendarController extends Controller
$this->startsAt = Carbon::createFromDate($initialYear, $initialMonth, 1)->startOfDay();
$this->endsAt = $this->startsAt->clone()->endOfMonth()->startOfDay();
$this->calculateGridStartsEnds();
}
public function calculateGridStartsEnds()
@@ -73,7 +72,6 @@ class CalendarController extends Controller
'curUser' => $curUser,
]
);
//
}
/**
@@ -83,7 +81,6 @@ class CalendarController extends Controller
*/
public function create()
{
//
}
/**
@@ -93,7 +90,6 @@ class CalendarController extends Controller
*/
public function store(Request $request)
{
//
}
/**
@@ -103,7 +99,6 @@ class CalendarController extends Controller
*/
public function show(Calendar $calendar)
{
//
}
/**
@@ -113,7 +108,6 @@ class CalendarController extends Controller
*/
public function edit(Calendar $calendar)
{
//
}
/**
@@ -123,7 +117,6 @@ class CalendarController extends Controller
*/
public function update(Request $request, Calendar $calendar)
{
//
}
/**
@@ -133,6 +126,5 @@ class CalendarController extends Controller
*/
public function destroy(Calendar $calendar)
{
//
}
}