Showing 599 of 599 total issues
Method writeMessages
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function writeMessages($file) {
\core\common\Entity::intoThePotatoes();
$messages = [
'quit'=> _("Really quit?"),
'username_prompt'=> _("enter your userid"),
Method eapBlock
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function eapBlock($caRefs)
{
$selectedEap = $this->selectedEap;
$outerId = $this->determineOuterIdString();
$eapPrettyprint = \core\common\EAP::eapDisplayName($selectedEap);
Method saveNetworkProfileSeparateHS
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function saveNetworkProfileSeparateHS($profileName, $network)
{
$out = '';
if (!empty($network['ssid'])) {
if ($this::separateSSIDprofiles === true && !empty($network['condition']) && $network['condition'] === 'locally_defined') {
Method generateNewInstaller
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function generateNewInstaller($device, $profile, $generatedFor, $openRoaming, $token, $password)
{
$this->loggerInstance->debug(5, "generateNewInstaller() - Enter");
$this->loggerInstance->debug(5, "generateNewInstaller:openRoaming:$openRoaming\n");
$factory = new DeviceFactory($device);
Method __construct
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct()
{
if ( \config\ConfAssistant::eduPKI['testing'] === true ) {
$this->locationRaCert = ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.pem";
Method addCrltoCert
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function addCrltoCert(&$cert) {
$crlUrl = [];
$returnresult = 0;
if (!isset($cert['full_details']['extensions']['crlDistributionPoints'])) {
return RADIUSTests::CERTPROB_NO_CDP;
Function row_filter
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function row_filter(tbody) {
var linked = tbody.find('[id^="unlinked_ck_"]').is(':checked');
var broken_cert = tbody.find('[id^="brokencert_ck_"]').is(':checked');
var or_warn = tbody.find('[id^="or_ck_"]').is(':checked');
var profile_warn = tbody.find('[id^="profile_ck_"]').is(':checked');
Method deleteObsoleteTempDirs
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function deleteObsoleteTempDirs() {
$downloadsDirs = [
'site_installers' => dirname(dirname(dirname(dirname(__FILE__)))) . "/var/installer_cache",
'silverbullet' => dirname(dirname(dirname(dirname(__FILE__)))) . "/var/silverbullet"
];
Method saveCertificateFiles
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
final protected function saveCertificateFiles($format)
{
switch ($format) {
case "der": // fall-thorugh, same treatment
case "pem":
Method __construct
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct($realm, $outerUsernameForChecks, $supportedEapTypes = [], $expectedServerNames = [], $expectedCABundle = []) {
parent::__construct();
$this->realm = $realm;
$this->outerUsernameForChecks = $outerUsernameForChecks;
Method setRADIUSconfig
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setRADIUSconfig($onlyone = 0, $notify = 0)
{
$remove = ($this->status == \core\AbstractDeployment::INACTIVE) ? 0 : 1;
$toPost = ($onlyone ? array($onlyone => '') : array(1 => '', 2 => ''));
$toPostTemplate = 'instid=' . $this->institution . '&deploymentid=' . $this->identifier . '&secret=' . $this->secret . '&country=' . $this->getAttributes("internal:country")[0]['value'] . '&';
Method opensslClientsResult
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function opensslClientsResult($host, $opensslbabble, &$testresults, $type = '', $resultArrayKey = 0)
{
\core\common\Entity::intoThePotatoes();
$res = RADIUSTests::RETVAL_OK;
$ret = $testresults[$host]['ca'][$type]['certificate'][$resultArrayKey]['returncode'];
Method testMailer
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function testMailer()
{
if (empty(\config\Master::APPEARANCE['abuse-mail']) || \config\Master::APPEARANCE['abuse-mail'] == "my-abuse-contact@your-cat-installation.example") {
$this->storeTestResult(\core\common\Entity::L_ERROR, "Your abuse-mail has not been set, cannot continue with mailer tests.");
return;
Method writeMessages
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function writeMessages($file) {
\core\common\Entity::intoThePotatoes();
$messages = [
'QUIT'=> _("Really quit?"),
'USERNAME_PROMPT'=> _("enter your userid"),
Method testDeviceCache
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function testDeviceCache()
{
if ((!empty(\devices\Devices::$Options['no_cache'])) && \devices\Devices::$Options['no_cache']) {
$global_no_cache = 1;
} else {
Method testPhpModules
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function testPhpModules()
{
if (function_exists('idn_to_ascii')) {
$this->storeTestResult(\core\common\Entity::L_OK, "PHP can handle internationalisation.");
} else {
Method __construct
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct(int $instId)
{
$this->databaseType = "INST";
parent::__construct(); // now databaseHandle and logging is available
$this->entityOptionTable = "institution_option";
Method revokeCertificate
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function revokeCertificate($serial): void
{
try {
$soap = $this->initEduPKISoapSession("RA");
$soapRevocationSerial = $soap->newRevocationRequest(["Serial", $serial], "");
Method wpaSupplicantConfig
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function wpaSupplicantConfig(array $eaptype, string $inner, string $outer, string $password) {
$eapText = \core\common\EAP::eapDisplayName($eaptype);
$config = '
network={
ssid="' . \config\Master::APPEARANCE['productname'] . ' testing"
Method revokeCertificate
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function revokeCertificate($serial): void
{
try {
$soap = $this->initEduPKISoapSession("RA");
$soapRevocationSerial = $soap->newRevocationRequest(["Serial", $serial], "");