Passed
Pull Request — master (#12)
by Matthew
15:12 queued 23s
created
src/Extensions/ManageableDataObjectExtension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,14 +39,14 @@  discard block
 block discarded – undo
39 39
         if ($object->canCreate(Security::getCurrentUser())) {
40 40
 
41 41
             $form = $this->ManageableDataObjectForm();
42
-            if($object->config()->get('add_form_cancel_button')){
42
+            if ($object->config()->get('add_form_cancel_button')) {
43 43
                 $form->Actions()->push(new CancelFormAction($this->owner->Link(), 'Cancel'));
44 44
             }
45 45
 
46 46
             return $this->owner->customise([
47 47
                 'Title' => ($this->owner->config()->get('add_item_title'))
48 48
                     ? $this->owner->config()->get('add_item_title')
49
-                    : 'Add new ' . $object->singular_name(),
49
+                    : 'Add new '.$object->singular_name(),
50 50
                 'ManageableDataObjectForm' => $form,
51 51
             ]);
52 52
         }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
                 $form = $this->ManageableDataObjectForm($item);
72 72
 
73 73
                 return $this->owner->customise([
74
-                    'Title' => 'Edit ' . $item->singular_name(),
74
+                    'Title' => 'Edit '.$item->singular_name(),
75 75
                     'ManageableDataObjectForm' => $form,
76 76
                     'Item' => $item,
77 77
                 ]);
Please login to merge, or discard this patch.
tests/Extensions/ManageableDataObjectExtensionTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -65,11 +65,11 @@  discard block
 block discarded – undo
65 65
     {
66 66
         $this->logInWithPermission('MDO_Edit');
67 67
         $object = $this->objFromFixture(SampleManageableDataObject::class, 'one');
68
-        $response = $this->get('/SampleManageableObjectPage_Controller/edit/' . $object->ID);
68
+        $response = $this->get('/SampleManageableObjectPage_Controller/edit/'.$object->ID);
69 69
         $this->assertEquals(200, $response->getStatusCode());
70 70
         $this->logOut();
71 71
 
72
-        $response2 = $this->get('/SampleManageableObjectPage_Controller/edit/' . 0);
72
+        $response2 = $this->get('/SampleManageableObjectPage_Controller/edit/'.0);
73 73
         $this->assertEquals(404, $response2->getStatusCode());
74 74
     }
75 75
 
@@ -86,10 +86,10 @@  discard block
 block discarded – undo
86 86
 
87 87
         $this->logInWithPermission('MDO_Delete');
88 88
 
89
-        $response404 = $this->get('/SampleManageableObjectPage_Controller/delete/' . 0);
89
+        $response404 = $this->get('/SampleManageableObjectPage_Controller/delete/'.0);
90 90
         $this->assertEquals(404, $response404->getStatusCode());
91 91
 
92
-        $success = $this->get('/SampleManageableObjectPage_Controller/delete/' . $id);
92
+        $success = $this->get('/SampleManageableObjectPage_Controller/delete/'.$id);
93 93
         $this->assertEquals(200, $success->getStatusCode());
94 94
         $this->assertNull(SampleManageableDataObject::get()->byID($id));
95 95
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
         $record = SampleManageableDataObject::get()->filter($data)->first();
116 116
         $this->assertInstanceOf(SampleManageableDataObject::class, $record);
117
-        $this->assertTrue($record->exists());//*/
117
+        $this->assertTrue($record->exists()); //*/
118 118
     }
119 119
 
120 120
 }
Please login to merge, or discard this patch.