mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-13 11:37:46 +02:00
style(ecs): add easy-coding-standard to enforce coding style rules for php
- update .devcontainer settings: remove auto-formatting for php + set intelephense as default formatter - remove prettier php plugin as it lacks php 8 support - add captain hook action for checking style pre-commit - fix style with ecs on all files except views
This commit is contained in:
parent
fb3593f828
commit
aa1612342e
230 changed files with 3420 additions and 5884 deletions
|
|
@ -13,7 +13,7 @@ use CodeIgniter\HTTP\RedirectResponse;
|
|||
|
||||
class HomeController extends BaseController
|
||||
{
|
||||
public function index(): RedirectResponse|string
|
||||
public function index(): RedirectResponse | string
|
||||
{
|
||||
$model = new PodcastModel();
|
||||
|
||||
|
|
@ -21,13 +21,13 @@ class HomeController extends BaseController
|
|||
|
||||
// check if there's only one podcast to redirect user to it
|
||||
if (count($allPodcasts) === 1) {
|
||||
return redirect()->route('podcast-activity', [
|
||||
$allPodcasts[0]->name,
|
||||
]);
|
||||
return redirect()->route('podcast-activity', [$allPodcasts[0]->name]);
|
||||
}
|
||||
|
||||
// default behavior: list all podcasts on home page
|
||||
$data = ['podcasts' => $allPodcasts];
|
||||
$data = [
|
||||
'podcasts' => $allPodcasts,
|
||||
];
|
||||
return view('home', $data);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue