From 7ee5bb00ba60b247fd968419103799b545ebab1c Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Thu, 20 Apr 2023 17:34:06 +0100 Subject: [PATCH] Update Laravel Pint --- app/Http/Controllers/ArticlesController.php | 6 +-- app/Http/Controllers/FeedsController.php | 16 ++++---- app/Services/NoteService.php | 2 +- composer.lock | 10 ++--- tests/Browser/ExampleTest.php | 2 +- tests/Browser/NotesTest.php | 4 +- .../Feature/Admin/AdminHomeControllerTest.php | 2 +- tests/Feature/Admin/ArticlesTest.php | 38 +++++++++---------- tests/Feature/Admin/ClientsTest.php | 30 +++++++-------- tests/Feature/Admin/LikesTest.php | 26 ++++++------- tests/Unit/Jobs/ProcessBookmarkJobTest.php | 4 +- tests/Unit/Jobs/SaveProfileImageJobTest.php | 8 ++-- tests/Unit/WebMentionTest.php | 8 ++-- 13 files changed, 78 insertions(+), 78 deletions(-) diff --git a/app/Http/Controllers/ArticlesController.php b/app/Http/Controllers/ArticlesController.php index 6ea4d1ed..bba18f64 100644 --- a/app/Http/Controllers/ArticlesController.php +++ b/app/Http/Controllers/ArticlesController.php @@ -18,9 +18,9 @@ class ArticlesController extends Controller public function index(int $year = null, int $month = null): View { $articles = Article::where('published', '1') - ->date($year, $month) - ->orderBy('updated_at', 'desc') - ->simplePaginate(5); + ->date($year, $month) + ->orderBy('updated_at', 'desc') + ->simplePaginate(5); return view('articles.index', compact('articles')); } diff --git a/app/Http/Controllers/FeedsController.php b/app/Http/Controllers/FeedsController.php index 08c9a3ae..01b6b3c0 100644 --- a/app/Http/Controllers/FeedsController.php +++ b/app/Http/Controllers/FeedsController.php @@ -20,8 +20,8 @@ class FeedsController extends Controller $buildDate = $articles->first()->updated_at->toRssString(); return response() - ->view('articles.rss', compact('articles', 'buildDate')) - ->header('Content-Type', 'application/rss+xml; charset=utf-8'); + ->view('articles.rss', compact('articles', 'buildDate')) + ->header('Content-Type', 'application/rss+xml; charset=utf-8'); } /** @@ -32,8 +32,8 @@ class FeedsController extends Controller $articles = Article::where('published', '1')->latest('updated_at')->take(20)->get(); return response() - ->view('articles.atom', compact('articles')) - ->header('Content-Type', 'application/atom+xml; charset=utf-8'); + ->view('articles.atom', compact('articles')) + ->header('Content-Type', 'application/atom+xml; charset=utf-8'); } /** @@ -45,8 +45,8 @@ class FeedsController extends Controller $buildDate = $notes->first()->updated_at->toRssString(); return response() - ->view('notes.rss', compact('notes', 'buildDate')) - ->header('Content-Type', 'application/rss+xml; charset=utf-8'); + ->view('notes.rss', compact('notes', 'buildDate')) + ->header('Content-Type', 'application/rss+xml; charset=utf-8'); } /** @@ -57,8 +57,8 @@ class FeedsController extends Controller $notes = Note::latest()->take(20)->get(); return response() - ->view('notes.atom', compact('notes')) - ->header('Content-Type', 'application/atom+xml; charset=utf-8'); + ->view('notes.atom', compact('notes')) + ->header('Content-Type', 'application/atom+xml; charset=utf-8'); } /** @todo sort out return type for json responses */ diff --git a/app/Services/NoteService.php b/app/Services/NoteService.php index 9d6a47d4..1238b804 100644 --- a/app/Services/NoteService.php +++ b/app/Services/NoteService.php @@ -63,7 +63,7 @@ class NoteService extends Service { if (Arr::get($request, 'properties.published.0')) { return carbon(Arr::get($request, 'properties.published.0')) - ->toDateTimeString(); + ->toDateTimeString(); } if (Arr::get($request, 'published')) { return carbon(Arr::get($request, 'published'))->toDateTimeString(); diff --git a/composer.lock b/composer.lock index 1ed0d48d..dbb75146 100644 --- a/composer.lock +++ b/composer.lock @@ -8751,16 +8751,16 @@ }, { "name": "laravel/pint", - "version": "v1.8.0", + "version": "v1.9.0", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "4b8f2ef22bfcddd1d163cfd282e3f42ee1a5cce2" + "reference": "eac5ec3d6b5c96543c682e309a10fdddc9f61d80" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/4b8f2ef22bfcddd1d163cfd282e3f42ee1a5cce2", - "reference": "4b8f2ef22bfcddd1d163cfd282e3f42ee1a5cce2", + "url": "https://api.github.com/repos/laravel/pint/zipball/eac5ec3d6b5c96543c682e309a10fdddc9f61d80", + "reference": "eac5ec3d6b5c96543c682e309a10fdddc9f61d80", "shasum": "" }, "require": { @@ -8813,7 +8813,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2023-04-04T13:08:09+00:00" + "time": "2023-04-18T14:50:44+00:00" }, { "name": "laravel/sail", diff --git a/tests/Browser/ExampleTest.php b/tests/Browser/ExampleTest.php index 6eff13f0..1716a41e 100644 --- a/tests/Browser/ExampleTest.php +++ b/tests/Browser/ExampleTest.php @@ -16,7 +16,7 @@ class ExampleTest extends DuskTestCase { $this->browse(function (Browser $browser) { $browser->visit('/') - ->assertSee('Laravel'); + ->assertSee('Laravel'); }); } } diff --git a/tests/Browser/NotesTest.php b/tests/Browser/NotesTest.php index 0e9dc5ab..c8157f02 100644 --- a/tests/Browser/NotesTest.php +++ b/tests/Browser/NotesTest.php @@ -15,7 +15,7 @@ class NotesTest extends DuskTestCase { $this->browse(function ($browser) { $browser->visit('/notes/D') - ->assertSee('JBL5'); + ->assertSee('JBL5'); }); } @@ -28,7 +28,7 @@ class NotesTest extends DuskTestCase { $this->browse(function ($browser) { $browser->visit('/notes/E') - ->assertSee('quill.p3k.io'); + ->assertSee('quill.p3k.io'); }); } } diff --git a/tests/Feature/Admin/AdminHomeControllerTest.php b/tests/Feature/Admin/AdminHomeControllerTest.php index 6658710d..b74b8b25 100644 --- a/tests/Feature/Admin/AdminHomeControllerTest.php +++ b/tests/Feature/Admin/AdminHomeControllerTest.php @@ -18,7 +18,7 @@ class AdminHomeControllerTest extends TestCase $user = User::factory()->make(); $response = $this->actingAs($user) - ->get('/admin'); + ->get('/admin'); $response->assertViewIs('admin.welcome'); } diff --git a/tests/Feature/Admin/ArticlesTest.php b/tests/Feature/Admin/ArticlesTest.php index 8e0563ab..0139d699 100644 --- a/tests/Feature/Admin/ArticlesTest.php +++ b/tests/Feature/Admin/ArticlesTest.php @@ -21,7 +21,7 @@ class ArticlesTest extends TestCase $user = User::factory()->make(); $response = $this->actingAs($user) - ->get('/admin/blog'); + ->get('/admin/blog'); $response->assertSeeText('Select article to edit:'); } @@ -31,7 +31,7 @@ class ArticlesTest extends TestCase $user = User::factory()->make(); $response = $this->actingAs($user) - ->get('/admin/blog/create'); + ->get('/admin/blog/create'); $response->assertSeeText('Title (URL)'); } @@ -41,10 +41,10 @@ class ArticlesTest extends TestCase $user = User::factory()->make(); $this->actingAs($user) - ->post('/admin/blog', [ - 'title' => 'Test Title', - 'main' => 'Article content', - ]); + ->post('/admin/blog', [ + 'title' => 'Test Title', + 'main' => 'Article content', + ]); $this->assertDatabaseHas('articles', ['title' => 'Test Title']); } @@ -62,10 +62,10 @@ class ArticlesTest extends TestCase $file = new UploadedFile($path, 'article.md', 'text/plain', null, true); $this->actingAs($user) - ->post('/admin/blog', [ - 'title' => 'Uploaded Article', - 'article' => $file, - ]); + ->post('/admin/blog', [ + 'title' => 'Uploaded Article', + 'article' => $file, + ]); $this->assertDatabaseHas('articles', [ 'title' => 'Uploaded Article', @@ -82,7 +82,7 @@ class ArticlesTest extends TestCase ]); $response = $this->actingAs($user) - ->get('/admin/blog/' . $article->id . '/edit'); + ->get('/admin/blog/' . $article->id . '/edit'); $response->assertSeeText('This is *my* new blog. It uses `Markdown`.'); } @@ -93,11 +93,11 @@ class ArticlesTest extends TestCase $article = Article::factory()->create(); $this->actingAs($user) - ->post('/admin/blog/' . $article->id, [ - '_method' => 'PUT', - 'title' => 'My New Blog', - 'main' => 'This article has been edited', - ]); + ->post('/admin/blog/' . $article->id, [ + '_method' => 'PUT', + 'title' => 'My New Blog', + 'main' => 'This article has been edited', + ]); $this->assertDatabaseHas('articles', [ 'title' => 'My New Blog', 'main' => 'This article has been edited', @@ -111,9 +111,9 @@ class ArticlesTest extends TestCase $article = Article::factory()->create(); $this->actingAs($user) - ->post('/admin/blog/' . $article->id, [ - '_method' => 'DELETE', - ]); + ->post('/admin/blog/' . $article->id, [ + '_method' => 'DELETE', + ]); $this->assertSoftDeleted('articles', [ 'title' => $article->title, ]); diff --git a/tests/Feature/Admin/ClientsTest.php b/tests/Feature/Admin/ClientsTest.php index 04786636..463f336a 100644 --- a/tests/Feature/Admin/ClientsTest.php +++ b/tests/Feature/Admin/ClientsTest.php @@ -19,7 +19,7 @@ class ClientsTest extends TestCase $user = User::factory()->make(); $response = $this->actingAs($user) - ->get('/admin/clients'); + ->get('/admin/clients'); $response->assertSeeText('Clients'); } @@ -29,7 +29,7 @@ class ClientsTest extends TestCase $user = User::factory()->make(); $response = $this->actingAs($user) - ->get('/admin/clients/create'); + ->get('/admin/clients/create'); $response->assertSeeText('New Client'); } @@ -39,10 +39,10 @@ class ClientsTest extends TestCase $user = User::factory()->make(); $this->actingAs($user) - ->post('/admin/clients', [ - 'client_name' => 'Micropublish', - 'client_url' => 'https://micropublish.net', - ]); + ->post('/admin/clients', [ + 'client_name' => 'Micropublish', + 'client_url' => 'https://micropublish.net', + ]); $this->assertDatabaseHas('clients', [ 'client_name' => 'Micropublish', 'client_url' => 'https://micropublish.net', @@ -58,7 +58,7 @@ class ClientsTest extends TestCase ]); $response = $this->actingAs($user) - ->get('/admin/clients/' . $client->id . '/edit'); + ->get('/admin/clients/' . $client->id . '/edit'); $response->assertSee('https://jbl5.dev/notes/new'); } @@ -69,11 +69,11 @@ class ClientsTest extends TestCase $client = MicropubClient::factory()->create(); $this->actingAs($user) - ->post('/admin/clients/' . $client->id, [ - '_method' => 'PUT', - 'client_url' => 'https://jbl5.dev/notes/new', - 'client_name' => 'JBL5dev', - ]); + ->post('/admin/clients/' . $client->id, [ + '_method' => 'PUT', + 'client_url' => 'https://jbl5.dev/notes/new', + 'client_name' => 'JBL5dev', + ]); $this->assertDatabaseHas('clients', [ 'client_url' => 'https://jbl5.dev/notes/new', 'client_name' => 'JBL5dev', @@ -89,9 +89,9 @@ class ClientsTest extends TestCase ]); $this->actingAs($user) - ->post('/admin/clients/' . $client->id, [ - '_method' => 'DELETE', - ]); + ->post('/admin/clients/' . $client->id, [ + '_method' => 'DELETE', + ]); $this->assertDatabaseMissing('clients', [ 'client_url' => 'https://jbl5.dev/notes/new', ]); diff --git a/tests/Feature/Admin/LikesTest.php b/tests/Feature/Admin/LikesTest.php index 810413b8..b5560c14 100644 --- a/tests/Feature/Admin/LikesTest.php +++ b/tests/Feature/Admin/LikesTest.php @@ -21,7 +21,7 @@ class LikesTest extends TestCase $user = User::factory()->make(); $response = $this->actingAs($user) - ->get('/admin/likes'); + ->get('/admin/likes'); $response->assertSeeText('Likes'); } @@ -31,7 +31,7 @@ class LikesTest extends TestCase $user = User::factory()->make(); $response = $this->actingAs($user) - ->get('/admin/likes/create'); + ->get('/admin/likes/create'); $response->assertSeeText('New Like'); } @@ -42,9 +42,9 @@ class LikesTest extends TestCase $user = User::factory()->make(); $this->actingAs($user) - ->post('/admin/likes', [ - 'like_url' => 'https://example.com', - ]); + ->post('/admin/likes', [ + 'like_url' => 'https://example.com', + ]); $this->assertDatabaseHas('likes', [ 'url' => 'https://example.com', ]); @@ -58,7 +58,7 @@ class LikesTest extends TestCase $like = Like::factory()->create(); $response = $this->actingAs($user) - ->get('/admin/likes/' . $like->id . '/edit'); + ->get('/admin/likes/' . $like->id . '/edit'); $response->assertSee('Edit Like'); } @@ -70,10 +70,10 @@ class LikesTest extends TestCase $like = Like::factory()->create(); $this->actingAs($user) - ->post('/admin/likes/' . $like->id, [ - '_method' => 'PUT', - 'like_url' => 'https://example.com', - ]); + ->post('/admin/likes/' . $like->id, [ + '_method' => 'PUT', + 'like_url' => 'https://example.com', + ]); $this->assertDatabaseHas('likes', [ 'url' => 'https://example.com', ]); @@ -88,9 +88,9 @@ class LikesTest extends TestCase $user = User::factory()->make(); $this->actingAs($user) - ->post('/admin/likes/' . $like->id, [ - '_method' => 'DELETE', - ]); + ->post('/admin/likes/' . $like->id, [ + '_method' => 'DELETE', + ]); $this->assertDatabaseMissing('likes', [ 'url' => $url, ]); diff --git a/tests/Unit/Jobs/ProcessBookmarkJobTest.php b/tests/Unit/Jobs/ProcessBookmarkJobTest.php index 4f758052..b0584adc 100644 --- a/tests/Unit/Jobs/ProcessBookmarkJobTest.php +++ b/tests/Unit/Jobs/ProcessBookmarkJobTest.php @@ -25,7 +25,7 @@ class ProcessBookmarkJobTest extends TestCase $bookmark = Bookmark::factory()->create(); $service = $this->createMock(BookmarkService::class); $service->method('getArchiveLink') - ->willReturn('https://web.archive.org/web/1234'); + ->willReturn('https://web.archive.org/web/1234'); $this->app->instance(BookmarkService::class, $service); $job = new ProcessBookmark($bookmark); @@ -46,7 +46,7 @@ class ProcessBookmarkJobTest extends TestCase $bookmark = Bookmark::factory()->create(); $service = $this->createMock(BookmarkService::class); $service->method('getArchiveLink') - ->will($this->throwException(new InternetArchiveException())); + ->will($this->throwException(new InternetArchiveException())); $this->app->instance(BookmarkService::class, $service); $job = new ProcessBookmark($bookmark); diff --git a/tests/Unit/Jobs/SaveProfileImageJobTest.php b/tests/Unit/Jobs/SaveProfileImageJobTest.php index 1ecc5807..d29f0cc9 100644 --- a/tests/Unit/Jobs/SaveProfileImageJobTest.php +++ b/tests/Unit/Jobs/SaveProfileImageJobTest.php @@ -30,7 +30,7 @@ class SaveProfileImageJobTest extends TestCase $mf = ['items' => []]; $authorship = $this->createMock(Authorship::class); $authorship->method('findAuthor') - ->will($this->throwException(new AuthorshipParserException())); + ->will($this->throwException(new AuthorshipParserException())); $job = new SaveProfileImage($mf); $this->assertNull($job->handle($authorship)); @@ -48,7 +48,7 @@ class SaveProfileImageJobTest extends TestCase ]; $authorship = $this->createMock(Authorship::class); $authorship->method('findAuthor') - ->willReturn($author); + ->willReturn($author); $job = new SaveProfileImage($mf); $this->assertNull($job->handle($authorship)); @@ -72,7 +72,7 @@ class SaveProfileImageJobTest extends TestCase ]; $authorship = $this->createMock(Authorship::class); $authorship->method('findAuthor') - ->willReturn($author); + ->willReturn($author); $job = new SaveProfileImage($mf); $job->handle($authorship); @@ -97,7 +97,7 @@ class SaveProfileImageJobTest extends TestCase ]; $authorship = $this->createMock(Authorship::class); $authorship->method('findAuthor') - ->willReturn($author); + ->willReturn($author); $job = new SaveProfileImage($mf); $job->handle($authorship); diff --git a/tests/Unit/WebMentionTest.php b/tests/Unit/WebMentionTest.php index e58ea5a8..e066b84e 100644 --- a/tests/Unit/WebMentionTest.php +++ b/tests/Unit/WebMentionTest.php @@ -105,11 +105,11 @@ class WebMentionTest extends TestCase $this->app->instance(Codebird::class, $codebirdMock); Cache::shouldReceive('has') - ->once() - ->andReturn(false); + ->once() + ->andReturn(false); Cache::shouldReceive('put') - ->once() - ->andReturn(true); + ->once() + ->andReturn(true); $webmention = new WebMention(); $twitterURL = 'https://twitter.com/example';