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.
*
* @param Throwable $throwable
* @param Throwable $throwable
* @return void
*
* @throws Exception
* @throws Throwable
*/
@ -87,9 +88,10 @@ class Handler extends ExceptionHandler
/**
* Render an exception into an HTTP response.
*
* @param Request $request
* @param Throwable $throwable
* @param Request $request
* @param Throwable $throwable
* @return Response
*
* @throws Throwable
*/
public function render($request, Throwable $throwable)

View file

@ -15,8 +15,8 @@ class ArticlesController extends Controller
/**
* Show all articles (with pagination).
*
* @param int|null $year
* @param int|null $month
* @param int|null $year
* @param int|null $month
* @return View
*/
public function index(int $year = null, int $month = null): View
@ -32,9 +32,9 @@ class ArticlesController extends Controller
/**
* Show a single article.
*
* @param int $year
* @param int $month
* @param string $slug
* @param int $year
* @param int $month
* @param string $slug
* @return RedirectResponse|View
*/
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
* and redirect to it.
*
* @param string $idFromUrl
* @param string $idFromUrl
* @return RedirectResponse
*/
public function onlyIdInUrl(string $idFromUrl): RedirectResponse

View file

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

View file

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

View file

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

View file

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

View file

@ -6,7 +6,9 @@ namespace App\Http\Controllers;
use App\Http\Responses\MicropubResponses;
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 Illuminate\Http\JsonResponse;
use Lcobucci\JWT\Encoding\CannotDecodeContent;
@ -18,8 +20,11 @@ use Monolog\Logger;
class MicropubController extends Controller
{
protected TokenService $tokenService;
protected HEntryService $hentryService;
protected HCardService $hcardService;
protected UpdateService $updateService;
public function __construct(
@ -168,6 +173,7 @@ class MicropubController extends Controller
* Determine the client id from the access token sent with the request.
*
* @return string
*
* @throws RequiredConstraintsViolated
*/
private function getClientId(): string
@ -180,7 +186,7 @@ class MicropubController extends Controller
/**
* 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)
{

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -29,7 +29,7 @@ class DownloadWebMention implements ShouldQueue
/**
* Create a new job instance.
*
* @param string $source
* @param string $source
*/
public function __construct(string $source)
{
@ -39,7 +39,8 @@ class DownloadWebMention implements ShouldQueue
/**
* Execute the job.
*
* @param Client $guzzle
* @param Client $guzzle
*
* @throws GuzzleException
* @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.
*
* @param string $url
* @param string $url
* @return string The path name
*/
private function createFilenameFromURL(string $url)

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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