Code Duplication    Length = 6-6 lines in 2 locations

src/Controller/Admin/SettingsController.php 2 locations

@@ 52-57 (lines=6) @@
49
        if ($this->request->is('post')) {
50
            $setting->last_updated_user_id = $this->Auth->user('id');
51
52
            if ($this->Settings->save($setting)) {
53
                Cache::delete('settings', 'database');
54
                $this->Flash->success(__d('admin', 'This setting has been created successfully !'));
55
56
                return $this->redirect(['action' => 'index']);
57
            }
58
        }
59
60
        $this->set(compact('setting'));
@@ 88-93 (lines=6) @@
85
86
            $setting->last_updated_user_id = $this->Auth->user('id');
87
88
            if ($this->Settings->save($setting)) {
89
                Cache::delete('settings', 'database');
90
                $this->Flash->success(__d('admin', 'This setting has been edited successfully !'));
91
92
                return $this->redirect(['action' => 'index']);
93
            }
94
        }
95
96
        $this->set(compact('setting'));