Passed
Push — Accessing-and-setting-the-site... ( 46dc3a...28c402 )
by Stone
01:51
created
App/Models/ConfigModel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         return $returnData;
41 41
     }
42 42
 
43
-    public function updateConfig(int $id, string $param){
43
+    public function updateConfig(int $id, string $param) {
44 44
         echo $id.' - '.$param.'<br>';
45 45
         //TODO need to push to sql
46 46
     }
Please login to merge, or discard this patch.
App/Controllers/Admin/Update.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,21 +10,21 @@
 block discarded – undo
10 10
 
11 11
     use StringFunctions;
12 12
 
13
-    public function index(){
13
+    public function index() {
14 14
         echo'TEST';
15 15
     }
16 16
 
17
-    public function updateConfig(){
17
+    public function updateConfig() {
18 18
         $this->onlyAdmin();
19
-        if(!$this->container->getRequest()->isPost()){
19
+        if (!$this->container->getRequest()->isPost()) {
20 20
             $this->alertBox->setAlert('Only post messages allowed', 'error');
21 21
             $this->container->getResponse()->redirect('admin');
22 22
         }
23 23
         $configModel = new ConfigModel($this->container);
24 24
         $posts = $this->container->getRequest()->getDataFull();
25 25
 
26
-        foreach($posts as $key=>$config){
27
-            $configid = $this->removeFromBeginning($key,'config-');
26
+        foreach ($posts as $key=>$config) {
27
+            $configid = $this->removeFromBeginning($key, 'config-');
28 28
             $configModel->updateConfig($configid, $config);
29 29
         }
30 30
         echo '<pre>';
Please login to merge, or discard this patch.