Showing 599 of 599 total issues
Method findResourceUrl
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function findResourceUrl($resourcetype, $filename, $submodule = '') {
switch ($resourcetype) {
case "CSS":
$path = "/resources/css/";
break;
Method realm
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function realm($input)
{
\core\common\Entity::intoThePotatoes();
if (strlen($input) == 0) {
echo $this->inputValidationError(_("Realm is empty!"));
Method sanityTestResultHTML
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function sanityTestResultHTML($test) {
$out = '';
switch ($test->test_result['global']) {
case \core\common\Entity::L_OK:
$message = "Your configuration appears to be fine.";
Method writeDeviceInfo
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function writeDeviceInfo()
{
\core\common\Entity::intoThePotatoes();
$ssidCount = 0;
$oiCount = 0;
Method writeMainNSH
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function writeMainNSH($eap, $attr) {
$this->loggerInstance->debug(4, "writeMainNSH");
$this->loggerInstance->debug(4, $attr);
$this->loggerInstance->debug(4, "MYLANG=" . $this->lang . "\n");
Method getExternalDBSyncCandidates
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getExternalDBSyncCandidates($type)
{
$usedarray = [];
$matchingCandidates = [];
$syncstate = self::EXTERNAL_DB_SYNCSTATE_SYNCED;
Method testNSISmodules
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function testNSISmodules()
{
$tmp_dir = \core\common\Entity::createTemporaryDirectory('installer', 0)['dir'];
if (!chdir($tmp_dir)) {
$this->loggerInstance->debug(2, "Cannot chdir to $tmp_dir\n");
Method initialise
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function initialise()
{
// find out where the admin is located approximately
$ourLocation = ['lon' => 0, 'lat' => 0];
$geoip = DeviceLocation::locateDevice();
Method __construct
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct()
{
$this->loggerInstance = new Logging();
$this->loggerInstance->debug(4, "--- BEGIN constructing class " . get_class($this) . " .\n");
$this->languageInstance = new Language();
Method sendToRADIUS
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function sendToRADIUS(int $idx, $post)
{
$hostname = "radius_hostname_$idx";
$ch = curl_init("http://" . $this->$hostname);
Method packetCountEvaluation
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function packetCountEvaluation(&$testresults, $packetcount) {
$reqs = $packetcount[1] ?? 0;
$accepts = $packetcount[2] ?? 0;
$rejects = $packetcount[3] ?? 0;
$challenges = $packetcount[11] ?? 0;
Method __construct
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct($profileIdRaw, $idpObject = NULL)
{
$this->databaseType = "INST";
parent::__construct(); // we now have access to our INST database handle and logging
$handle = DBConnection::handle("FRONTEND");
Method existingIdPInt
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function existingIdPInt($input, $owner = NULL, $claimedFedBinding = NULL)
{
$clean = $this->integer($input);
if ($clean === FALSE) {
throw new Exception($this->inputValidationError("Value for IdP is not an integer!"));
Method printMenu
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function printMenu($menu = NULL, $id = NULL) {
$menu = $menu ?? $this->menu;
if (count($menu) == 0) {
return;
}
Method writeDeviceInfo
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function writeDeviceInfo()
{
\core\common\Entity::intoThePotatoes();
$networkList = [];
foreach (array_keys($this->getAttribute('internal:networks')) as $networkName) {
Method defaultPagePrelude
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function defaultPagePrelude($pagetitle = \config\Master::APPEARANCE['productname_long']) {
$ourlocale = $this->languageInstance->getLang();
$direction = $this->languageInstance->rtl;
header("Content-Type:text/html;charset=utf-8");
?>
Method handle
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function handle($database)
{
$theDb = strtoupper($database);
switch ($theDb) {
case "INST":
Method revaluate
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function revaluate($questionNumber, $answer)
{
if ($questionNumber == "") {
throw new Exception("We really need a question number!");
}
Method generateCompatibleCsr
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function generateCompatibleCsr($privateKey, $fed, $username): array
{
$tempdirArray = \core\common\Entity::createTemporaryDirectory("test");
$tempdir = $tempdirArray['dir'];
// dump private key into directory
Method checkFedEtlrUplink
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function checkFedEtlrUplink($whichSide)
{
// TODO: we always check the European TLRs even though the connection in question might go via others and/or this one
// needs a table to determine what goes where :-(
switch ($whichSide) {