Skip to content

Commit 070e742

Browse files
committed
fix
1 parent b762a3b commit 070e742

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/ErrorHandler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ protected function setFilename(string $filename): void
5454

5555
private function sucessfull(string $filenameSource, ?string $filenameRotated): void
5656
{
57-
$this->finished($filenameRotated, 'sucessfull');
57+
$this->finished('sucessfull', $filenameSource);
5858

5959
if (is_null($this->thenCallback) || is_null($filenameRotated)) {
6060
return;
@@ -65,7 +65,7 @@ private function sucessfull(string $filenameSource, ?string $filenameRotated): v
6565

6666
protected function exception(Throwable $exception): self
6767
{
68-
$this->finished($this->_filename, $exception->getMessage());
68+
$this->finished($exception->getMessage(), $this->_filename);
6969

7070
if ($this->catchCallable) {
7171
call_user_func($this->catchCallable, $this->convertException($exception));
@@ -77,7 +77,7 @@ protected function exception(Throwable $exception): self
7777
}
7878

7979

80-
protected function finished(string $filenameSource, string $message): void
80+
protected function finished(string $message, ?string $filenameSource): void
8181
{
8282
if (is_null($this->finallyCallback)) {
8383
return;

src/Rotation.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ private function runCompress(string $filename): ?string
160160
private function canRotate(string $filename): bool
161161
{
162162
if (!file_exists($filename)) {
163-
$this->finished($filename, sprintf('the file %s not exists.', $filename));
163+
$this->finished(sprintf('the file %s not exists.', $filename), $filename);
164+
164165
return false;
165166
}
166167

0 commit comments

Comments
 (0)