Showing 599 of 599 total issues

Method isEapTypeDefinitionComplete has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function isEapTypeDefinitionComplete($eaptype)
    {
        if ($eaptype->needsServerCACert() && $eaptype->needsServerName()) {
            $missing = [];
            // silverbullet needs a support email address configured
Severity: Minor
Found in core/AbstractProfile.php - About 1 hr to fix

    Method getDisplayName has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function getDisplayName()
        {
            $attr = $this->attributes;
            $objs = [];
            if ($this->langScope === 'global') {
    Severity: Minor
    Found in devices/eap_config/DeviceXML.php - About 1 hr to fix

      Method divRoller has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function divRoller() {
              $retval = "
      <div id='roller'>
          <div id='slides'>
              <span id='line1'>".$this->Gui->textTemplates->templates[user\FRONTPAGE_ROLLER_EASY]."</span>
      Severity: Minor
      Found in web/skins/modern/Divs.php - About 1 hr to fix

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

            public function __construct()
            {
                $this->databaseType = "INST";
                parent::__construct();
                $this->rootPem = file_get_contents(CertificationAuthorityEmbeddedRSA::LOCATION_ROOT_CA);
        Severity: Minor
        Found in core/CertificationAuthorityEmbeddedRSA.php - About 1 hr to fix

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

              public function __construct()
              {
                  $this->databaseType = "INST";
                  parent::__construct();
                  $this->rootPem = file_get_contents(CertificationAuthorityEmbeddedECDSA::LOCATION_ROOT_CA);
          Severity: Minor
          Found in core/CertificationAuthorityEmbeddedECDSA.php - About 1 hr to fix

            Method downloadStats has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function downloadStats($format, $detail = '')
                {
                    $data = $this->downloadStatsCore($detail);
                    $retstring = "";
            
            
            Severity: Minor
            Found in core/Federation.php - About 1 hr to fix

              Method testMakensis has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function testMakensis()
                  {
                      if (!is_numeric(\config\ConfAssistant::NSIS_VERSION)) {
                          $this->storeTestResult(\core\common\Entity::L_ERROR, "NSIS_VERSION needs to be numeric!");
                          return;
              Severity: Minor
              Found in core/SanityTests.php - About 1 hr to fix

                Method determineOwnCatalogue has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private static function determineOwnCatalogue($showTrace = FALSE)
                    {
                        $trace = debug_backtrace();
                        $caller = [];
                        // find the first caller in the stack trace which is NOT "Entity" itself
                Severity: Minor
                Found in core/common/Entity.php - About 1 hr to fix

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

                      public function __construct($userId)
                      {
                          $this->databaseType = "USER";
                          parent::__construct(); // database handle is now available
                          $this->attributes = [];
                  Severity: Minor
                  Found in core/User.php - About 1 hr to fix

                    Method propertyCheckIntermediate has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private function propertyCheckIntermediate(&$intermediateCa, $serverCert = FALSE) {
                            $returnarray = [];
                            if (preg_match("/md5/i", $intermediateCa['full_details']['signatureTypeSN'])) {
                                $returnarray[] = RADIUSTests::CERTPROB_MD5_SIGNATURE;
                            }
                    Severity: Minor
                    Found in core/diag/RADIUSTests.php - About 1 hr to fix

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

                          public function __construct($listOfIPs, $expectedName, $consortium = "eduroam")
                          {
                              parent::__construct();
                              \core\common\Entity::intoThePotatoes();
                              $this->TLS_certkeys = [
                      Severity: Minor
                      Found in core/diag/RFC6614Tests.php - About 1 hr to fix

                        Function uglify has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function uglify($parameters) {
                                $coercedInline = [];
                                $coercedFile = [];
                                $optionObject = \core\Options::instance();
                                $dir = \core\common\Entity::createTemporaryDirectory('test');
                        Severity: Minor
                        Found in web/lib/admin/API.php - About 1 hr to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function getWindowHeight has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function getWindowHeight() {
                            var windowHeight = 0;
                            if (typeof (window.innerHeight) === 'number') {
                                windowHeight = window.innerHeight;
                            } else {
                        Severity: Minor
                        Found in web/admin/js/popup_redirect.js - About 1 hr to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function findResourceUrl has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function findResourceUrl($resourcetype, $filename, $submodule = '') {
                                switch ($resourcetype) {
                                    case "CSS":
                                        $path = "/resources/css/";
                                        break;
                        Severity: Minor
                        Found in web/lib/user/Skinjob.php - About 1 hr to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function testNSISmodules has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                        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");
                        Severity: Minor
                        Found in core/SanityTests.php - About 1 hr to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function getLogo has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                        Open

                            protected function getLogo($identifier, $type, $widthIn, $heightIn)
                            {
                                $expiresString = '';
                                $attributeName = [
                                    'federation' => "fed:logo_file",
                        Severity: Minor
                        Found in core/UserAPI.php - About 1 hr to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function listDevices has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function listDevices($showHidden = 0)
                            {
                                $returnList = [];
                                $count = 0;
                                if ($showHidden !== 0 && $showHidden != 1) {
                        Severity: Minor
                        Found in core/UserAPI.php - About 1 hr to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function sendSMS has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public static function sendSMS($number, $content)
                            {
                                $loggerInstance = new \core\common\Logging();
                                switch (\config\ConfAssistant::SMSSETTINGS['provider']) {
                                    case 'Nexmo':
                        Severity: Minor
                        Found in core/common/OutsideComm.php - About 1 hr to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function propertyCheckIntermediate has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                        Open

                            private function propertyCheckIntermediate(&$intermediateCa, $serverCert = FALSE) {
                                $returnarray = [];
                                if (preg_match("/md5/i", $intermediateCa['full_details']['signatureTypeSN'])) {
                                    $returnarray[] = RADIUSTests::CERTPROB_MD5_SIGNATURE;
                                }
                        Severity: Minor
                        Found in core/diag/RADIUSTests.php - About 1 hr to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function sendMailtoAdmin has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                        Open

                            private function sendMailtoAdmin($remove, $response, $status)
                            {
                                $txt = '';
                                if ($status == 'OK') {
                                    $txt = $remove ? _('Profile deactivation succeeded') : _('Profile activation/modification succeeded');
                        Severity: Minor
                        Found in core/DeploymentManaged.php - About 1 hr to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Severity
                        Category
                        Status
                        Source
                        Language