Skip to content

Commit

Permalink
Refactor code to improve readability and remove unnecessary variable …
Browse files Browse the repository at this point in the history
…assignments
  • Loading branch information
parsilver committed Jul 1, 2024
1 parent 75808c1 commit 42ba550
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Outputs/ConsoleOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public function write(string $payload): mixed
->encoding(new Encoding('UTF-8'))
->build();

return $this->output->writeln($qrCode->getString());
$this->output->writeln($result = $qrCode->getString());

return $result;
}
}
4 changes: 3 additions & 1 deletion src/Outputs/FilesystemOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public function write(string $payload): mixed
->margin(0)
->build();

return $qrCode->saveToFile($this->path);
$qrCode->saveToFile($this->path);

return $this->path;
}
}

0 comments on commit 42ba550

Please sign in to comment.