Code optimisations.

This commit is contained in:
James Cole
2018-07-22 18:50:27 +02:00
parent ea2c48bca5
commit ca096852a5
56 changed files with 221 additions and 427 deletions

View File

@@ -530,7 +530,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
*/
private function updateNote(PiggyBank $piggyBank, string $note): bool
{
if (0 === \strlen($note)) {
if ('' === $note) {
$dbNote = $piggyBank->notes()->first();
if (null !== $dbNote) {
$dbNote->delete();