forked from eatvio/eatvio-infra
meeting the requirements of a static analyzer
This commit is contained in:
@@ -5,35 +5,30 @@ namespace App\Livewire\Registration;
|
||||
use App\Actions\Fortify\CreateNewUser;
|
||||
use App\Rules\MinWords;
|
||||
use Illuminate\Auth\Events\Registered;
|
||||
use Illuminate\Contracts\View\Factory as ViewFactory;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\Rules\Password;
|
||||
// use Laravel\Fortify\Contracts\RegisterResponse;
|
||||
// use Illuminate\Contracts\Auth\StatefulGuard;
|
||||
// use App\Models\User;
|
||||
// use App\Models\UserDetailz;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Contracts\View\Factory as ViewFactory;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Livewire\Component;
|
||||
|
||||
// use \Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||
use Livewire\Features\SupportRedirects\Redirector;
|
||||
|
||||
class Step1 extends Component
|
||||
{
|
||||
public string $step;
|
||||
|
||||
public string $first_name;
|
||||
public string $first_name = '';
|
||||
|
||||
public string $last_name;
|
||||
public string $last_name = '';
|
||||
|
||||
public string $email;
|
||||
public string $email = '';
|
||||
|
||||
public string $password;
|
||||
public string $password = '';
|
||||
|
||||
public string $password_confirmation;
|
||||
public string $password_confirmation = '';
|
||||
|
||||
public string $birthdate;
|
||||
|
||||
@@ -45,35 +40,35 @@ class Step1 extends Component
|
||||
|
||||
public string $lang = 'ru';
|
||||
|
||||
public int $weight;
|
||||
public string $weight = '';
|
||||
|
||||
public int $height;
|
||||
public string $height = '';
|
||||
|
||||
public int $chest_circumference;
|
||||
public string $chest_circumference = '';
|
||||
|
||||
public int $waist_circumference;
|
||||
public string $waist_circumference = '';
|
||||
|
||||
public int $hip_circumference;
|
||||
public string $hip_circumference = '';
|
||||
|
||||
public int $blood_pressure_up;
|
||||
public string $blood_pressure_up = '';
|
||||
|
||||
public int $blood_pressure_down;
|
||||
public string $blood_pressure_down = '';
|
||||
|
||||
public int $has_hypo = 0;
|
||||
public int|string $has_hypo = 0;
|
||||
|
||||
public int $has_hyper = 0;
|
||||
public int|string $has_hyper = 0;
|
||||
|
||||
public string $about_alergy;
|
||||
public string $about_alergy = '';
|
||||
|
||||
public string $about_taking_pils;
|
||||
public string $about_taking_pils = '';
|
||||
|
||||
public string $about_sport_hobbies;
|
||||
public string $about_sport_hobbies = '';
|
||||
|
||||
public string $favorite_foods;
|
||||
public string $favorite_foods = '';
|
||||
|
||||
public string $unfavorite_foods;
|
||||
public string $unfavorite_foods = '';
|
||||
|
||||
public string $additional_info;
|
||||
public string $additional_info = '';
|
||||
|
||||
public function mount(string $step): void
|
||||
{
|
||||
@@ -88,7 +83,7 @@ class Step1 extends Component
|
||||
->extends('layouts.register');
|
||||
}
|
||||
|
||||
public function nextStep(): RedirectResponse
|
||||
public function nextStep(): RedirectResponse|Redirector
|
||||
{
|
||||
$validatedData = Validator::make(
|
||||
$this->getValidateData($this->step),
|
||||
@@ -109,7 +104,7 @@ class Step1 extends Component
|
||||
);
|
||||
}
|
||||
|
||||
public function skipStep(): RedirectResponse
|
||||
public function skipStep(): RedirectResponse|Redirector
|
||||
{
|
||||
$validatedData = $this->getValidateData($this->step);
|
||||
$registrationdata = session()->get('registrationdata', []);
|
||||
@@ -126,9 +121,9 @@ class Step1 extends Component
|
||||
);
|
||||
}
|
||||
|
||||
public function goBack(): RedirectResponse
|
||||
public function goBack(): RedirectResponse|Redirector
|
||||
{
|
||||
$nextStep = 'step'. (((int) Str::replaceFirst('step', '', $this->step)) - 1);
|
||||
$nextStep = 'step'.((int) Str::replaceFirst('step', '', $this->step) - 1);
|
||||
|
||||
return redirect()
|
||||
->route(
|
||||
@@ -139,7 +134,7 @@ class Step1 extends Component
|
||||
);
|
||||
}
|
||||
|
||||
public function finishRegistretion(): RedirectResponse
|
||||
public function finishRegistretion(): RedirectResponse|Redirector
|
||||
{
|
||||
$validatedData = Validator::make(
|
||||
$this->getValidateData($this->step),
|
||||
|
||||
Reference in New Issue
Block a user