Fixing various phpcs issues
This commit is contained in:
parent
21c89f721c
commit
ef03d2209f
18 changed files with 148 additions and 90 deletions
|
@ -6,8 +6,10 @@ namespace App\Http\Controllers;
|
|||
|
||||
use App\Models\Note;
|
||||
use App\Services\ActivityStreamsService;
|
||||
use Illuminate\Contracts\View\Factory as ViewFactory;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\View\View;
|
||||
use Jonnybarnes\IndieWeb\Numbers;
|
||||
|
||||
|
@ -18,12 +20,12 @@ class NotesController extends Controller
|
|||
/**
|
||||
* Show all the notes. This is also the homepage.
|
||||
*
|
||||
* @return \Illuminate\View\View|\Illuminate\Http\JsonResponse
|
||||
* @return ViewFactory|View|Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
if (request()->wantsActivityStream()) {
|
||||
return (new ActivityStreamsService)->siteOwnerResponse();
|
||||
return (new ActivityStreamsService())->siteOwnerResponse();
|
||||
}
|
||||
|
||||
$notes = Note::latest()
|
||||
|
@ -38,15 +40,15 @@ class NotesController extends Controller
|
|||
/**
|
||||
* Show a single note.
|
||||
*
|
||||
* @param string $urlId The id of the note
|
||||
* @return \Illuminate\View\View|\Illuminate\Http\JsonResponse
|
||||
* @param string $urlId The id of the note
|
||||
* @return View|JsonResponse|Response
|
||||
*/
|
||||
public function show(string $urlId)
|
||||
{
|
||||
$note = Note::nb60($urlId)->with('webmentions')->firstOrFail();
|
||||
|
||||
if (request()->wantsActivityStream()) {
|
||||
return (new ActivityStreamsService)->singleNoteResponse($note);
|
||||
return (new ActivityStreamsService())->singleNoteResponse($note);
|
||||
}
|
||||
|
||||
return view('notes.show', compact('note'));
|
||||
|
@ -55,8 +57,8 @@ class NotesController extends Controller
|
|||
/**
|
||||
* Redirect /note/{decID} to /notes/{nb60id}.
|
||||
*
|
||||
* @param int $decId The decimal id of the note
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
* @param int $decId The decimal id of the note
|
||||
* @return RedirectResponse
|
||||
*/
|
||||
public function redirect(int $decId): RedirectResponse
|
||||
{
|
||||
|
@ -66,8 +68,8 @@ class NotesController extends Controller
|
|||
/**
|
||||
* Show all notes tagged with {tag}.
|
||||
*
|
||||
* @param string $tag
|
||||
* @return \Illuminate\View\View
|
||||
* @param string $tag
|
||||
* @return View
|
||||
*/
|
||||
public function tagged(string $tag): View
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue