Completed
Pull Request — master (#1)
by Nic
09:01
created
code/dataobjects/ProductWishList.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
     }
98 98
 
99 99
     /**
100
-     * @return String|bool
100
+     * @return string|false
101 101
      */
102 102
     public function getUpdateLink()
103 103
     {
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         $processTitle = ($this->getIsEditing()) ? "Update {$this->i18n_singular_name()}" : "Create {$this->i18n_singular_name()}";
51 51
         $actions = FieldList::create(
52 52
             FormAction::create('doProcessWishList')
53
-                      ->setTitle($processTitle)
53
+                        ->setTitle($processTitle)
54 54
         );
55 55
 
56 56
         if ($showCancel === true) {
Please login to merge, or discard this patch.
code/extensions/ProductWishListControllerExtension.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     ];
16 16
 
17 17
     /**
18
-     * @param null $wishList
18
+     * @param DataObject|null $wishList
19 19
      *
20 20
      * @return Form
21 21
      */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     /**
48 48
      * @return Object
49 49
      */
50
-    protected function getController(){
50
+    protected function getController() {
51 51
         return ($this->owner->hasMethod('getCurrentPage'))
52 52
             ? $this->owner->getCurrentPage()
53 53
             : $this->owner;
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     {
62 62
         $wishList = (isset($data['ID'])) ? ProductWishList::get()->byID($data['ID']) : ProductWishList::create();
63 63
         $form->saveInto($wishList);
64
-        if($wishList->write()){
64
+        if ($wishList->write()) {
65 65
             return $this->getController()->redirect($this->getController()->Link($wishList->getUpdateLink()));
66 66
         }
67 67
         return $this->getController()->redirect($this->getController()->Link('error'));
Please login to merge, or discard this patch.