Skip to content

Commit 005d8d5

Browse files
committed
refactor: different code style
Signed-off-by: rahul <[email protected]>
1 parent de7e481 commit 005d8d5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/FileHandler.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,9 @@ public function write(string $data, ?int $length = null): void
3939
{
4040
foreach ($this->files as $file) {
4141
$byteWritten = fwrite($file, $data, $length);
42-
if ($byteWritten !== false) {
43-
continue;
42+
if (!$byteWritten) {
43+
throw new FileHandlerException('Error writing to file');
4444
}
45-
46-
throw new FileHandlerException('Error writing to file');
4745
}
4846
}
4947

0 commit comments

Comments
 (0)