Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply fixes from StyleCI #717

Merged
merged 1 commit into from
May 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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