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-07 20:32:31 +00:00
parent f9ae387337
commit 87acc30a0b
235 changed files with 14454 additions and 14841 deletions

View File

@@ -67,12 +67,11 @@ class AgentController extends Controller
/**
* creating a new agent.
*
* @param Assign_team_agent $team_assign_agent
* @param Timezones $timezone
* @param Groups $group
* @param Department $department
* @param Teams $team_all
*
* @param Assign_team_agent $team_assign_agent
* @param Timezones $timezone
* @param Groups $group
* @param Department $department
* @param Teams $team_all
* @return type view
*/
public function create(Timezones $timezone, Groups $group, Department $department, Teams $team_all, CountryCode $code)
@@ -103,10 +102,9 @@ class AgentController extends Controller
/**
* store a new agent.
*
* @param User $user
* @param AgentRequest $request
* @param Assign_team_agent $team_assign_agent
*
* @param User $user
* @param AgentRequest $request
* @param Assign_team_agent $team_assign_agent
* @return type Response
*/
public function store(User $user, AgentRequest $request)
@@ -115,7 +113,7 @@ class AgentController extends Controller
return redirect()->back()->with(['fails2' => Lang::get('lang.country-code-required-error'), 'country_code' => 1])->withInput();
} else {
$code = CountryCode::select('phonecode')->where('phonecode', '=', $request->get('country_code'))->get();
if (!count($code)) {
if (! count($code)) {
return redirect()->back()->with(['fails2' => Lang::get('lang.incorrect-country-code-error'), 'country_code' => 1])->withInput();
}
}
@@ -177,7 +175,6 @@ class AgentController extends Controller
* @param type Groups $group
* @param type Department $department
* @param type Teams $team
*
* @return type Response
*/
public function edit($id, User $user, Assign_team_agent $team_assign_agent, Timezones $timezone, Groups $group, Department $department, Teams $team, CountryCode $code)
@@ -208,7 +205,6 @@ class AgentController extends Controller
* @param type User $user
* @param type AgentUpdate $request
* @param type Assign_team_agent $team_assign_agent
*
* @return type Response
*/
public function update($id, User $user, AgentUpdate $request, Assign_team_agent $team_assign_agent)
@@ -217,7 +213,7 @@ class AgentController extends Controller
return redirect()->back()->with(['fails2' => Lang::get('lang.country-code-required-error'), 'country_code' => 1])->withInput();
} else {
$code = CountryCode::select('phonecode')->where('phonecode', '=', $request->get('country_code'))->get();
if (!count($code)) {
if (! count($code)) {
return redirect()->back()->with(['fails2' => Lang::get('lang.incorrect-country-code-error'), 'country_code' => 1])->withInput();
}
}
@@ -256,13 +252,12 @@ class AgentController extends Controller
/**
* Remove the specified agent from storage.
*
* @param type $id
* @param User $user
* @param Assign_team_agent $team_assign_agent
* @param type $id
* @param User $user
* @param Assign_team_agent $team_assign_agent
* @return type Response
*
* @throws Exception
*
* @return type Response
*/
public function destroy($id, User $user, Assign_team_agent $team_assign_agent)
{
@@ -288,8 +283,7 @@ class AgentController extends Controller
/**
* Generate a random string for password.
*
* @param type $length
*
* @param type $length
* @return string
*/
public function generateRandomString($length = 10)