Skip to content

Commit

Permalink
Fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
ysbrandB authored and github-actions[bot] committed Jun 19, 2024
1 parent 7de304e commit bc61a3a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions app/Http/Controllers/GraphController.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function index(Request $request)
}

$nodes = $query->clone()
->whereIn('id',collect($items->pluck('json_items')->flatten())
->whereIn('id', collect($items->pluck('json_items')->flatten())
->merge($items->pluck('id'))
->merge($pythonItem->id)
->unique()
Expand All @@ -35,8 +35,8 @@ public function index(Request $request)
return Inertia::render('Items/Graph', [
'items' => $items->get(),
'nodes' => $nodes->get(),
'python' => fn () => $pythonItem,
'initialSelectedItems' => fn () => Item::whereIn('id', $request->session()->get('selected') ?? [])->get(),
'python' => static fn () => $pythonItem,
'initialSelectedItems' => static fn () => Item::whereIn('id', $request->session()->get('selected') ?? [])->get(),
]);
}

Expand Down
3 changes: 1 addition & 2 deletions app/Http/Controllers/ItemController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use App\Models\Question;
use Carbon\Carbon;
use Illuminate\Http\Request;

use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Storage;
use Inertia\Inertia;
Expand Down Expand Up @@ -36,7 +35,7 @@ public function index(Request $request)
'initialFilters' => $filters,
'questions' => Question::with('answers.attributes:id')->get(),
'initialSelectedItems' => Item::whereIn('id', $request->session()->get('selected') ?? [])->get(),
'explainer' => Carbon::now()->timestamp>=Session::get('explainer') ?? 0,
'explainer' => Carbon::now()->timestamp >= Session::get('explainer') ?? 0,
]);
}

Expand Down
1 change: 0 additions & 1 deletion app/Http/Middleware/HandleInertiaRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace App\Http\Middleware;

use App\Models\Item;
use Illuminate\Http\Request;
use Inertia\Middleware;

Expand Down

0 comments on commit bc61a3a

Please sign in to comment.