From d477694f09f562fb81c2cff070beaebd5dc4a3ce Mon Sep 17 00:00:00 2001 From: James Date: Tue, 28 Oct 2014 16:04:27 +0100 Subject: [PATCH 1/3] Inline condition removed for easier reading Previous inline condition would cause confusion or trigger notifications in IDE (Netbeans,...) --- cookbook/doctrine/file_uploads.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cookbook/doctrine/file_uploads.rst b/cookbook/doctrine/file_uploads.rst index 95a06bd7672..16d9ea71a03 100644 --- a/cookbook/doctrine/file_uploads.rst +++ b/cookbook/doctrine/file_uploads.rst @@ -404,7 +404,8 @@ Next, refactor the ``Document`` class to take advantage of these callbacks:: */ public function removeUpload() { - if ($file = $this->getAbsolutePath()) { + $file == $this->getAbsolutePath(); ++ if ($file) { unlink($file); } } From a4535d7eb3f0f96266f9b3f756b30b83bff2d153 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 30 Oct 2014 16:58:12 +0100 Subject: [PATCH 2/3] assignment typo --- cookbook/doctrine/file_uploads.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/doctrine/file_uploads.rst b/cookbook/doctrine/file_uploads.rst index 16d9ea71a03..ceed2713cd4 100644 --- a/cookbook/doctrine/file_uploads.rst +++ b/cookbook/doctrine/file_uploads.rst @@ -404,7 +404,7 @@ Next, refactor the ``Document`` class to take advantage of these callbacks:: */ public function removeUpload() { - $file == $this->getAbsolutePath(); + $file = $this->getAbsolutePath(); + if ($file) { unlink($file); } From 39b6156b0032ebfca39dedfc56414cf6bd730d91 Mon Sep 17 00:00:00 2001 From: James Date: Fri, 31 Oct 2014 10:19:05 +0100 Subject: [PATCH 3/3] plus sign removed --- cookbook/doctrine/file_uploads.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/doctrine/file_uploads.rst b/cookbook/doctrine/file_uploads.rst index ceed2713cd4..fa400525187 100644 --- a/cookbook/doctrine/file_uploads.rst +++ b/cookbook/doctrine/file_uploads.rst @@ -405,7 +405,7 @@ Next, refactor the ``Document`` class to take advantage of these callbacks:: public function removeUpload() { $file = $this->getAbsolutePath(); -+ if ($file) { + if ($file) { unlink($file); } }