Code Duplication    Length = 9-9 lines in 2 locations

src/Controller/Component/MaintenanceComponent.php 2 locations

@@ 72-80 (lines=9) @@
69
                //To prevent multiple flash messages.
70
                $this->_controller->Flash->config(['clear' => true]);
71
                $this->_controller->Flash->error(__("Hello {0}, The website is under maintenance, only you and the staff groups have the access !", h($user->full_name)));
72
            } else {
73
                if (!in_array($controller . '.' . $action, $this->_allowedRoutes)) {
74
                    $this->_controller->redirect([
75
                        'controller' => 'pages',
76
                        'action' => 'maintenance',
77
                        'prefix' => false
78
                    ]);
79
                }
80
            }
81
        } else {
82
            if (!in_array($controller . '.' . $action, $this->_allowedRoutes)) {
83
                $this->_controller->redirect([
@@ 81-89 (lines=9) @@
78
                    ]);
79
                }
80
            }
81
        } else {
82
            if (!in_array($controller . '.' . $action, $this->_allowedRoutes)) {
83
                $this->_controller->redirect([
84
                    'controller' => 'pages',
85
                    'action' => 'maintenance',
86
                    'prefix' => false
87
                ]);
88
            }
89
        }
90
    }
91
}
92