Skip to content

Commit

Permalink
Merge pull request #429 from jeremykenedy/analysis-PG2wBo
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
jeremykenedy authored Feb 27, 2023
2 parents 203b96f + 5eac3a9 commit c3da504
Show file tree
Hide file tree
Showing 16 changed files with 61 additions and 61 deletions.
1 change: 0 additions & 1 deletion app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ class Handler extends ExceptionHandler
public function register(): void
{
$this->reportable(function (Throwable $e) {

$enableEmailExceptions = config('exceptions.emailExceptionEnabled');

if ($enableEmailExceptions === '') {
Expand Down
6 changes: 3 additions & 3 deletions app/Http/Controllers/Auth/NewPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public function create(Request $request): View
public function store(Request $request): RedirectResponse
{
$request->validate([
'token' => ['required'],
'email' => ['required', 'email'],
'token' => ['required'],
'email' => ['required', 'email'],
'password' => ['required', 'confirmed', Rules\Password::defaults()],
]);

Expand All @@ -42,7 +42,7 @@ public function store(Request $request): RedirectResponse
$request->only('email', 'password', 'password_confirmation', 'token'),
function ($user) use ($request) {
$user->forceFill([
'password' => Hash::make($request->password),
'password' => Hash::make($request->password),
'remember_token' => Str::random(60),
])->save();

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/PasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function update(Request $request): RedirectResponse
{
$validated = $request->validateWithBag('updatePassword', [
'current_password' => ['required', 'current_password'],
'password' => ['required', Password::defaults(), 'confirmed'],
'password' => ['required', Password::defaults(), 'confirmed'],
]);

$request->user()->update([
Expand Down
8 changes: 4 additions & 4 deletions app/Http/Controllers/Auth/RegisteredUserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ public function create(): View
public function store(Request $request): RedirectResponse
{
$request->validate([
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'email', 'max:255', 'unique:'.User::class],
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'email', 'max:255', 'unique:'.User::class],
'password' => ['required', 'confirmed', Rules\Password::defaults()],
]);

$user = User::create([
'name' => $request->name,
'email' => $request->email,
'name' => $request->name,
'email' => $request->email,
'password' => Hash::make($request->password),
]);

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Requests/Auth/LoginRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function authorize(): bool
public function rules(): array
{
return [
'email' => ['required', 'string', 'email'],
'email' => ['required', 'string', 'email'],
'password' => ['required', 'string'],
];
}
Expand Down
2 changes: 1 addition & 1 deletion app/Providers/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace App\Providers;

use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Gate;

class AuthServiceProvider extends ServiceProvider
{
Expand Down
1 change: 1 addition & 0 deletions app/Providers/EventServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class EventServiceProvider extends ServiceProvider
'SocialiteProviders\\LinkedIn\\LinkedInExtendSocialite@handle',
],
];

/**
* Register any events for your application.
*/
Expand Down
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
use Collective\Html\FormFacade;
use Collective\Html\HtmlFacade;
use Creativeorange\Gravatar\Facades\Gravatar;
use Laravel\Socialite\Facades\Socialite;
use Illuminate\Support\Facades\Facade;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Redis;
use Intervention\Image\Facades\Image;
use jeremykenedy\Uuid\Uuid;
use Laravel\Socialite\Facades\Socialite;

return [

Expand Down
16 changes: 8 additions & 8 deletions config/broadcasting.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@
'connections' => [

'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com',
'port' => env('PUSHER_PORT', 443),
'scheme' => env('PUSHER_SCHEME', 'https'),
'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com',
'port' => env('PUSHER_PORT', 443),
'scheme' => env('PUSHER_SCHEME', 'https'),
'encrypted' => true,
'useTLS' => env('PUSHER_SCHEME', 'https') === 'https',
'useTLS' => env('PUSHER_SCHEME', 'https') === 'https',
],
'client_options' => [
// Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
Expand Down
2 changes: 1 addition & 1 deletion config/logging.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

'deprecations' => [
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
'trace' => false,
'trace' => false,
],

/*
Expand Down
46 changes: 23 additions & 23 deletions config/queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,39 +35,39 @@
],

'database' => [
'driver' => 'database',
'table' => 'jobs',
'queue' => 'default',
'retry_after' => 90,
'driver' => 'database',
'table' => 'jobs',
'queue' => 'default',
'retry_after' => 90,
'after_commit' => false,
],

'beanstalkd' => [
'driver' => 'beanstalkd',
'host' => 'localhost',
'queue' => 'default',
'retry_after' => 90,
'block_for' => 0,
'driver' => 'beanstalkd',
'host' => 'localhost',
'queue' => 'default',
'retry_after' => 90,
'block_for' => 0,
'after_commit' => false,
],

'sqs' => [
'driver' => 'sqs',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
'queue' => env('SQS_QUEUE', 'default'),
'suffix' => env('SQS_SUFFIX'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'driver' => 'sqs',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
'queue' => env('SQS_QUEUE', 'default'),
'suffix' => env('SQS_SUFFIX'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'after_commit' => false,
],

'redis' => [
'driver' => 'redis',
'connection' => 'default',
'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => 90,
'block_for' => null,
'driver' => 'redis',
'connection' => 'default',
'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => 90,
'block_for' => null,
'after_commit' => false,
],

Expand All @@ -92,9 +92,9 @@
*/

'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs',
'table' => 'failed_jobs',
],

];
2 changes: 1 addition & 1 deletion config/sanctum.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

'middleware' => [
'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class,
'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class,
'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class,
],

];
8 changes: 4 additions & 4 deletions config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
*/

'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
'scheme' => 'https',
'scheme' => 'https',
],

'postmark' => [
'token' => env('POSTMARK_TOKEN'),
],

'ses' => [
'key' => env('AWS_ACCESS_KEY_ID'),
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
Expand Down
18 changes: 9 additions & 9 deletions database/factories/UserFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ public function definition(): array
$userRole = Role::whereName('User')->first();

return [
'name' => fake()->name(),
'first_name' => fake()->firstName,
'last_name' => fake()->lastName,
'email' => fake()->unique()->safeEmail(),
'email_verified_at' => now(),
'password' => bcrypt('secret'),
'token' => str_random(64),
'activated' => true,
'remember_token' => Str::random(10),
'name' => fake()->name(),
'first_name' => fake()->firstName,
'last_name' => fake()->lastName,
'email' => fake()->unique()->safeEmail(),
'email_verified_at' => now(),
'password' => bcrypt('secret'),
'token' => str_random(64),
'activated' => true,
'remember_token' => Str::random(10),
'signup_ip_address' => fake()->ipv4,
'signup_confirmation_ip_address' => fake()->ipv4,
];
Expand Down
2 changes: 1 addition & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
Route::get('/home', [
'as' => 'public.home',
'uses' => 'App\Http\Controllers\UserController@index',
'name' => 'home'
'name' => 'home',
]);

// Show users profile - viewable by other users.
Expand Down
4 changes: 2 additions & 2 deletions tests/Feature/Auth/AuthenticationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function test_users_can_authenticate_using_the_login_screen(): void
$user = User::factory()->create();

$response = $this->post('/login', [
'email' => $user->email,
'email' => $user->email,
'password' => 'password',
]);

Expand All @@ -36,7 +36,7 @@ public function test_users_can_not_authenticate_with_invalid_password(): void
$user = User::factory()->create();

$this->post('/login', [
'email' => $user->email,
'email' => $user->email,
'password' => 'wrong-password',
]);

Expand Down

0 comments on commit c3da504

Please sign in to comment.