Skip to content

Commit

Permalink
Merge pull request #32 from kiwilan/develop
Browse files Browse the repository at this point in the history
1.3.54
  • Loading branch information
ewilan-riviere authored Jul 23, 2023
2 parents 4478912 + 740bcc1 commit 3b74d5d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/fix-php-code-style-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
- name: Fix PHP code style issues
uses: aglipanci/[email protected]

- name: Pull
run: git pull

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PHP eBook

![Banner with eReader picture in background and PHP eBook title](docs/banner.jpg)
![Banner with eReader picture in background and PHP eBook title](https://raw.githubusercontent.com/kiwilan/php-ebook/main/docs/banner.jpg)

[![php][php-version-src]][php-version-href]
[![version][version-src]][version-href]
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "kiwilan/php-ebook",
"description": "PHP package to read metadata and extract covers from eBooks (.epub, .cbz, .cbr, .cb7, .cbt, .pdf) and audiobooks (.mp3, .m4a, .m4b, .flac, .ogg).",
"version": "1.3.53",
"version": "1.3.54",
"keywords": [
"php",
"ebook",
Expand Down
12 changes: 6 additions & 6 deletions src/Ebook.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ protected function __construct(
protected string $path,
protected string $filename,
protected string $extension,
protected BaseArchive|null $archive = null,
protected Audio|null $audio = null,
protected ?BaseArchive $archive = null,
protected ?Audio $audio = null,
protected bool $isArchive = false,
protected bool $isAudio = false,
protected ?EbookMetadata $metadata = null,
Expand Down Expand Up @@ -285,7 +285,7 @@ public function authors(): array
/**
* Description of the book.
*/
public function description(?int $limit = null): ?string
public function description(int $limit = null): ?string
{
if ($limit) {
return $this->limitLength($this->description, $limit);
Expand Down Expand Up @@ -359,7 +359,7 @@ public function volume(): ?int
/**
* Copyright of the book.
*/
public function copyright(?int $limit = null): ?string
public function copyright(int $limit = null): ?string
{
if ($limit) {
return $this->limitLength($this->copyright, $limit);
Expand Down Expand Up @@ -395,15 +395,15 @@ public function extension(): string
/**
* Archive reader.
*/
public function archive(): BaseArchive|null
public function archive(): ?BaseArchive
{
return $this->archive;
}

/**
* Audio reader.
*/
public function audio(): Audio|null
public function audio(): ?Audio
{
return $this->audio;
}
Expand Down
4 changes: 2 additions & 2 deletions src/EbookCover.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ protected function __construct(

public static function make(?string $path, ?string $content): ?self
{
if (! $content) {
if ($content === null) {
return null;
}

Expand All @@ -28,7 +28,7 @@ public function path(): ?string

public function content(bool $toBase64 = false): ?string
{
if (! $this->content) {
if ($this->content === null) {
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Formats/Cba/CbaMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function toArray(): array
];
}

private function arrayableToBookAuthor(array $core, ?string $role = null): array
private function arrayableToBookAuthor(array $core, string $role = null): array
{
if (empty($core)) {
return [];
Expand Down

0 comments on commit 3b74d5d

Please sign in to comment.