Skip to content

Commit

Permalink
Merge pull request #717 from HDInnovations/analysis-8nEOdA
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
HDVinnie authored May 5, 2019
2 parents 88c8d6f + 4eecc04 commit a755cf2
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 23 deletions.
2 changes: 1 addition & 1 deletion app/Helpers/Markdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ protected function blockHeader($Line)

protected function blockList($Line)
{
list($name, $pattern) = $Line['text'][0] <= '-' ? ['ul', '[*+-]'] : ['ol', '[0-9]+[.]'];
[$name, $pattern] = $Line['text'][0] <= '-' ? ['ul', '[*+-]'] : ['ol', '[0-9]+[.]'];

if (preg_match('/^('.$pattern.'[ ]+)(.*)/', $Line['text'], $matches)) {
$Block = [
Expand Down
11 changes: 4 additions & 7 deletions app/Http/Controllers/Auth/ApplicationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ public function store(Request $request)
'links.*' => 'filled',
'links' => 'min:2',
]);
}
else {
} else {
$v = validator($request->all(), [
'type' => 'required',
'email' => 'required|email|unique:invites|unique:users|unique:applications|email_list:allow',
Expand All @@ -65,7 +64,7 @@ public function store(Request $request)
'links.*' => 'filled',
'links' => 'min:2',
'g-recaptcha-response' => 'required|recaptcha',
]);
]);
}
} elseif (config('email-white-blacklist.enabled') === 'block') {
if (config('captcha.enabled') == false) {
Expand All @@ -78,8 +77,7 @@ public function store(Request $request)
'links.*' => 'filled',
'links' => 'min:2',
]);
}
else {
} else {
$v = validator($request->all(), [
'type' => 'required',
'email' => 'required|email|unique:invites|unique:users|unique:applications|email_list:block',
Expand All @@ -102,8 +100,7 @@ public function store(Request $request)
'links.*' => 'filled',
'links' => 'min:2',
]);
}
else {
} else {
$v = validator($request->all(), [
'type' => 'required',
'email' => 'required|email|unique:invites|unique:users|unique:applications',
Expand Down
22 changes: 10 additions & 12 deletions app/Http/Controllers/Auth/ForgotPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@

namespace App\Http\Controllers\Auth;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Password;

class ForgotPasswordController extends Controller
{
Expand All @@ -27,17 +26,16 @@ public function __construct()
{
$this->middleware('guest');
}

protected function validateEmail(Request $request)
{
if (config('captcha.enabled') == false) {
$request->validate(['email' => 'required|email']);
}
else{
$request->validate([
'email' => 'required|email',
'g-recaptcha-response' => 'required|recaptcha',
]);
}
}
$request->validate(['email' => 'required|email']);
} else {
$request->validate([
'email' => 'required|email',
'g-recaptcha-response' => 'required|recaptcha',
]);
}
}
}
3 changes: 1 addition & 2 deletions app/Http/Controllers/Auth/ForgotUsernameController.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ public function sendUsernameReminder(Request $request)
$v = validator($request->all(), [
'email' => 'required',
]);
}
else {
} else {
$v = validator($request->all(), [
'email' => 'required',
'g-recaptcha-response' => 'required|recaptcha',
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/NotificationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
namespace App\Http\Controllers;

use Carbon\Carbon;
use Illuminate\Http\Request;
use App\Models\Notification;
use Illuminate\Http\Request;

class NotificationController extends Controller
{
Expand Down

0 comments on commit a755cf2

Please sign in to comment.