Skip to content

Commit dfe5838

Browse files
dvlppgithub-actions[bot]
authored andcommitted
Fix styling
1 parent 8e7ce3a commit dfe5838

13 files changed

+17
-20
lines changed

src/Api/Clients/TiteLive/TiteLiveApiException.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@
44

55
use Exception;
66

7-
class TiteLiveApiException extends Exception
8-
{
9-
}
7+
class TiteLiveApiException extends Exception {}

src/Api/SuggestBooksFromAuthors.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class SuggestBooksFromAuthors extends CacheableAction
1212

1313
protected ?string $excludedGencod;
1414

15-
public function suggestBooks(array $authors, string $excludedGencod = null): Collection
15+
public function suggestBooks(array $authors, ?string $excludedGencod = null): Collection
1616
{
1717
$this->authors = $authors;
1818
$this->excludedGencod = $excludedGencod;

src/Api/SuggestOtherEditions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class SuggestOtherEditions extends CacheableAction
1414

1515
protected ?string $excludedGencod;
1616

17-
public function suggestBooks(string $bookTitle, array $authors, string $excludedGencod = null): Collection
17+
public function suggestBooks(string $bookTitle, array $authors, ?string $excludedGencod = null): Collection
1818
{
1919
$this->bookTitle = $bookTitle;
2020
$this->authors = $authors;

src/Book.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Book extends Model implements JsonSerializable
2424

2525
protected static function newFactory()
2626
{
27-
return new BookFactory();
27+
return new BookFactory;
2828
}
2929

3030
protected function url(): Attribute

src/Enum/BookAvailability.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ enum BookAvailability: int
1515

1616
public function getLabel(): string
1717
{
18-
return match($this) {
18+
return match ($this) {
1919
BookAvailability::AvailableOnDemand => 'Sur commande',
2020
BookAvailability::Forthcoming => 'À paraître',
2121
BookAvailability::Reprint,

src/LaravelTiteliveClientServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function packageRegistered()
2424
{
2525
$this->app->bind(BookDirectoryClient::class, function () {
2626
if (config('titelive-client.book_directory.mock', false)) {
27-
return new BookDirectoryMockClientForDev();
27+
return new BookDirectoryMockClientForDev;
2828
}
2929

3030
return new TiteLiveClient(
@@ -37,7 +37,7 @@ public function packageRegistered()
3737

3838
$this->app->bind(BookCache::class, function ($app) {
3939
if (config('titelive-client.book_directory.mock', false)) {
40-
return new BookCacheMockForDev();
40+
return new BookCacheMockForDev;
4141
}
4242

4343
return $app->get(RandomBasedOnRefreshDateBookCache::class);

src/Utils/HasBookAttribute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function refreshBook(bool $force = false): self
1616
$this->update([
1717
'book' => app(BookCache::class)
1818
->force($force)
19-
->refreshIfNeeded($this->book)
19+
->refreshIfNeeded($this->book),
2020
]);
2121

2222
return $this;

src/Utils/HasBooksAttribute.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
/**
1111
* @property Collection|Book[] $books
12+
*
1213
* @mixin \Illuminate\Database\Eloquent\Model
1314
*/
1415
trait HasBooksAttribute
@@ -17,14 +18,14 @@ public function refreshBooks(bool $force = false): self
1718
{
1819
$this->update([
1920
'books' => $this->books
20-
->map(function(Book $book) use($force) {
21+
->map(function (Book $book) use ($force) {
2122
return app(BookCache::class)
2223
->force($force)
2324
->refreshIfNeeded($book);
2425
})
2526
->filter()
2627
->values()
27-
->toArray()
28+
->toArray(),
2829
]);
2930

3031
return $this;

tests/Api/FindBookTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Code16\LaravelTiteliveClient\Api\FindBook;
66

77
beforeEach(function () {
8-
$this->fakeClient = new BookDirectoryMockClientForDev();
8+
$this->fakeClient = new BookDirectoryMockClientForDev;
99
$this->app->bind(BookDirectoryClient::class, fn () => $this->fakeClient);
1010
});
1111

tests/Api/ListBooksTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Code16\LaravelTiteliveClient\Api\ListBooks;
66

77
beforeEach(function () {
8-
$this->fakeClient = new BookDirectoryMockClientForDev();
8+
$this->fakeClient = new BookDirectoryMockClientForDev;
99
$this->app->bind(BookDirectoryClient::class, fn () => $this->fakeClient);
1010
});
1111

0 commit comments

Comments
 (0)