Code Duplication    Length = 5-5 lines in 2 locations

src/Controller/Base.php 2 locations

@@ 129-133 (lines=5) @@
126
                $validated = false;
127
            }
128
129
            if (!$validated) {
130
                header('WWW-Authenticate: Basic realm="'.$this->config->getSecret('admin_authrealm').'"');
131
                header('HTTP/1.0 401 Unauthorized');
132
                $this->helper->terminateScript('Not authorized');
133
            }
134
135
        } else {
136
//            die('foo');
@@ 135-139 (lines=5) @@
132
                $this->helper->terminateScript('Not authorized');
133
            }
134
135
        } else {
136
//            die('foo');
137
            header('WWW-Authenticate: Basic realm="'.$this->config->getSecret('admin_authrealm').'"');
138
            header('HTTP/1.0 401 Unauthorized');
139
            $this->helper->terminateScript('Not authorized');
140
        }
141
    }
142
}