diff --git a/app/Http/Controllers/CalendarController.php b/app/Http/Controllers/CalendarController.php index 9195e23..bc37a54 100644 --- a/app/Http/Controllers/CalendarController.php +++ b/app/Http/Controllers/CalendarController.php @@ -23,7 +23,7 @@ class CalendarController extends Controller public Carbon $gridEndsAt; - public function __construct(int $initialYear = null, int $initialMonth = null, int $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 diff --git a/app/Http/Controllers/ChatController.php b/app/Http/Controllers/ChatController.php index 97e0240..be431e2 100644 --- a/app/Http/Controllers/ChatController.php +++ b/app/Http/Controllers/ChatController.php @@ -2,7 +2,6 @@ namespace App\Http\Controllers; -use App\Events\ChatMessageUpdated; use App\Models\Chat; use App\Models\User; use Illuminate\View\View; @@ -94,7 +93,7 @@ class ChatController extends Controller /** * Show the form for creating a new resource. * - // * @return \Illuminate\Http\Response + * // * @return \Illuminate\Http\Response */ public function create(): void { @@ -129,7 +128,7 @@ class ChatController extends Controller ); } - private function makeChanName(int $from = null, int $to = null): string + private function makeChanName(?int $from = null, ?int $to = null): string { return (int) $from < (int) $to ? $from.'_'.$to diff --git a/app/Http/Controllers/RegistrationStartController.php b/app/Http/Controllers/RegistrationStartController.php index f164bea..7f6629d 100644 --- a/app/Http/Controllers/RegistrationStartController.php +++ b/app/Http/Controllers/RegistrationStartController.php @@ -1,6 +1,7 @@ '$refresh']; - } - public function render(): View { $lastOneMisure = $this @@ -23,8 +18,8 @@ class CircumferenceChart extends Component ->circumference_measures() ->latest() ->first(); - // ->get() - // ->last(); + // ->get() + // ->last(); $lastFourMisures = $this ->user @@ -58,4 +53,9 @@ class CircumferenceChart extends Component ] ); } + + protected function getListeners(): array + { + return ['circumference-chart-updated' => '$refresh']; + } } diff --git a/app/Livewire/Profile/DescriptionForm.php b/app/Livewire/Profile/DescriptionForm.php index 6b4bde6..9cfdce3 100644 --- a/app/Livewire/Profile/DescriptionForm.php +++ b/app/Livewire/Profile/DescriptionForm.php @@ -46,7 +46,7 @@ class DescriptionForm extends Component ] ); - if (!isset($curUserDetailez->id)) { + if (! isset($curUserDetailez->id)) { $curUserDetailez->save(); } diff --git a/app/Livewire/Profile/EditDetailzForm.php b/app/Livewire/Profile/EditDetailzForm.php index 5fa53ab..6135773 100644 --- a/app/Livewire/Profile/EditDetailzForm.php +++ b/app/Livewire/Profile/EditDetailzForm.php @@ -7,8 +7,8 @@ use App\Models\User; use App\Models\UserDetailz; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Validator; -use Livewire\Component; use Illuminate\View\View; +use Livewire\Component; class EditDetailzForm extends Component { diff --git a/app/Livewire/Profile/PhotoForm.php b/app/Livewire/Profile/PhotoForm.php index a634137..06863f6 100644 --- a/app/Livewire/Profile/PhotoForm.php +++ b/app/Livewire/Profile/PhotoForm.php @@ -2,15 +2,15 @@ namespace App\Livewire\Profile; +use App\Models\User; +use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\DB; +use Illuminate\View\View; use Laravel\Fortify\Contracts\UpdatesUserProfileInformation; use Livewire\Component; -use Livewire\WithFileUploads; -use Illuminate\Http\UploadedFile; -use App\Models\User; -use Illuminate\View\View; use Livewire\Features\SupportFileUploads\TemporaryUploadedFile; +use Livewire\WithFileUploads; class PhotoForm extends Component { diff --git a/app/Livewire/Profile/ShowDetailz.php b/app/Livewire/Profile/ShowDetailz.php index a0d31e6..11b2574 100644 --- a/app/Livewire/Profile/ShowDetailz.php +++ b/app/Livewire/Profile/ShowDetailz.php @@ -4,11 +4,11 @@ namespace App\Livewire\Profile; use App\Models\User; use App\Models\UserDetailz; -use Illuminate\View\View; -use Livewire\Features\SupportRedirects\Redirector; -use Livewire\Component; -use Masmerise\Toaster\Toaster; use Illuminate\Http\RedirectResponse; +use Illuminate\View\View; +use Livewire\Component; +use Livewire\Features\SupportRedirects\Redirector; +use Masmerise\Toaster\Toaster; class ShowDetailz extends Component { diff --git a/app/Livewire/Profile/WeightChart.php b/app/Livewire/Profile/WeightChart.php index 915a61c..d6cd05d 100644 --- a/app/Livewire/Profile/WeightChart.php +++ b/app/Livewire/Profile/WeightChart.php @@ -4,18 +4,13 @@ namespace App\Livewire\Profile; use App\Models\User; use Asantibanez\LivewireCharts\Models\AreaChartModel; -use Livewire\Component; use Illuminate\View\View; +use Livewire\Component; class WeightChart extends Component { public User $user; - protected function getListeners(): array - { - return ['weight-chart-updated' => '$refresh']; - } - public function render(): View { $areaChartModel = @@ -45,4 +40,9 @@ class WeightChart extends Component ] ); } + + protected function getListeners(): array + { + return ['weight-chart-updated' => '$refresh']; + } } diff --git a/app/Livewire/Registration/Step1.php b/app/Livewire/Registration/Step1.php index 6cd843f..1d72dcb 100644 --- a/app/Livewire/Registration/Step1.php +++ b/app/Livewire/Registration/Step1.php @@ -9,11 +9,11 @@ use Illuminate\Http\RedirectResponse; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Validator; use Illuminate\Support\Str; -use Illuminate\Validation\Rules\Password; use Illuminate\Validation\Rule; +use Illuminate\Validation\Rules\Password; use Illuminate\View\View; -use Livewire\Features\SupportRedirects\Redirector; use Livewire\Component; +use Livewire\Features\SupportRedirects\Redirector; class Step1 extends Component { @@ -73,7 +73,7 @@ class Step1 extends Component { $this->step = $step; collect(session()->get('registrationdata', [])) - ->each(fn($item, $key) => $this->{$key} = $item); + ->each(fn ($item, $key) => $this->{$key} = $item); } public function render(): View diff --git a/app/Livewire/TagsComponent.php b/app/Livewire/TagsComponent.php index 35a2f2d..32e76f9 100644 --- a/app/Livewire/TagsComponent.php +++ b/app/Livewire/TagsComponent.php @@ -4,9 +4,9 @@ namespace App\Livewire; // use App\Models\BlogPost; use App\Models\Tag; +use Illuminate\View\View; use Livewire\Attributes\On; use Livewire\Component; -use Illuminate\View\View; class TagsComponent extends Component { diff --git a/app/Livewire/User/AddCircumference.php b/app/Livewire/User/AddCircumference.php index a78f4f6..2f089a5 100644 --- a/app/Livewire/User/AddCircumference.php +++ b/app/Livewire/User/AddCircumference.php @@ -7,8 +7,8 @@ namespace App\Livewire\User; use App\Models\CircumferenceMeasure; use App\Models\User; use Illuminate\Support\Facades\Auth; -use LivewireUI\Modal\ModalComponent; use Illuminate\View\View; +use LivewireUI\Modal\ModalComponent; class AddCircumference extends ModalComponent { diff --git a/app/Livewire/User/AddWeight.php b/app/Livewire/User/AddWeight.php index a256219..b6da0c6 100644 --- a/app/Livewire/User/AddWeight.php +++ b/app/Livewire/User/AddWeight.php @@ -5,8 +5,8 @@ namespace App\Livewire\User; use App\Models\User; use App\Models\WeightMeasure; use Illuminate\Support\Facades\Auth; -use LivewireUI\Modal\ModalComponent; use Illuminate\View\View; +use LivewireUI\Modal\ModalComponent; class AddWeight extends ModalComponent {