Showing 599 of 599 total issues

Method writeMessages has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function writeMessages($file) {
        \core\common\Entity::intoThePotatoes();
        $messages = [
        'quit'=> _("Really quit?"),
        'username_prompt'=> _("enter your userid"),
Severity: Minor
Found in devices/linux/DeviceLinux.php - About 1 hr to fix

    Method eapBlock has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function eapBlock($caRefs)
        {
            $selectedEap = $this->selectedEap;
            $outerId = $this->determineOuterIdString();
            $eapPrettyprint = \core\common\EAP::eapDisplayName($selectedEap);
    Severity: Minor
    Found in devices/chromebook/DeviceChromebook.php - About 1 hr to fix

      Method saveNetworkProfileSeparateHS has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function saveNetworkProfileSeparateHS($profileName, $network)
          {
              $out = '';
              if (!empty($network['ssid'])) {
                  if ($this::separateSSIDprofiles === true && !empty($network['condition']) && $network['condition'] === 'locally_defined') {
      Severity: Minor
      Found in devices/ms/DeviceW8W10.php - About 1 hr to fix

        Method generateNewInstaller has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        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);
        Severity: Minor
        Found in core/UserAPI.php - About 1 hr to fix

          Method __construct has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function __construct()
              {
                      
                  if ( \config\ConfAssistant::eduPKI['testing'] === true ) {
                      $this->locationRaCert = ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.pem";
          Severity: Minor
          Found in core/CertificationAuthorityEduPkiServer.php - About 1 hr to fix

            Method addCrltoCert has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private function addCrltoCert(&$cert) {
                    $crlUrl = [];
                    $returnresult = 0;
                    if (!isset($cert['full_details']['extensions']['crlDistributionPoints'])) {
                        return RADIUSTests::CERTPROB_NO_CDP;
            Severity: Minor
            Found in core/diag/RADIUSTests.php - About 1 hr to fix

              Function row_filter has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              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');
              Severity: Minor
              Found in web/admin/js/nro.js - About 1 hr to fix

                Method deleteObsoleteTempDirs has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public static function deleteObsoleteTempDirs() {
                        $downloadsDirs = [
                            'site_installers' => dirname(dirname(dirname(dirname(__FILE__)))) . "/var/installer_cache",
                            'silverbullet' => dirname(dirname(dirname(dirname(__FILE__)))) . "/var/silverbullet"
                        ];
                Severity: Minor
                Found in web/lib/admin/Maintenance.php - About 1 hr to fix

                  Method saveCertificateFiles has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      final protected function saveCertificateFiles($format)
                      {
                          switch ($format) {
                              case "der": // fall-thorugh, same treatment
                              case "pem":
                  Severity: Minor
                  Found in core/DeviceConfig.php - About 1 hr to fix

                    Method __construct has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function __construct($realm, $outerUsernameForChecks, $supportedEapTypes = [], $expectedServerNames = [], $expectedCABundle = []) {
                            parent::__construct();
                    
                            $this->realm = $realm;
                            $this->outerUsernameForChecks = $outerUsernameForChecks;
                    Severity: Minor
                    Found in core/diag/RADIUSTests.php - About 1 hr to fix

                      Method setRADIUSconfig has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      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'] . '&';
                      Severity: Minor
                      Found in core/DeploymentManaged.php - About 1 hr to fix

                        Method opensslClientsResult has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        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'];
                        Severity: Minor
                        Found in core/diag/RFC6614Tests.php - About 1 hr to fix

                          Method testMailer has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                          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;
                          Severity: Minor
                          Found in core/SanityTests.php - About 1 hr to fix

                            Method writeMessages has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                private function writeMessages($file) {
                                    \core\common\Entity::intoThePotatoes();
                                    $messages = [
                                    'QUIT'=> _("Really quit?"),
                                    'USERNAME_PROMPT'=> _("enter your userid"),
                            Severity: Minor
                            Found in devices/linux/DeviceLinuxSh.php - About 1 hr to fix

                              Method testDeviceCache has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  private function testDeviceCache()
                                  {
                                      if ((!empty(\devices\Devices::$Options['no_cache'])) && \devices\Devices::$Options['no_cache']) {
                                          $global_no_cache = 1;
                                      } else {
                              Severity: Minor
                              Found in core/SanityTests.php - About 1 hr to fix

                                Method testPhpModules has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    private function testPhpModules()
                                    {
                                        if (function_exists('idn_to_ascii')) {
                                            $this->storeTestResult(\core\common\Entity::L_OK, "PHP can handle internationalisation.");
                                        } else {
                                Severity: Minor
                                Found in core/SanityTests.php - About 1 hr to fix

                                  Method __construct has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function __construct(int $instId)
                                      {
                                          $this->databaseType = "INST";
                                          parent::__construct(); // now databaseHandle and logging is available
                                          $this->entityOptionTable = "institution_option";
                                  Severity: Minor
                                  Found in core/IdP.php - About 1 hr to fix

                                    Method revokeCertificate has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function revokeCertificate($serial): void
                                        {
                                            try {
                                                $soap = $this->initEduPKISoapSession("RA");
                                                $soapRevocationSerial = $soap->newRevocationRequest(["Serial", $serial], "");
                                    Severity: Minor
                                    Found in core/CertificationAuthorityEduPkiServer.php - About 1 hr to fix

                                      Method wpaSupplicantConfig has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                      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"
                                      Severity: Minor
                                      Found in core/diag/RADIUSTests.php - About 1 hr to fix

                                        Method revokeCertificate has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function revokeCertificate($serial): void
                                            {
                                                try {
                                                    $soap = $this->initEduPKISoapSession("RA");
                                                    $soapRevocationSerial = $soap->newRevocationRequest(["Serial", $serial], "");
                                        Severity: Minor
                                        Found in core/CertificationAuthorityEduPki.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language