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:
@@ -59,7 +59,6 @@ class FormController extends Controller
|
||||
* getform.
|
||||
*
|
||||
* @param type Help_topic $topic
|
||||
*
|
||||
* @return type
|
||||
*/
|
||||
public function getForm(Help_topic $topic, CountryCode $code)
|
||||
@@ -69,7 +68,7 @@ class FormController extends Controller
|
||||
}
|
||||
$settings = CommonSettings::select('status')->where('option_name', '=', 'send_otp')->first();
|
||||
$email_mandatory = CommonSettings::select('status')->where('option_name', '=', 'email_mandatory')->first();
|
||||
if (!\Auth::check() && ($settings->status == 1 || $settings->status == '1')) {
|
||||
if (! \Auth::check() && ($settings->status == 1 || $settings->status == '1')) {
|
||||
return redirect('auth/login')->with(['login_require' => 'Please login to your account for submitting a ticket', 'referer' => 'form']);
|
||||
}
|
||||
$location = GeoIP::getLocation();
|
||||
@@ -96,7 +95,6 @@ class FormController extends Controller
|
||||
*
|
||||
* @param type Form_name $name
|
||||
* @param type Form_details $details
|
||||
*
|
||||
* @return type string
|
||||
*/
|
||||
public function postForm($id, Help_topic $topic)
|
||||
@@ -105,7 +103,7 @@ class FormController extends Controller
|
||||
$helptopic = $topic->where('id', '=', $id)->first();
|
||||
$custom_form = $helptopic->custom_form;
|
||||
$values = Fields::where('forms_id', '=', $custom_form)->get();
|
||||
if (!$values) {
|
||||
if (! $values) {
|
||||
}
|
||||
if ($values) {
|
||||
foreach ($values as $form_data) {
|
||||
@@ -188,7 +186,7 @@ class FormController extends Controller
|
||||
// $priority = $ticket_settings->first()->priority;
|
||||
$default_priority = Ticket_Priority::where('is_default', '=', 1)->first();
|
||||
$user_priority = CommonSettings::where('option_name', '=', 'user_priority')->first();
|
||||
if (!($request->input('priority'))) {
|
||||
if (! ($request->input('priority'))) {
|
||||
$priority = $default_priority->priority_id;
|
||||
if ($helpTopicObj->exists() && ($helpTopicObj->value('status') == 1)) {
|
||||
$priority = $helpTopicObj->value('priority');
|
||||
@@ -210,18 +208,18 @@ class FormController extends Controller
|
||||
$geoipcode = $code->where('iso', '=', $location->iso_code)->first();
|
||||
if ($phonecode == null) {
|
||||
$data = [
|
||||
'fails' => Lang::get('lang.country-code-required-error'),
|
||||
'phonecode' => $geoipcode->phonecode,
|
||||
'fails' => Lang::get('lang.country-code-required-error'),
|
||||
'phonecode' => $geoipcode->phonecode,
|
||||
'country_code_error' => 1,
|
||||
];
|
||||
|
||||
return Redirect::back()->with($data)->withInput($request->except('password'));
|
||||
} else {
|
||||
$code = CountryCode::select('phonecode')->where('phonecode', '=', $phonecode)->get();
|
||||
if (!count($code)) {
|
||||
if (! count($code)) {
|
||||
$data = [
|
||||
'fails' => Lang::get('lang.incorrect-country-code-error'),
|
||||
'phonecode' => $geoipcode->phonecode,
|
||||
'fails' => Lang::get('lang.incorrect-country-code-error'),
|
||||
'phonecode' => $geoipcode->phonecode,
|
||||
'country_code_error' => 1,
|
||||
];
|
||||
|
||||
@@ -263,15 +261,14 @@ class FormController extends Controller
|
||||
/**
|
||||
* reply.
|
||||
*
|
||||
* @param type $value
|
||||
*
|
||||
* @param type $value
|
||||
* @return type view
|
||||
*/
|
||||
public function post_ticket_reply($id, Request $request)
|
||||
{
|
||||
try {
|
||||
$comment = $request->input('comment');
|
||||
if (!empty($comment)) {
|
||||
if (! empty($comment)) {
|
||||
$tickets = Tickets::where('id', '=', $id)->first();
|
||||
$thread = Ticket_Thread::where('ticket_id', '=', $tickets->id)->first();
|
||||
|
||||
@@ -315,7 +312,7 @@ class FormController extends Controller
|
||||
$helptopic_id = $request->input('helptopic');
|
||||
$helptopics = new Help_topic();
|
||||
$helptopic = $helptopics->find($helptopic_id);
|
||||
if (!$helptopic) {
|
||||
if (! $helptopic) {
|
||||
throw new Exception('We can not find your request');
|
||||
}
|
||||
$custom_form = $helptopic->custom_form;
|
||||
|
Reference in New Issue
Block a user