Fix files with Laravel Pint

This commit is contained in:
Jonny Barnes 2022-07-09 10:08:26 +01:00
commit e36f15d391
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
116 changed files with 409 additions and 378 deletions

View file

@ -43,8 +43,9 @@ class Handler extends ExceptionHandler
* *
* This is a great spot to send exceptions to Sentry, Bugsnag, etc. * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
* *
* @param Throwable $throwable * @param Throwable $throwable
* @return void * @return void
*
* @throws Exception * @throws Exception
* @throws Throwable * @throws Throwable
*/ */
@ -87,9 +88,10 @@ class Handler extends ExceptionHandler
/** /**
* Render an exception into an HTTP response. * Render an exception into an HTTP response.
* *
* @param Request $request * @param Request $request
* @param Throwable $throwable * @param Throwable $throwable
* @return Response * @return Response
*
* @throws Throwable * @throws Throwable
*/ */
public function render($request, Throwable $throwable) public function render($request, Throwable $throwable)

View file

@ -15,8 +15,8 @@ class ArticlesController extends Controller
/** /**
* Show all articles (with pagination). * Show all articles (with pagination).
* *
* @param int|null $year * @param int|null $year
* @param int|null $month * @param int|null $month
* @return View * @return View
*/ */
public function index(int $year = null, int $month = null): View public function index(int $year = null, int $month = null): View
@ -32,9 +32,9 @@ class ArticlesController extends Controller
/** /**
* Show a single article. * Show a single article.
* *
* @param int $year * @param int $year
* @param int $month * @param int $month
* @param string $slug * @param string $slug
* @return RedirectResponse|View * @return RedirectResponse|View
*/ */
public function show(int $year, int $month, string $slug) public function show(int $year, int $month, string $slug)
@ -59,7 +59,7 @@ class ArticlesController extends Controller
* We only have the ID, work out post title, year and month * We only have the ID, work out post title, year and month
* and redirect to it. * and redirect to it.
* *
* @param string $idFromUrl * @param string $idFromUrl
* @return RedirectResponse * @return RedirectResponse
*/ */
public function onlyIdInUrl(string $idFromUrl): RedirectResponse public function onlyIdInUrl(string $idFromUrl): RedirectResponse

View file

@ -24,7 +24,7 @@ class BookmarksController extends Controller
/** /**
* Show a single bookmark. * Show a single bookmark.
* *
* @param Bookmark $bookmark * @param Bookmark $bookmark
* @return View * @return View
*/ */
public function show(Bookmark $bookmark): View public function show(Bookmark $bookmark): View

View file

@ -34,7 +34,7 @@ class ContactsController extends Controller
/** /**
* Show a single contact. * Show a single contact.
* *
* @param Contact $contact * @param Contact $contact
* @return View * @return View
*/ */
public function show(Contact $contact): View public function show(Contact $contact): View

View file

@ -4,7 +4,8 @@ declare(strict_types=1);
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Models\{Article, Note}; use App\Models\Article;
use App\Models\Note;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Illuminate\Http\Response; use Illuminate\Http\Response;

View file

@ -24,7 +24,7 @@ class LikesController extends Controller
/** /**
* Show a single like. * Show a single like.
* *
* @param Like $like * @param Like $like
* @return View * @return View
*/ */
public function show(Like $like): View public function show(Like $like): View

View file

