Apply Laravel coding style

Shift automatically applies the Laravel coding style - which uses the PSR-12 coding style as a base with some minor additions.

You may customize the code style applied by configuring [Pint](https://laravel.com/docs/pint), [PHP CS Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer), or [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) for your project root.

For more information on customizing the code style applied by Shift, [watch this short video](https://laravelshift.com/videos/shift-code-style).
This commit is contained in:
Shift
2023-01-03 08:25:25 +00:00
parent b535aa90eb
commit 43386fd86d
357 changed files with 15021 additions and 15193 deletions

View File

@@ -67,15 +67,14 @@ class GuestController extends Controller
return view('themes.default1.client.helpdesk.profile', compact('user'))
->with(['phonecode' => $phonecode->phonecode,
'verify' => $status, ]);
'verify' => $status, ]);
}
/**
* Save profile data.
*
* @param type $id
* @param type $id
* @param type ProfileRequest $request
*
* @return type Response
*/
public function postProfile(ProfileRequest $request)
@@ -87,7 +86,7 @@ class GuestController extends Controller
return redirect()->back()->with(['fails' => Lang::get('lang.country-code-required-error'), 'country_code_error' => 1])->withInput();
} else {
$code = CountryCode::select('phonecode')->where('phonecode', '=', $request->get('country_code'))->get();
if (!count($code)) {
if (! count($code)) {
return redirect()->back()->with(['fails' => Lang::get('lang.incorrect-country-code-error'), 'country_code_error' => 1])->withInput();
}
$user->country_code = $request->country_code;
@@ -125,8 +124,7 @@ class GuestController extends Controller
/**
*@category fucntion to check if mobile number is unqique or not
*
*@param string $mobile
*
*@param string $mobile
*@return bool true(if mobile exists in users table)/false (if mobile does not exist in user table)
*/
public function checkMobile($mobile)
@@ -147,7 +145,6 @@ class GuestController extends Controller
* Get Ticket page.
*
* @param type Help_topic $topic
*
* @return type Response
*/
public function getTicket(Help_topic $topic)
@@ -161,7 +158,6 @@ class GuestController extends Controller
* getform.
*
* @param type Help_topic $topic
*
* @return type
*/
public function getForm(Help_topic $topic)
@@ -184,7 +180,6 @@ class GuestController extends Controller
* @param type Tickets $tickets
* @param type Ticket_Thread $thread
* @param type User $user
*
* @return type Response
*/
public function getMyticket()
@@ -198,7 +193,6 @@ class GuestController extends Controller
* @param type Ticket_Thread $thread
* @param type Tickets $tickets
* @param type User $user
*
* @return type Response
*/
public function thread(Ticket_Thread $thread, Tickets $tickets, User $user)
@@ -226,9 +220,8 @@ class GuestController extends Controller
/**
* Post porfile password.
*
* @param type $id
* @param type $id
* @param type ProfilePassword $request
*
* @return type Response
*/
public function postProfilePassword(ProfilePassword $request)
@@ -255,7 +248,6 @@ class GuestController extends Controller
*
* @param type Ticket_Thread $thread
* @param type TicketRequest $request
*
* @return type Response
*/
public function reply(Ticket_Thread $thread, TicketRequest $request)
@@ -278,7 +270,6 @@ class GuestController extends Controller
*
* @param type Tickets $ticket
* @param type User $user
*
* @return type response
*/
public function getCheckTicket(Tickets $ticket, User $user)
@@ -293,13 +284,12 @@ class GuestController extends Controller
* @param type User $user
* @param type Tickets $ticket
* @param type Ticket_Thread $thread
*
* @return type Response
*/
public function PostCheckTicket(Request $request)
{
$validator = \Validator::make($request->all(), [
'email' => 'required|email',
'email' => 'required|email',
'ticket_number' => 'required',
]);
if ($validator->fails()) {
@@ -345,8 +335,7 @@ class GuestController extends Controller
/**
* get ticket email.
*
* @param type $id
*
* @param type $id
* @return type
*/
public function get_ticket_email($id, CommonSettings $common_settings)
@@ -362,7 +351,6 @@ class GuestController extends Controller
* get ticket status.
*
* @param type Tickets $ticket
*
* @return type
*/
public function getTicketStat(Tickets $ticket)
@@ -409,7 +397,7 @@ class GuestController extends Controller
->first();
if ($otp != null) {
$otp_length = strlen(Input::get('otp'));
if (($otp_length == 6 && !preg_match('/[a-z]/i', Input::get('otp')))) {
if (($otp_length == 6 && ! preg_match('/[a-z]/i', Input::get('otp')))) {
$otp2 = Hash::make(Input::get('otp'));
$date1 = date_format($otp->updated_at, 'Y-m-d h:i:sa');
$date2 = date('Y-m-d h:i:sa');
@@ -537,10 +525,10 @@ class GuestController extends Controller
if (count($user) > 0) {
foreach ($user as $key => $value) {
$info->create([
'owner' => $id,
'owner' => $id,
'service' => $provider,
'key' => $key,
'value' => $value,
'key' => $key,
'value' => $value,
]);
}
}
@@ -549,7 +537,7 @@ class GuestController extends Controller
public function changeEmail($email)
{
$user = \Auth::user();
if ($user && $email && !$user->email) {
if ($user && $email && ! $user->email) {
$user->email = $email;
$user->save();
}