Skip to content

Commit

Permalink
Install & Run Duster
Browse files Browse the repository at this point in the history
  • Loading branch information
techenby committed Apr 25, 2024
1 parent 5762ba0 commit add120d
Show file tree
Hide file tree
Showing 27 changed files with 135 additions and 66 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/duster-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Duster Lint

on:
push:
branches: [ main ]
pull_request:

jobs:
duster:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: "Duster Lint"
uses: tighten/duster-action@v2
with:
args: lint
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/NewPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ function ($user) use ($request) {
return $status == Password::PASSWORD_RESET
? redirect()->route('login')->with('status', __($status))
: back()->withInput($request->only('email'))
->withErrors(['email' => __($status)]);
->withErrors(['email' => __($status)]);
}
}
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/PasswordResetLinkController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ public function store(Request $request): RedirectResponse
return $status == Password::RESET_LINK_SENT
? back()->with('status', __($status))
: back()->withInput($request->only('email'))
->withErrors(['email' => __($status)]);
->withErrors(['email' => __($status)]);
}
}
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/RegisteredUserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function store(Request $request): RedirectResponse
{
$request->validate([
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'lowercase', 'email', 'max:255', 'unique:'.User::class],
'email' => ['required', 'string', 'lowercase', 'email', 'max:255', 'unique:' . User::class],
'password' => ['required', 'confirmed', Rules\Password::defaults()],
]);

Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/Auth/VerifyEmailController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ class VerifyEmailController extends Controller
public function __invoke(EmailVerificationRequest $request): RedirectResponse
{
if ($request->user()->hasVerifiedEmail()) {
return redirect()->intended(route('dashboard', absolute: false).'?verified=1');
return redirect()->intended(route('dashboard', absolute: false) . '?verified=1');
}

if ($request->user()->markEmailAsVerified()) {
event(new Verified($request->user()));
}

return redirect()->intended(route('dashboard', absolute: false).'?verified=1');
return redirect()->intended(route('dashboard', absolute: false) . '?verified=1');
}
}
4 changes: 2 additions & 2 deletions app/Http/Controllers/TrickController.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ public function edit(Trick $trick)
Gate::authorize('update', $trick);

return view('tricks.edit', [
'trick' => $trick
'trick' => $trick,
]);
}

public function update(Request $request, Trick $trick)
{
Gate::authorize('update', $trick);

$data = $request->validate([
'name' => 'required|min:4|unique:tricks,name',
'description' => 'required|min:10',
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 @@ -80,6 +80,6 @@ public function ensureIsNotRateLimited(): void
*/
public function throttleKey(): string
{
return Str::transliterate(Str::lower($this->string('email')).'|'.$this->ip());
return Str::transliterate(Str::lower($this->string('email')) . '|' . $this->ip());
}
}
2 changes: 1 addition & 1 deletion app/Models/Trick.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function user(): BelongsTo
return $this->belongsTo(User::class);
}

public function getSlugOptions() : SlugOptions
public function getSlugOptions(): SlugOptions
{
return SlugOptions::create()
->generateSlugsFrom('name')
Expand Down
1 change: 0 additions & 1 deletion app/Policies/TrickPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use App\Models\Trick;
use App\Models\User;
use Illuminate\Auth\Access\Response;

class TrickPolicy
{
Expand Down
4 changes: 2 additions & 2 deletions bootstrap/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

return Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: __DIR__.'/../routes/web.php',
commands: __DIR__.'/../routes/console.php',
web: __DIR__ . '/../routes/web.php',
commands: __DIR__ . '/../routes/console.php',
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"nunomaduro/collision": "^8.0",
"pestphp/pest": "^2.0",
"pestphp/pest-plugin-laravel": "^2.0",
"spatie/laravel-ignition": "^2.4"
"spatie/laravel-ignition": "^2.4",
"tightenco/duster": "^2.7"
},
"autoload": {
"psr-4": {
Expand Down
72 changes: 71 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@
|
*/

'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'),
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache_'),

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

'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_database_'),
],

'default' => [
Expand Down
2 changes: 1 addition & 1 deletion config/filesystems.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'url' => env('APP_URL') . '/storage',
'visibility' => 'public',
'throw' => false,
],
Expand Down
2 changes: 1 addition & 1 deletion config/logging.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
'connectionString' => 'tls://' . env('PAPERTRAIL_URL') . ':' . env('PAPERTRAIL_PORT'),
],
'processors' => [PsrLogMessageProcessor::class],
],
Expand Down
2 changes: 1 addition & 1 deletion config/session.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@

'cookie' => env(
'SESSION_COOKIE',
Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
Str::slug(env('APP_NAME', 'laravel'), '_') . '_session'
),

/*
Expand Down
6 changes: 0 additions & 6 deletions database/migrations/0001_01_01_000000_create_users_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('users', function (Blueprint $table) {
Expand Down Expand Up @@ -37,9 +34,6 @@ public function up(): void
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('users');
Expand Down
6 changes: 0 additions & 6 deletions database/migrations/0001_01_01_000001_create_cache_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('cache', function (Blueprint $table) {
Expand All @@ -24,9 +21,6 @@ public function up(): void
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('cache');
Expand Down
6 changes: 0 additions & 6 deletions database/migrations/0001_01_01_000002_create_jobs_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('jobs', function (Blueprint $table) {
Expand Down Expand Up @@ -45,9 +42,6 @@ public function up(): void
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('jobs');
Expand Down
6 changes: 3 additions & 3 deletions public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
define('LARAVEL_START', microtime(true));

// Determine if the application is in maintenance mode...
if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
if (file_exists($maintenance = __DIR__ . '/../storage/framework/maintenance.php')) {
require $maintenance;
}

// Register the Composer autoloader...
require __DIR__.'/../vendor/autoload.php';
require __DIR__ . '/../vendor/autoload.php';

// Bootstrap Laravel and handle the request...
(require_once __DIR__.'/../bootstrap/app.php')
(require_once __DIR__ . '/../bootstrap/app.php')
->handleRequest(Request::capture());
2 changes: 1 addition & 1 deletion resources/views/tricks/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<div class="py-12">
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">

</div>
</div>
</x-app-layout>
2 changes: 1 addition & 1 deletion resources/views/tricks/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<div class="py-12">
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
@foreach($tricks as $trick)
@foreach ($tricks as $trick)
<div class="bg-white dark:bg-gray-800 overflow-hidden shadow-sm sm:rounded-lg">
<div class="p-6 text-gray-900 dark:text-gray-100">
{{ $trick->name }}
Expand Down
Loading

0 comments on commit add120d

Please sign in to comment.