@ -6,7 +6,9 @@ namespace App\Http\Controllers;
use App\Http\Responses\MicropubResponses; use App\Http\Responses\MicropubResponses;
use App\Models\Place; use App\Models\Place;
use App\Services\Micropub\{HCardService, HEntryService, UpdateService}; use App\Services\Micropub\HCardService;
use App\Services\Micropub\HEntryService;
use App\Services\Micropub\UpdateService;
use App\Services\TokenService; use App\Services\TokenService;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Lcobucci\JWT\Encoding\CannotDecodeContent; use Lcobucci\JWT\Encoding\CannotDecodeContent;
@ -18,8 +20,11 @@ use Monolog\Logger;
class MicropubController extends Controller class MicropubController extends Controller
{ {
protected TokenService $tokenService; protected TokenService $tokenService;
protected HEntryService $hentryService; protected HEntryService $hentryService;
protected HCardService $hcardService; protected HCardService $hcardService;
protected UpdateService $updateService; protected UpdateService $updateService;
public function __construct( public function __construct(
@ -168,6 +173,7 @@ class MicropubController extends Controller
* Determine the client id from the access token sent with the request. * Determine the client id from the access token sent with the request.
* *
* @return string * @return string
*
* @throws RequiredConstraintsViolated * @throws RequiredConstraintsViolated
*/ */
private function getClientId(): string private function getClientId(): string
@ -180,7 +186,7 @@ class MicropubController extends Controller
/** /**
* Save the details of the micropub request to a log file. * Save the details of the micropub request to a log file.
* *
* @param array $request This is the info from request()->all() * @param array $request This is the info from request()->all()
*/ */
private function logMicropubRequest(array $request) private function logMicropubRequest(array $request)
{ {

View file

@ -97,6 +97,7 @@ class MicropubMediaController extends Controller
* Process a media item posted to the media endpoint. * Process a media item posted to the media endpoint.
* *
* @return JsonResponse * @return JsonResponse
*
* @throws BindingResolutionException * @throws BindingResolutionException
* @throws Exception * @throws Exception
*/ */
@ -184,7 +185,7 @@ class MicropubMediaController extends Controller
/** /**
* Get the file type from the mime-type of the uploaded file. * Get the file type from the mime-type of the uploaded file.
* *
* @param string $mimeType * @param string $mimeType
* @return string * @return string
*/ */
private function getFileTypeFromMimeType(string $mimeType): string private function getFileTypeFromMimeType(string $mimeType): string
@ -229,8 +230,9 @@ class MicropubMediaController extends Controller
/** /**
* Save an uploaded file to the local disk. * Save an uploaded file to the local disk.
* *
* @param UploadedFile $file * @param UploadedFile $file
* @return string * @return string
*
* @throws Exception * @throws Exception
*/ */
private function saveFile(UploadedFile $file): string private function saveFile(UploadedFile $file): string

View file

@ -40,7 +40,7 @@ class NotesController extends Controller
/** /**
* Show a single note. * Show a single note.
* *
* @param string $urlId The id of the note * @param string $urlId The id of the note
* @return View|JsonResponse|Response * @return View|JsonResponse|Response
*/ */
public function show(string $urlId) public function show(string $urlId)
@ -61,7 +61,7 @@ class NotesController extends Controller
/** /**
* Redirect /note/{decID} to /notes/{nb60id}. * Redirect /note/{decID} to /notes/{nb60id}.
* *
* @param int $decId The decimal id of the note * @param int $decId The decimal id of the note
* @return RedirectResponse * @return RedirectResponse
*/ */
public function redirect(int $decId): RedirectResponse public function redirect(int $decId): RedirectResponse
@ -72,7 +72,7 @@ class NotesController extends Controller
/** /**
* Show all notes tagged with {tag}. * Show all notes tagged with {tag}.
* *
* @param string $tag * @param string $tag
* @return View * @return View
*/ */
public function tagged(string $tag): View public function tagged(string $tag): View

View file

@ -24,7 +24,7 @@ class PlacesController extends Controller
/** /**
* Show a specific place. * Show a specific place.
* *
* @param Place $place * @param Place $place
* @return View * @return View
*/ */
public function show(Place $place): View public function show(Place $place): View

View file

@ -23,8 +23,8 @@ class TokenEndpointController extends Controller
/** /**
* Inject the dependencies. * Inject the dependencies.
* *
* @param Client $client * @param Client $client
* @param TokenService $tokenService * @param TokenService $tokenService
*/ */
public function __construct( public function __construct(
Client $client, Client $client,

View file

@ -10,8 +10,8 @@ class CSPHeader
/** /**
* Handle an incoming request. * Handle an incoming request.
* *
* @param Request $request * @param Request $request
* @param Closure $next * @param Closure $next
* @return mixed * @return mixed
*/ */
public function handle($request, Closure $next) public function handle($request, Closure $next)

View file

@ -23,7 +23,7 @@ class AddClientToDatabase implements ShouldQueue
/** /**
* Create a new job instance. * Create a new job instance.
* *
* @param string $client_id * @param string $client_id
*/ */
public function __construct(string $client_id) public function __construct(string $client_id)
{ {

View file

@ -29,7 +29,7 @@ class DownloadWebMention implements ShouldQueue
/** /**
* Create a new job instance. * Create a new job instance.
* *
* @param string $source * @param string $source
*/ */
public function __construct(string $source) public function __construct(string $source)
{ {
@ -39,7 +39,8 @@ class DownloadWebMention implements ShouldQueue
/** /**
* Execute the job. * Execute the job.
* *
* @param Client $guzzle * @param Client $guzzle
*
* @throws GuzzleException * @throws GuzzleException
* @throws FileNotFoundException * @throws FileNotFoundException
*/ */
@ -81,7 +82,7 @@ class DownloadWebMention implements ShouldQueue
/** /**
* Create a file path from a URL. This is used when caching the HTML response. * Create a file path from a URL. This is used when caching the HTML response.
* *
* @param string $url * @param string $url
* @return string The path name * @return string The path name
*/ */
private function createFilenameFromURL(string $url) private function createFilenameFromURL(string $url)

View file

@ -26,7 +26,7 @@ class ProcessBookmark implements ShouldQueue
/** /**
* Create a new job instance. * Create a new job instance.
* *
* @param Bookmark $bookmark * @param Bookmark $bookmark
*/ */
public function __construct(Bookmark $bookmark) public function __construct(Bookmark $bookmark)
{ {

View file

@ -31,7 +31,7 @@ class ProcessLike implements ShouldQueue
/** /**
* Create a new job instance. * Create a new job instance.
* *
* @param Like $like * @param Like $like
*/ */
public function __construct(Like $like) public function __construct(Like $like)
{ {
@ -41,9 +41,10 @@ class ProcessLike implements ShouldQueue
/** /**
* Execute the job. * Execute the job.
* *
* @param Client $client * @param Client $client
* @param Authorship $authorship * @param Authorship $authorship
* @return int * @return int
*
* @throws GuzzleException * @throws GuzzleException
*/ */
public function handle(Client $client, Authorship $authorship): int public function handle(Client $client, Authorship $authorship): int

View file

@ -26,7 +26,7 @@ class ProcessMedia implements ShouldQueue
/** /**
* Create a new job instance. * Create a new job instance.
* *
* @param string $filename * @param string $filename
*/ */
public function __construct(string $filename) public function __construct(string $filename)
{ {
@ -36,7 +36,7 @@ class ProcessMedia implements ShouldQueue
/** /**
* Execute the job. * Execute the job.
* *
* @param ImageManager $manager * @param ImageManager $manager
*/ */
public function handle(ImageManager $manager) public function handle(ImageManager $manager)
{ {

View file

@ -5,13 +5,15 @@ declare(strict_types=1);
namespace App\Jobs; namespace App\Jobs;
use App\Exceptions\RemoteContentNotFoundException; use App\Exceptions\RemoteContentNotFoundException;
use App\Models\{Note, WebMention}; use App\Models\Note;
use App\Models\WebMention;
use GuzzleHttp\Client; use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException; use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Exception\RequestException;
use Illuminate\Bus\Queueable; use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\{InteractsWithQueue, SerializesModels}; use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Jonnybarnes\WebmentionsParser\Exceptions\InvalidMentionException; use Jonnybarnes\WebmentionsParser\Exceptions\InvalidMentionException;
use Jonnybarnes\WebmentionsParser\Parser; use Jonnybarnes\WebmentionsParser\Parser;
use Mf2; use Mf2;
@ -31,8 +33,8 @@ class ProcessWebMention implements ShouldQueue
/** /**
* Create a new job instance. * Create a new job instance.
* *
* @param Note $note * @param Note $note
* @param string $source * @param string $source
*/ */
public function __construct(Note $note, string $source) public function __construct(Note $note, string $source)
{ {
@ -43,8 +45,9 @@ class ProcessWebMention implements ShouldQueue
/** /**
* Execute the job. * Execute the job.
* *
* @param Parser $parser * @param Parser $parser
* @param Client $guzzle * @param Client $guzzle
*
* @throws RemoteContentNotFoundException * @throws RemoteContentNotFoundException
* @throws GuzzleException * @throws GuzzleException
* @throws InvalidMentionException * @throws InvalidMentionException

View file

@ -25,7 +25,7 @@ class SaveProfileImage implements ShouldQueue
/** /**
* Create a new job instance. * Create a new job instance.
* *
* @param array $microformats * @param array $microformats
*/ */
public function __construct(array $microformats) public function __construct(array $microformats)
{ {
@ -35,7 +35,7 @@ class SaveProfileImage implements ShouldQueue
/** /**
* Execute the job. * Execute the job.
* *
* @param Authorship $authorship * @param Authorship $authorship
*/ */
public function handle(Authorship $authorship) public function handle(Authorship $authorship)
{ {

View file

@ -28,7 +28,7 @@ class SendWebMentions implements ShouldQueue
/** /**
* Create the job instance, inject dependencies. * Create the job instance, inject dependencies.
* *
* @param Note $note * @param Note $note
*/ */
public function __construct(Note $note) public function __construct(Note $note)
{ {
@ -65,7 +65,7 @@ class SendWebMentions implements ShouldQueue
/** /**
* Discover if a URL has a webmention endpoint. * Discover if a URL has a webmention endpoint.
* *
* @param string $url * @param string $url
* @return string|null * @return string|null
*/ */
public function discoverWebmentionEndpoint(string $url): ?string public function discoverWebmentionEndpoint(string $url): ?string
@ -108,7 +108,7 @@ class SendWebMentions implements ShouldQueue
/** /**
* Get the URLs from a note. * Get the URLs from a note.
* *
* @param string|null $html * @param string|null $html
* @return array * @return array
*/ */
public function getLinks(?string $html): array public function getLinks(?string $html): array
@ -133,8 +133,8 @@ class SendWebMentions implements ShouldQueue
* *
* @todo Update deprecated resolve method * @todo Update deprecated resolve method
* *
* @param string $url * @param string $url
* @param string $base The base of the URL * @param string $base The base of the URL
* @return string * @return string
*/ */
public function resolveUri(string $url, string $base): string public function resolveUri(string $url, string $base): string

Some files were not shown because too many files have changed in this diff Show more