diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php
index 2f7e5fbc..eed4b776 100644
--- a/app/Exceptions/Handler.php
+++ b/app/Exceptions/Handler.php
@@ -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)
diff --git a/app/Http/Controllers/ArticlesController.php b/app/Http/Controllers/ArticlesController.php
index d70209d7..811ddc38 100644
--- a/app/Http/Controllers/ArticlesController.php
+++ b/app/Http/Controllers/ArticlesController.php
@@ -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
diff --git a/app/Http/Controllers/BookmarksController.php b/app/Http/Controllers/BookmarksController.php
index 9b73e989..3779a476 100644
--- a/app/Http/Controllers/BookmarksController.php
+++ b/app/Http/Controllers/BookmarksController.php
@@ -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
diff --git a/app/Http/Controllers/ContactsController.php b/app/Http/Controllers/ContactsController.php
index d3869114..3a46026e 100644
--- a/app/Http/Controllers/ContactsController.php
+++ b/app/Http/Controllers/ContactsController.php
@@ -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
diff --git a/app/Http/Controllers/FeedsController.php b/app/Http/Controllers/FeedsController.php
index b544d242..a1468cbb 100644
--- a/app/Http/Controllers/FeedsController.php
+++ b/app/Http/Controllers/FeedsController.php
@@ -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;
diff --git a/app/Http/Controllers/LikesController.php b/app/Http/Controllers/LikesController.php
index 3bf5a1dd..48c5ffd7 100644
--- a/app/Http/Controllers/LikesController.php
+++ b/app/Http/Controllers/LikesController.php
@@ -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
diff --git a/app/Http/Controllers/MicropubController.php b/app/Http/Controllers/MicropubController.php
index 03cdbd43..ea7d1413 100644
--- a/app/Http/Controllers/MicropubController.php
+++ b/app/Http/Controllers/MicropubController.php
@@ -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)
{
diff --git a/app/Http/Controllers/MicropubMediaController.php b/app/Http/Controllers/MicropubMediaController.php
index abad88e4..52cc252d 100644
--- a/app/Http/Controllers/MicropubMediaController.php
+++ b/app/Http/Controllers/MicropubMediaController.php
@@ -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
diff --git a/app/Http/Controllers/NotesController.php b/app/Http/Controllers/NotesController.php
index 4b60c256..7949eafa 100644
--- a/app/Http/Controllers/NotesController.php
+++ b/app/Http/Controllers/NotesController.php
@@ -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
diff --git a/app/Http/Controllers/PlacesController.php b/app/Http/Controllers/PlacesController.php
index 7f6ea928..fb66574f 100644
--- a/app/Http/Controllers/PlacesController.php
+++ b/app/Http/Controllers/PlacesController.php
@@ -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
diff --git a/app/Http/Controllers/TokenEndpointController.php b/app/Http/Controllers/TokenEndpointController.php
index a6a17311..af18a8f1 100644
--- a/app/Http/Controllers/TokenEndpointController.php
+++ b/app/Http/Controllers/TokenEndpointController.php
@@ -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,
diff --git a/app/Http/Middleware/CSPHeader.php b/app/Http/Middleware/CSPHeader.php
index 3e3f7f32..1d45ebc4 100644
--- a/app/Http/Middleware/CSPHeader.php
+++ b/app/Http/Middleware/CSPHeader.php
@@ -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)
diff --git a/app/Jobs/AddClientToDatabase.php b/app/Jobs/AddClientToDatabase.php
index 1263b0fa..a3611d00 100644
--- a/app/Jobs/AddClientToDatabase.php
+++ b/app/Jobs/AddClientToDatabase.php
@@ -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)
{
diff --git a/app/Jobs/DownloadWebMention.php b/app/Jobs/DownloadWebMention.php
index 087dab50..bb47f654 100644
--- a/app/Jobs/DownloadWebMention.php
+++ b/app/Jobs/DownloadWebMention.php
@@ -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)
diff --git a/app/Jobs/ProcessBookmark.php b/app/Jobs/ProcessBookmark.php
index d38edcd6..ce7d7637 100644
--- a/app/Jobs/ProcessBookmark.php
+++ b/app/Jobs/ProcessBookmark.php
@@ -26,7 +26,7 @@ class ProcessBookmark implements ShouldQueue
/**
* Create a new job instance.
*
- * @param Bookmark $bookmark
+ * @param Bookmark $bookmark
*/
public function __construct(Bookmark $bookmark)
{
diff --git a/app/Jobs/ProcessLike.php b/app/Jobs/ProcessLike.php
index 1975fef7..6a5281c0 100644
--- a/app/Jobs/ProcessLike.php
+++ b/app/Jobs/ProcessLike.php
@@ -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
diff --git a/app/Jobs/ProcessMedia.php b/app/Jobs/ProcessMedia.php
index 4fadb397..5872e33e 100644
--- a/app/Jobs/ProcessMedia.php
+++ b/app/Jobs/ProcessMedia.php
@@ -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)
{
diff --git a/app/Jobs/ProcessWebMention.php b/app/Jobs/ProcessWebMention.php
index cd27563b..82636ec6 100644
--- a/app/Jobs/ProcessWebMention.php
+++ b/app/Jobs/ProcessWebMention.php
@@ -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
diff --git a/app/Jobs/SaveProfileImage.php b/app/Jobs/SaveProfileImage.php
index ebdf0ca9..38dbfc4c 100644
--- a/app/Jobs/SaveProfileImage.php
+++ b/app/Jobs/SaveProfileImage.php
@@ -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)
{
diff --git a/app/Jobs/SendWebMentions.php b/app/Jobs/SendWebMentions.php
index 73aff831..815eb2be 100644
--- a/app/Jobs/SendWebMentions.php
+++ b/app/Jobs/SendWebMentions.php
@@ -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
diff --git a/app/Jobs/SyndicateBookmarkToTwitter.php b/app/Jobs/SyndicateBookmarkToTwitter.php
index 6eb40ab7..1e76a90d 100644
--- a/app/Jobs/SyndicateBookmarkToTwitter.php
+++ b/app/Jobs/SyndicateBookmarkToTwitter.php
@@ -26,7 +26,7 @@ class SyndicateBookmarkToTwitter implements ShouldQueue
/**
* Create a new job instance.
*
- * @param Bookmark $bookmark
+ * @param Bookmark $bookmark
*/
public function __construct(Bookmark $bookmark)
{
@@ -36,7 +36,8 @@ class SyndicateBookmarkToTwitter implements ShouldQueue
/**
* Execute the job.
*
- * @param Client $guzzle
+ * @param Client $guzzle
+ *
* @throws GuzzleException
*/
public function handle(Client $guzzle)
diff --git a/app/Jobs/SyndicateNoteToTwitter.php b/app/Jobs/SyndicateNoteToTwitter.php
index 4ac64a07..4b8d9c1e 100644
--- a/app/Jobs/SyndicateNoteToTwitter.php
+++ b/app/Jobs/SyndicateNoteToTwitter.php
@@ -24,7 +24,7 @@ class SyndicateNoteToTwitter implements ShouldQueue
/**
* Create a new job instance.
*
- * @param Note $note
+ * @param Note $note
*/
public function __construct(Note $note)
{
@@ -34,7 +34,8 @@ class SyndicateNoteToTwitter implements ShouldQueue
/**
* Execute the job.
*
- * @param Client $guzzle
+ * @param Client $guzzle
+ *
* @throws GuzzleException
*/
public function handle(Client $guzzle)
diff --git a/app/Models/Article.php b/app/Models/Article.php
index 7733f288..0aac8d7f 100644
--- a/app/Models/Article.php
+++ b/app/Models/Article.php
@@ -9,7 +9,6 @@ use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
-use League\CommonMark\CommonMarkConverter;
use League\CommonMark\Environment\Environment;
use League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension;
use League\CommonMark\Extension\CommonMark\Node\Block\FencedCode;
@@ -128,9 +127,9 @@ class Article extends Model
/**
* Scope a query to only include articles from a particular year/month.
*
- * @param Builder $query
- * @param int|null $year
- * @param int|null $month
+ * @param Builder $query
+ * @param int|null $year
+ * @param int|null $month
* @return Builder
*/
public function scopeDate(Builder $query, int $year = null, int $month = null): Builder
diff --git a/app/Models/Bookmark.php b/app/Models/Bookmark.php
index 54dbd3c9..b5a88e58 100644
--- a/app/Models/Bookmark.php
+++ b/app/Models/Bookmark.php
@@ -26,6 +26,7 @@ use Illuminate\Support\Carbon;
* @property-read string $longurl
* @property-read Collection|Tag[] $tags
* @property-read int|null $tags_count
+ *
* @method static Builder|Bookmark newModelQuery()
* @method static Builder|Bookmark newQuery()
* @method static Builder|Bookmark query()
diff --git a/app/Models/Contact.php b/app/Models/Contact.php
index 54d9b400..1da4d7ba 100644
--- a/app/Models/Contact.php
+++ b/app/Models/Contact.php
@@ -30,7 +30,7 @@ class Contact extends Model
{
$photo = '/assets/profile-images/default-image';
- if (array_key_exists('homepage', $this->attributes) && !empty($this->attributes['homepage'])) {
+ if (array_key_exists('homepage', $this->attributes) && ! empty($this->attributes['homepage'])) {
$host = parse_url($this->attributes['homepage'], PHP_URL_HOST);
if (file_exists(public_path() . '/assets/profile-images/' . $host . '/image')) {
$photo = '/assets/profile-images/' . $host . '/image';
diff --git a/app/Models/Like.php b/app/Models/Like.php
index 703962e4..c7a17448 100644
--- a/app/Models/Like.php
+++ b/app/Models/Like.php
@@ -5,11 +5,9 @@ declare(strict_types=1);
namespace App\Models;
use App\Traits\FilterHtml;
-use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Arr;
-use Illuminate\Support\Carbon;
use Mf2;
class Like extends Model
@@ -32,7 +30,7 @@ class Like extends Model
/**
* Normalize the URL of the author of the like.
*
- * @param string|null $value The author’s url
+ * @param string|null $value The author’s url
*/
public function setAuthorUrlAttribute(?string $value)
{
@@ -42,7 +40,7 @@ class Like extends Model
/**
* If the content contains HTML, filter it.
*
- * @param string|null $value The content of the like
+ * @param string|null $value The content of the like
* @return string|null
*/
public function getContentAttribute(?string $value): ?string
diff --git a/app/Models/Media.php b/app/Models/Media.php
index cd82071d..4b666d9e 100644
--- a/app/Models/Media.php
+++ b/app/Models/Media.php
@@ -4,11 +4,9 @@ declare(strict_types=1);
namespace App\Models;
-use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
-use Illuminate\Support\Carbon;
use Illuminate\Support\Str;
class Media extends Model
@@ -82,7 +80,7 @@ class Media extends Model
/**
* Give the real part of a filename, i.e. strip the file extension.
*
- * @param string $path
+ * @param string $path
* @return string
*/
public function getBasename(string $path): string
@@ -100,7 +98,7 @@ class Media extends Model
/**
* Get the extension from a given filename.
*
- * @param string $path
+ * @param string $path
* @return string
*/
public function getExtension(string $path): string
diff --git a/app/Models/MicropubClient.php b/app/Models/MicropubClient.php
index 903483cd..5a530c19 100644
--- a/app/Models/MicropubClient.php
+++ b/app/Models/MicropubClient.php
@@ -4,12 +4,9 @@ declare(strict_types=1);
namespace App\Models;
-use Illuminate\Database\Eloquent\Builder;
-use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
-use Illuminate\Support\Carbon;
class MicropubClient extends Model
{
diff --git a/app/Models/Note.php b/app/Models/Note.php
index a664dbfc..b37f914c 100644
--- a/app/Models/Note.php
+++ b/app/Models/Note.php
@@ -10,8 +10,14 @@ use App\Exceptions\TwitterContentException;
use Codebird\Codebird;
use Exception;
use GuzzleHttp\Client;
-use Illuminate\Database\Eloquent\{Builder, Factories\HasFactory, Model, SoftDeletes};
-use Illuminate\Database\Eloquent\Relations\{BelongsTo, BelongsToMany, HasMany, MorphMany};
+use Illuminate\Database\Eloquent\Builder;
+use Illuminate\Database\Eloquent\Factories\HasFactory;
+use Illuminate\Database\Eloquent\Model;
+use Illuminate\Database\Eloquent\Relations\BelongsTo;
+use Illuminate\Database\Eloquent\Relations\BelongsToMany;
+use Illuminate\Database\Eloquent\Relations\HasMany;
+use Illuminate\Database\Eloquent\Relations\MorphMany;
+use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\Cache;
use JetBrains\PhpStorm\ArrayShape;
use Jonnybarnes\IndieWeb\Numbers;
@@ -24,7 +30,8 @@ use League\CommonMark\Extension\Mention\Mention;
use League\CommonMark\Extension\Mention\MentionExtension;
use League\CommonMark\MarkdownConverter;
use Normalizer;
-use Spatie\CommonMarkHighlighter\{FencedCodeRenderer, IndentedCodeRenderer};
+use Spatie\CommonMarkHighlighter\FencedCodeRenderer;
+use Spatie\CommonMarkHighlighter\IndentedCodeRenderer;
class Note extends Model
{
@@ -46,7 +53,7 @@ class Note extends Model
/**
* Set our contacts variable to null.
*
- * @param array $attributes
+ * @param array $attributes
*/
public function __construct(array $attributes = [])
{
@@ -134,7 +141,7 @@ class Note extends Model
*
* @return array
*/
- #[ArrayShape(['note' => "null|string"])]
+ #[ArrayShape(['note' => 'null|string'])]
public function toSearchableArray(): array
{
return [
@@ -145,7 +152,7 @@ class Note extends Model
/**
* Normalize the note to Unicode FORM C.
*
- * @param string|null $value
+ * @param string|null $value
*/
public function setNoteAttribute(?string $value): void
{
@@ -161,7 +168,7 @@ class Note extends Model
/**
* Pre-process notes for web-view.
*
- * @param string|null $value
+ * @param string|null $value
* @return string|null
*/
public function getNoteAttribute(?string $value): ?string
@@ -339,7 +346,7 @@ class Note extends Model
{
if (
$this->in_reply_to === null ||
- !$this->isTwitterLink($this->in_reply_to)
+ ! $this->isTwitterLink($this->in_reply_to)
) {
return null;
}
@@ -375,6 +382,7 @@ class Note extends Model
* That is we swap the contacts names for their known Twitter handles.
*
* @return string
+ *
* @throws TwitterContentException
*/
public function getTwitterContentAttribute(): string
@@ -419,8 +427,8 @@ class Note extends Model
/**
* Scope a query to select a note via a NewBase60 id.
*
- * @param Builder $query
- * @param string $nb60id
+ * @param Builder $query
+ * @param string $nb60id
* @return Builder
*/
public function scopeNb60(Builder $query, string $nb60id): Builder
@@ -436,7 +444,7 @@ class Note extends Model
* due to lack of contact info, we assume @username is a twitter handle and link it
* as such.
*
- * @param string $text
+ * @param string $text
* @return string
*/
private function makeHCards(string $text): string
@@ -507,7 +515,7 @@ class Note extends Model
* `#[\-_a-zA-Z0-9]+` and wraps them in an `a` element with
* `rel=tag` set and a `href` of 'section/tagged/' + tagname without the #.
*
- * @param string $note
+ * @param string $note
* @return string
*/
public function autoLinkHashtag(string $note): string
@@ -526,7 +534,7 @@ class Note extends Model
/**
* Pass a note through the commonmark library.
*
- * @param string $note
+ * @param string $note
* @return string
*/
private function convertMarkdown(string $note): string
@@ -534,8 +542,8 @@ class Note extends Model
$config = [
'mentions' => [
'contacts_handle' => [
- 'prefix' => '@',
- 'pattern' => '[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}(?!\w)',
+ 'prefix' => '@',
+ 'pattern' => '[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}(?!\w)',
'generator' => new ContactMentionGenerator(),
],
],
@@ -556,8 +564,8 @@ class Note extends Model
/**
* Do a reverse geocode lookup of a `lat,lng` value.
*
- * @param float $latitude
- * @param float $longitude
+ * @param float $latitude
+ * @param float $longitude
* @return string
*/
public function reverseGeoCode(float $latitude, float $longitude): string
diff --git a/app/Models/Place.php b/app/Models/Place.php
index 1be46d3a..593d3167 100644
--- a/app/Models/Place.php
+++ b/app/Models/Place.php
@@ -5,9 +5,10 @@ declare(strict_types=1);
namespace App\Models;
use Cviebrock\EloquentSluggable\Sluggable;
+use Illuminate\Database\Eloquent\Builder;
+use Illuminate\Database\Eloquent\Factories\HasFactory;
+use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
-use Illuminate\Database\Eloquent\{Builder, Collection, Factories\HasFactory, Model};
-use Illuminate\Support\Carbon;
use Illuminate\Support\Str;
class Place extends Model
@@ -70,9 +71,9 @@ class Place extends Model
/**
* Select places near a given location.
*
- * @param Builder $query
- * @param object $location
- * @param int $distance
+ * @param Builder $query
+ * @param object $location
+ * @param int $distance
* @return Builder
*/
public function scopeNear(Builder $query, object $location, int $distance = 1000): Builder
@@ -93,8 +94,8 @@ class Place extends Model
/**
* Select places based on a URL.
*
- * @param Builder $query
- * @param string $url
+ * @param Builder $query
+ * @param string $url
* @return Builder
*/
public function scopeWhereExternalURL(Builder $query, string $url): Builder
diff --git a/app/Models/Tag.php b/app/Models/Tag.php
index 346243b3..a5a48536 100644
--- a/app/Models/Tag.php
+++ b/app/Models/Tag.php
@@ -4,12 +4,9 @@ declare(strict_types=1);
namespace App\Models;
-use Illuminate\Database\Eloquent\Builder;
-use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
-use Illuminate\Support\Carbon;
use Illuminate\Support\Str;
class Tag extends Model
@@ -46,7 +43,7 @@ class Tag extends Model
/**
* When creating a Tag model instance, invoke the nomralize method on the tag.
*
- * @param string $value
+ * @param string $value
*/
public function setTagAttribute(string $value)
{
@@ -57,7 +54,7 @@ class Tag extends Model
* This method actually normalizes a tag. That means lowercase-ing and
* removing fancy diatric characters.
*
- * @param string $tag
+ * @param string $tag
* @return string
*/
public static function normalize(string $tag): string
diff --git a/app/Models/User.php b/app/Models/User.php
index 14dd8101..c4d76e1e 100644
--- a/app/Models/User.php
+++ b/app/Models/User.php
@@ -4,13 +4,9 @@ declare(strict_types=1);
namespace App\Models;
-use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
-use Illuminate\Notifications\DatabaseNotification;
-use Illuminate\Notifications\DatabaseNotificationCollection;
use Illuminate\Notifications\Notifiable;
-use Illuminate\Support\Carbon;
class User extends Authenticatable
{
diff --git a/app/Models/WebMention.php b/app/Models/WebMention.php
index 34786ce4..06d21b59 100644
--- a/app/Models/WebMention.php
+++ b/app/Models/WebMention.php
@@ -6,12 +6,10 @@ namespace App\Models;
use App\Traits\FilterHtml;
use Codebird\Codebird;
-use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\MorphTo;
use Illuminate\Filesystem\Filesystem;
-use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Cache;
use Jonnybarnes\WebmentionsParser\Authorship;
use Jonnybarnes\WebmentionsParser\Exceptions\AuthorshipParserException;
@@ -49,6 +47,7 @@ class WebMention extends Model
* Get the author of the webmention.
*
* @return array
+ *
* @throws AuthorshipParserException
*/
public function getAuthorAttribute(): array
@@ -115,7 +114,7 @@ class WebMention extends Model
/**
* Create the photo link.
*
- * @param string $url
+ * @param string $url
* @return string
*/
public function createPhotoLink(string $url): string
diff --git a/app/Observers/NoteObserver.php b/app/Observers/NoteObserver.php
index 6b711394..3aa06f28 100644
--- a/app/Observers/NoteObserver.php
+++ b/app/Observers/NoteObserver.php
@@ -4,15 +4,17 @@ declare(strict_types=1);
namespace App\Observers;
-use App\Models\{Note, Tag};
-use Illuminate\Support\{Arr, Collection};
+use App\Models\Note;
+use App\Models\Tag;
+use Illuminate\Support\Arr;
+use Illuminate\Support\Collection;
class NoteObserver
{
/**
* Listen to the Note created event.
*
- * @param Note $note
+ * @param Note $note
*/
public function created(Note $note)
{
@@ -36,7 +38,7 @@ class NoteObserver
/**
* Listen to the Note updated event.
*
- * @param Note $note
+ * @param Note $note
*/
public function updated(Note $note)
{
@@ -62,7 +64,7 @@ class NoteObserver
/**
* Listen to the Note deleting event.
*
- * @param Note $note
+ * @param Note $note
*/
public function deleting(Note $note)
{
@@ -72,7 +74,7 @@ class NoteObserver
/**
* Retrieve the tags from a note’s text, tag for form #tag.
*
- * @param string $note
+ * @param string $note
* @return Collection
*/
private function getTagsFromNote(string $note): Collection
diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php
index cfcba9ef..79eda263 100644
--- a/app/Providers/AppServiceProvider.php
+++ b/app/Providers/AppServiceProvider.php
@@ -62,10 +62,10 @@ class AppServiceProvider extends ServiceProvider
/**
* Paginate a standard Laravel Collection.
*
- * @param int $perPage
- * @param int $total
- * @param int $page
- * @param string $pageName
+ * @param int $perPage
+ * @param int $total
+ * @param int $page
+ * @param string $pageName
* @return array
*/
Collection::macro('paginate', function ($perPage, $total = null, $page = null, $pageName = 'page') {
diff --git a/app/Services/BookmarkService.php b/app/Services/BookmarkService.php
index ccbeaf43..2bf71d5f 100644
--- a/app/Services/BookmarkService.php
+++ b/app/Services/BookmarkService.php
@@ -7,10 +7,12 @@ namespace App\Services;
use App\Exceptions\InternetArchiveException;
use App\Jobs\ProcessBookmark;
use App\Jobs\SyndicateBookmarkToTwitter;
-use App\Models\{Bookmark, Tag};
+use App\Models\Bookmark;
+use App\Models\Tag;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ClientException;
-use Illuminate\Support\{Arr, Str};
+use Illuminate\Support\Arr;
+use Illuminate\Support\Str;
use Ramsey\Uuid\Uuid;
use Spatie\Browsershot\Browsershot;
use Spatie\Browsershot\Exceptions\CouldNotTakeBrowsershot;
@@ -20,7 +22,7 @@ class BookmarkService
/**
* Create a new Bookmark.
*
- * @param array $request Data from request()->all()
+ * @param array $request Data from request()->all()
* @return Bookmark
*/
public function createBookmark(array $request): Bookmark
@@ -81,8 +83,9 @@ class BookmarkService
/**
* Given a URL, use `browsershot` to save an image of the page.
*
- * @param string $url
+ * @param string $url
* @return string The uuid for the screenshot
+ *
* @throws CouldNotTakeBrowsershot
* @codeCoverageIgnore
*/
@@ -104,8 +107,9 @@ class BookmarkService
/**
* Given a URL, attempt to save it to the Internet Archive.
*
- * @param string $url
+ * @param string $url
* @return string
+ *
* @throws InternetArchiveException
*/
public function getArchiveLink(string $url): string
diff --git a/app/Services/LikeService.php b/app/Services/LikeService.php
index b2d371c2..1c199223 100644
--- a/app/Services/LikeService.php
+++ b/app/Services/LikeService.php
@@ -13,7 +13,7 @@ class LikeService
/**
* Create a new Like.
*
- * @param array $request
+ * @param array $request
* @return Like $like
*/
public function createLike(array $request): Like
diff --git a/app/Services/Micropub/HEntryService.php b/app/Services/Micropub/HEntryService.php
index 8b33ef0c..bf19201f 100644
--- a/app/Services/Micropub/HEntryService.php
+++ b/app/Services/Micropub/HEntryService.php
@@ -4,7 +4,9 @@ declare(strict_types=1);
namespace App\Services\Micropub;
-use App\Services\{BookmarkService, LikeService, NoteService};
+use App\Services\BookmarkService;
+use App\Services\LikeService;
+use App\Services\NoteService;
use Illuminate\Support\Arr;
class HEntryService
diff --git a/app/Services/Micropub/UpdateService.php b/app/Services/Micropub/UpdateService.php
index 8ec80597..f056c475 100644
--- a/app/Services/Micropub/UpdateService.php
+++ b/app/Services/Micropub/UpdateService.php
@@ -4,9 +4,11 @@ declare(strict_types=1);
namespace App\Services\Micropub;
-use App\Models\{Media, Note};
+use App\Models\Media;
+use App\Models\Note;
use Illuminate\Database\Eloquent\ModelNotFoundException;
-use Illuminate\Support\{Arr, Str};
+use Illuminate\Support\Arr;
+use Illuminate\Support\Str;
class UpdateService
{
diff --git a/app/Services/NoteService.php b/app/Services/NoteService.php
index 2a1249c0..9c4dd357 100644
--- a/app/Services/NoteService.php
+++ b/app/Services/NoteService.php
@@ -4,9 +4,13 @@ declare(strict_types=1);
namespace App\Services;
-use App\Jobs\{SendWebMentions, SyndicateNoteToTwitter};
-use App\Models\{Media, Note, Place};
-use Illuminate\Support\{Arr, Str};
+use App\Jobs\SendWebMentions;
+use App\Jobs\SyndicateNoteToTwitter;
+use App\Models\Media;
+use App\Models\Note;
+use App\Models\Place;
+use Illuminate\Support\Arr;
+use Illuminate\Support\Str;
class NoteService
{
@@ -61,7 +65,7 @@ class NoteService
/**
* Get the content from the request to create a new note.
*
- * @param array $request Data from request()->all()
+ * @param array $request Data from request()->all()
* @return string|null
*/
private function getContent(array $request): ?string
@@ -79,7 +83,7 @@ class NoteService
/**
* Get the in-reply-to from the request to create a new note.
*
- * @param array $request Data from request()->all()
+ * @param array $request Data from request()->all()
* @return string|null
*/
private function getInReplyTo(array $request): ?string
@@ -94,7 +98,7 @@ class NoteService
/**
* Get the published time from the request to create a new note.
*
- * @param array $request Data from request()->all()
+ * @param array $request Data from request()->all()
* @return string|null
*/
private function getPublished(array $request): ?string
@@ -113,7 +117,7 @@ class NoteService
/**
* Get the location data from the request to create a new note.
*
- * @param array $request Data from request()->all()
+ * @param array $request Data from request()->all()
* @return string|null
*/
private function getLocation(array $request): ?string
@@ -135,7 +139,7 @@ class NoteService
/**
* Get the checkin data from the request to create a new note. This will be a Place.
*
- * @param array $request Data from request()->all()
+ * @param array $request Data from request()->all()
* @return Place|null
*/
private function getCheckin(array $request): ?Place
@@ -181,7 +185,7 @@ class NoteService
/**
* Get the Swarm URL from the syndication data in the request to create a new note.
*
- * @param array $request Data from request()->all()
+ * @param array $request Data from request()->all()
* @return string|null
*/
private function getSwarmUrl(array $request): ?string
@@ -196,7 +200,7 @@ class NoteService
/**
* Get the syndication targets from the request to create a new note.
*
- * @param array $request Data from request()->all()
+ * @param array $request Data from request()->all()
* @return array
*/
private function getSyndicationTargets(array $request): array
@@ -225,7 +229,7 @@ class NoteService
/**
* Get the media URLs from the request to create a new note.
*
- * @param array $request Data from request()->all()
+ * @param array $request Data from request()->all()
* @return array
*/
private function getMedia(array $request): array
@@ -255,7 +259,7 @@ class NoteService
/**
* Get the Instagram photo URL from the request to create a new note.
*
- * @param array $request Data from request()->all()
+ * @param array $request Data from request()->all()
* @return string|null
*/
private function getInstagramUrl(array $request): ?string
diff --git a/app/Services/PlaceService.php b/app/Services/PlaceService.php
index 24bd1b1a..fcec62dc 100644
--- a/app/Services/PlaceService.php
+++ b/app/Services/PlaceService.php
@@ -12,7 +12,7 @@ class PlaceService
/**
* Create a place.
*
- * @param array $data
+ * @param array $data
* @return Place
*/
public function createPlace(array $data): Place
diff --git a/app/Services/TokenService.php b/app/Services/TokenService.php
index 11f25efd..844852fb 100644
--- a/app/Services/TokenService.php
+++ b/app/Services/TokenService.php
@@ -6,7 +6,8 @@ namespace App\Services;
use App\Jobs\AddClientToDatabase;
use DateTimeImmutable;
-use Lcobucci\JWT\{Configuration, Token};
+use Lcobucci\JWT\Configuration;
+use Lcobucci\JWT\Token;
class TokenService
{
diff --git a/config/debugbar.php b/config/debugbar.php
index 7d46a634..b045f6ca 100644
--- a/config/debugbar.php
+++ b/config/debugbar.php
@@ -1,6 +1,6 @@
array(
+ 'storage' => [
'enabled' => true,
'driver' => 'file', // redis, file, pdo
'path' => storage_path() . '/debugbar', // For file driver
'connection' => null, // Leave null for default connection (Redis/PDO)
- ),
+ ],
/*
|--------------------------------------------------------------------------
@@ -70,27 +70,27 @@ return array(
|
*/
- 'collectors' => array(
- 'phpinfo' => true, // Php version
- 'messages' => true, // Messages
- 'time' => true, // Time Datalogger
- 'memory' => true, // Memory usage
- 'exceptions' => true, // Exception displayer
- 'log' => true, // Logs from Monolog (merged in messages if enabled)
- 'db' => true, // Show database (PDO) queries and bindings
- 'views' => true, // Views with their data
- 'route' => true, // Current route information
- 'laravel' => false, // Laravel version and environment
- 'events' => false, // All events fired
+ 'collectors' => [
+ 'phpinfo' => true, // Php version
+ 'messages' => true, // Messages
+ 'time' => true, // Time Datalogger
+ 'memory' => true, // Memory usage
+ 'exceptions' => true, // Exception displayer
+ 'log' => true, // Logs from Monolog (merged in messages if enabled)
+ 'db' => true, // Show database (PDO) queries and bindings
+ 'views' => true, // Views with their data
+ 'route' => true, // Current route information
+ 'laravel' => false, // Laravel version and environment
+ 'events' => false, // All events fired
'default_request' => false, // Regular or special Symfony request logger
'symfony_request' => true, // Only one can be enabled..
- 'mail' => true, // Catch mail messages
- 'logs' => false, // Add the latest log messages
- 'files' => false, // Show the included files
- 'config' => false, // Display config settings
- 'auth' => false, // Display Laravel authentication status
- 'session' => false, // Display session data in a separate tab
- ),
+ 'mail' => true, // Catch mail messages
+ 'logs' => false, // Add the latest log messages
+ 'files' => false, // Show the included files
+ 'config' => false, // Display config settings
+ 'auth' => false, // Display Laravel authentication status
+ 'session' => false, // Display session data in a separate tab
+ ],
/*
|--------------------------------------------------------------------------
@@ -101,33 +101,33 @@ return array(
|
*/
- 'options' => array(
- 'auth' => array(
+ 'options' => [
+ 'auth' => [
'show_name' => false, // Also show the users name/email in the debugbar
- ),
- 'db' => array(
- 'with_params' => true, // Render SQL with the parameters substituted
- 'timeline' => false, // Add the queries to the timeline
- 'backtrace' => false, // EXPERIMENTAL: Use a backtrace to find the origin of the query in your files.
- 'explain' => array( // EXPERIMENTAL: Show EXPLAIN output on queries
+ ],
+ 'db' => [
+ 'with_params' => true, // Render SQL with the parameters substituted
+ 'timeline' => false, // Add the queries to the timeline
+ 'backtrace' => false, // EXPERIMENTAL: Use a backtrace to find the origin of the query in your files.
+ 'explain' => [ // EXPERIMENTAL: Show EXPLAIN output on queries
'enabled' => false,
- 'types' => array('SELECT'), // array('SELECT', 'INSERT', 'UPDATE', 'DELETE'); for MySQL 5.6.3+
- ),
- 'hints' => true, // Show hints for common mistakes
- ),
- 'mail' => array(
- 'full_log' => false
- ),
- 'views' => array(
+ 'types' => ['SELECT'], // array('SELECT', 'INSERT', 'UPDATE', 'DELETE'); for MySQL 5.6.3+
+ ],
+ 'hints' => true, // Show hints for common mistakes
+ ],
+ 'mail' => [
+ 'full_log' => false,
+ ],
+ 'views' => [
'data' => false, //Note: Can slow down the application, because the data can be quite large..
- ),
- 'route' => array(
- 'label' => true // show complete route on bar
- ),
- 'logs' => array(
- 'file' => null
- ),
- ),
+ ],
+ 'route' => [
+ 'label' => true, // show complete route on bar
+ ],
+ 'logs' => [
+ 'file' => null,
+ ],
+ ],
/*
|--------------------------------------------------------------------------
@@ -142,4 +142,4 @@ return array(
'inject' => true,
-);
+];
diff --git a/config/filesystems.php b/config/filesystems.php
index 945b0190..18042a4c 100644
--- a/config/filesystems.php
+++ b/config/filesystems.php
@@ -67,7 +67,7 @@ return [
'media' => [
'driver' => 'local',
- 'root' => public_path() . '/media',
+ 'root' => public_path() . '/media',
],
],
diff --git a/config/ide-helper.php b/config/ide-helper.php
index 07b9ca57..a94d5cd1 100644
--- a/config/ide-helper.php
+++ b/config/ide-helper.php
@@ -11,8 +11,8 @@ return [
|
*/
- 'filename' => '_ide_helper',
- 'format' => 'php',
+ 'filename' => '_ide_helper',
+ 'format' => 'php',
/*
|--------------------------------------------------------------------------
diff --git a/config/sluggable.php b/config/sluggable.php
index 6c5cb085..031db0fa 100644
--- a/config/sluggable.php
+++ b/config/sluggable.php
@@ -17,7 +17,6 @@ return [
*
* Defaults to null, which uses the toString() method on your model.
*/
-
'source' => null,
/**
@@ -25,7 +24,6 @@ return [
* no length restrictions are enforced. Set it to a positive integer if you
* want to make sure your slugs aren't too long.
*/
-
'maxLength' => null,
/**
@@ -43,13 +41,11 @@ return [
*
* 'method' => array('Str','slug'),
*/
-
'method' => null,
/**
* Separator to use when generating slugs. Defaults to a hyphen.
*/
-
'separator' => '-',
/**
@@ -61,7 +57,6 @@ return [
* my-slug-1
* my-slug-2
*/
-
'unique' => true,
/**
@@ -72,7 +67,6 @@ return [
* "similar" slugs. The closure should return the new unique
* suffix to append to the slug.
*/
-
'uniqueSuffix' => null,
/**
@@ -81,7 +75,6 @@ return [
* If set to "false", then a new slug could duplicate one that exists on a trashed model.
* If set to "true", then uniqueness is enforced across trashed and existing models.
*/
-
'includeTrashed' => false,
/**
@@ -107,7 +100,6 @@ return [
*
* and continue from there.
*/
-
'reserved' => null,
/**
@@ -120,7 +112,6 @@ return [
* is probably not a good idea from an SEO point of view.
* Only set this to true if you understand the possible consequences.
*/
-
'onUpdate' => false,
];
diff --git a/config/syndication.php b/config/syndication.php
index 5d3b2389..dcd57253 100644
--- a/config/syndication.php
+++ b/config/syndication.php
@@ -22,5 +22,5 @@ return [
'photo' => 'https://pbs.twimg.com/profile_images/875422855932121089/W628ZI8w_400x400.jpg',
],
],
- ]
+ ],
];
diff --git a/config/ttwitter.php b/config/ttwitter.php
index 8c6e4ec2..e5473322 100644
--- a/config/ttwitter.php
+++ b/config/ttwitter.php
@@ -2,17 +2,17 @@
// You can find the keys here : https://dev.twitter.com/
- return [
- 'API_URL' => 'api.twitter.com',
- 'API_VERSION' => '1.1',
- 'AUTHENTICATE_URL' => 'https://api.twitter.com/oauth/authenticate',
- 'AUTHORIZE_URL' => 'https://api.twitter.com/oauth/authorize',
- 'ACCESS_TOKEN_URL' => 'oauth/access_token',
- 'REQUEST_TOKEN_URL' => 'oauth/request_token',
- 'USE_SSL' => true,
+ return [
+ 'API_URL' => 'api.twitter.com',
+ 'API_VERSION' => '1.1',
+ 'AUTHENTICATE_URL' => 'https://api.twitter.com/oauth/authenticate',
+ 'AUTHORIZE_URL' => 'https://api.twitter.com/oauth/authorize',
+ 'ACCESS_TOKEN_URL' => 'oauth/access_token',
+ 'REQUEST_TOKEN_URL' => 'oauth/request_token',
+ 'USE_SSL' => true,
- 'CONSUMER_KEY' => env('TWITTER_CONSUMER_KEY'),
- 'CONSUMER_SECRET' => env('TWITTER_CONSUMER_SECRET'),
- 'ACCESS_TOKEN' => env('TWITTER_ACCESS_TOKEN'),
- 'ACCESS_TOKEN_SECRET' => env('TWITTER_ACCESS_TOKEN_SECRET'),
- ];
+ 'CONSUMER_KEY' => env('TWITTER_CONSUMER_KEY'),
+ 'CONSUMER_SECRET' => env('TWITTER_CONSUMER_SECRET'),
+ 'ACCESS_TOKEN' => env('TWITTER_ACCESS_TOKEN'),
+ 'ACCESS_TOKEN_SECRET' => env('TWITTER_ACCESS_TOKEN_SECRET'),
+ ];
diff --git a/config/url.php b/config/url.php
index ea8a81fd..c0fd5b48 100644
--- a/config/url.php
+++ b/config/url.php
@@ -7,5 +7,5 @@
return [
'longurl' => env('APP_LONGURL', 'jonnybarnes.uk'),
- 'shorturl' => env('APP_SHORTURL', 'jmb.lv')
+ 'shorturl' => env('APP_SHORTURL', 'jmb.lv'),
];
diff --git a/database/factories/NoteFactory.php b/database/factories/NoteFactory.php
index 347ca33a..cbe2e09d 100644
--- a/database/factories/NoteFactory.php
+++ b/database/factories/NoteFactory.php
@@ -20,6 +20,7 @@ class NoteFactory extends Factory
* Define the model's default state.
*
* @return array
+ *
* @throws Exception
*/
public function definition()
diff --git a/database/migrations/2015_02_28_132629_create_articles_table.php b/database/migrations/2015_02_28_132629_create_articles_table.php
index 43277762..5b2ec299 100644
--- a/database/migrations/2015_02_28_132629_create_articles_table.php
+++ b/database/migrations/2015_02_28_132629_create_articles_table.php
@@ -1,7 +1,7 @@
increments('id');
$table->string('source');
$table->string('target');
diff --git a/database/migrations/2015_07_17_111512_create_clients_table.php b/database/migrations/2015_07_17_111512_create_clients_table.php
index 4821d16b..b545c641 100644
--- a/database/migrations/2015_07_17_111512_create_clients_table.php
+++ b/database/migrations/2015_07_17_111512_create_clients_table.php
@@ -1,7 +1,7 @@
timestamps();
});
}
+
/**
* Reverse the migrations.
*/
diff --git a/database/migrations/2015_11_07_130637_create_places_table.php b/database/migrations/2015_11_07_130637_create_places_table.php
index 57f35f64..8630b95f 100644
--- a/database/migrations/2015_11_07_130637_create_places_table.php
+++ b/database/migrations/2015_11_07_130637_create_places_table.php
@@ -1,7 +1,7 @@
update(['updated_at' => $now->toDateTimeString()]);
$now = Carbon::now()->subHours(2)->subMinutes(25);
- $articleWithCode = << In reply to In reply to a note In reply to a note Hello
@@ -181,7 +181,7 @@ class ContactsTest extends TestCase
/** @test */
public function gettingRemoteAvatarFailsGracefullyWithRemoteError(): void
{
- $html = <<
diff --git a/tests/Feature/Admin/LikesTest.php b/tests/Feature/Admin/LikesTest.php
index 462fc2e4..810413b8 100644
--- a/tests/Feature/Admin/LikesTest.php
+++ b/tests/Feature/Admin/LikesTest.php
@@ -43,10 +43,10 @@ class LikesTest extends TestCase
$this->actingAs($user)
->post('/admin/likes', [
- 'like_url' => 'https://example.com'
+ 'like_url' => 'https://example.com',
]);
$this->assertDatabaseHas('likes', [
- 'url' => 'https://example.com'
+ 'url' => 'https://example.com',
]);
Queue::assertPushed(ProcessLike::class);
}
diff --git a/tests/Feature/FeedsTest.php b/tests/Feature/FeedsTest.php
index 6d5f46a7..6bc9cd9c 100644
--- a/tests/Feature/FeedsTest.php
+++ b/tests/Feature/FeedsTest.php
@@ -70,7 +70,7 @@ class FeedsTest extends TestCase
'children' => [[
'type' => 'entry',
'post-type' => 'article',
- ]]
+ ]],
]);
}
@@ -131,7 +131,7 @@ class FeedsTest extends TestCase
'children' => [[
'type' => 'entry',
'post-type' => 'note',
- ]]
+ ]],
]);
}
diff --git a/tests/Feature/HorizonTest.php b/tests/Feature/HorizonTest.php
index fe264981..45df6288 100644
--- a/tests/Feature/HorizonTest.php
+++ b/tests/Feature/HorizonTest.php
@@ -3,8 +3,6 @@
namespace Tests\Feature;
use App\Models\User;
-use Illuminate\Foundation\Testing\RefreshDatabase;
-use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
class HorizonTest extends TestCase
@@ -13,6 +11,7 @@ class HorizonTest extends TestCase
* Horizon has its own test suite, here we just test it has been installed successfully.
*
* @test
+ *
* @return void
*/
public function horizonIsInstalled(): void
diff --git a/tests/Feature/LikesTest.php b/tests/Feature/LikesTest.php
index b521f957..a4899e21 100644
--- a/tests/Feature/LikesTest.php
+++ b/tests/Feature/LikesTest.php
@@ -85,7 +85,7 @@ class LikesTest extends TestCase
$job = new ProcessLike($like);
- $content = <<
A nice image
-A nice image
+A nice video
-