codeformunich/Muenchen-Transparent

View on GitHub

Showing 176 of 1,630 total issues

Method getSolrQueryStr has 35 lines of code (exceeds 30 allowed). Consider refactoring.
Open

    public function getSolrQueryStr($select)
    {
        foreach ($this->krits as $krit) switch ($krit["typ"]) {
            case "betreff":
                $helper = $select->getHelper();
Severity: Minor
Found in protected/components/RISSucheKrits.php - About 1 hr to fix

    Method body has 35 lines of code (exceeds 30 allowed). Consider refactoring.
    Open

        private static function body($id) {
            /** @var Bezirksausschuss $ba */
            $ba = Bezirksausschuss::model()->findByPk($id);
    
            if ($id == 0) {
    Severity: Minor
    Found in protected/components/OParl10Object.php - About 1 hr to fix

      Method addKritsToSolr has 35 lines of code (exceeds 30 allowed). Consider refactoring.
      Open

          public function addKritsToSolr(&$select)
          {
              foreach ($this->krits as $krit) switch ($krit["typ"]) {
                  case "betreff":
                      $helper = $select->getHelper();
      Severity: Minor
      Found in protected/components/RISSucheKrits.php - About 1 hr to fix

        Method downloadFile has 35 lines of code (exceeds 30 allowed). Consider refactoring.
        Open

            public function downloadFile(string $url_to_read, string $filename, int $timeout = 30): void
            {
                if (defined("IN_TEST_MODE")) {
                    return;
                }
        Severity: Minor
        Found in protected/components/CurlBasedDownloader.php - About 1 hr to fix

          Function spiderListener has 34 lines of code (exceeds 30 allowed). Consider refactoring.
          Open

                  p.spiderListener = function (marker) {
                      var m, mPt, markerPt, markerSpiderfied, nearbyMarkerData, nonNearbyMarkers, pxSq, _i, _len, _ref;
                      markerSpiderfied = marker['_omsData'] != null;
                      if (!(markerSpiderfied && this['keepSpiderfied']) && !this['keepSpiderfied_override']) {
                          this['unspiderfy']();
          Severity: Minor
          Found in html/js/leaflet.spiderfy.js - About 1 hr to fix

            Method parseFromHtml has 34 lines of code (exceeds 30 allowed). Consider refactoring.
            Open

                public static function parseFromHtml(string $htmlFraktion, string $htmlAusschuss): ?self
                {
                    if (!preg_match('/<h1 class="page-title">\n<span[^>]*>(?<name>[^<]*) <span/siuU', $htmlFraktion, $match)) {
                        throw new ParsingException('Not found: name');
                    }
            Severity: Minor
            Found in protected/RISParser/StadtraetInnenData.php - About 1 hr to fix

              Method ergebnisse2FeedData has 34 lines of code (exceeds 30 allowed). Consider refactoring.
              Open

                  public static function ergebnisse2FeedData(ResultInterface $results): array
                  {
                      $data = [];
              
                      $dokumente    = $results->getDocuments();
              Severity: Minor
              Found in protected/components/RISSolrHelper.php - About 1 hr to fix

                Function load has 34 lines of code (exceeds 30 allowed). Consider refactoring.
                Open

                        load: function(q) {
                            if (!options.cacheLength || !length)
                                return null;
                            /* 
                             * if dealing w/local data and matchContains than we must make sure
                Severity: Minor
                Found in docs/solr-core/conf/velocity/jquery.autocomplete.js - About 1 hr to fix

                  Method normalize_antragvon has 34 lines of code (exceeds 30 allowed). Consider refactoring.
                  Open

                      public static function normalize_antragvon(string $str): array
                      {
                          $a   = explode(",", $str);
                          $ret = [];
                          foreach ($a as $y) {
                  Severity: Minor
                  Found in protected/components/RISTools.php - About 1 hr to fix

                    Method createIfNotExistsReferentIn has 33 lines of code (exceeds 30 allowed). Consider refactoring.
                    Open

                        public function createIfNotExistsReferentIn(ReferatData $data, Referat $referat): void
                        {
                            /** @var StadtraetIn $str */
                            $str = StadtraetIn::model()->findByPk($data->referentInId);
                            if ($str) {
                    Severity: Minor
                    Found in protected/RISParser/ReferentInnenParser.php - About 1 hr to fix

                      Function onClick has 33 lines of code (exceeds 30 allowed). Consider refactoring.
                      Open

                          onClick: function (e) {
                              var $widget = this;
                      
                              if ($widget.map.getZoom() < $widget.options.benachrichtigungen_widget_zoom) return;
                              if ($widget.editer !== null) return;
                      Severity: Minor
                      Found in html/js/antraegekarte.jquery.js - About 1 hr to fix

                        Method vorgangMerge has 33 lines of code (exceeds 30 allowed). Consider refactoring.
                        Open

                            public static function vorgangMerge($vorgang_von_id, $vorgang_zu_id)
                            {
                                $vorgang_von_id = IntVal($vorgang_von_id);
                                $vorgang_zu_id  = IntVal($vorgang_zu_id);
                        
                        
                        Severity: Minor
                        Found in protected/models/Vorgang.php - About 1 hr to fix

                          Method downloadDocumentTypeListForPeriod has 33 lines of code (exceeds 30 allowed). Consider refactoring.
                          Open

                              public function downloadDocumentTypeListForPeriod(string $type, \DateTime $from, \DateTime $to): string
                              {
                                  $html = '';
                          
                                  $this->open();
                          Severity: Minor
                          Found in protected/components/BrowserBasedDowloader.php - About 1 hr to fix

                            Method send_email has 32 lines of code (exceeds 30 allowed). Consider refactoring.
                            Open

                                public static function send_email($email, $betreff, $text_plain, $text_html = null, $mail_tag = null)
                                {
                                    if (defined("MAILJET_PUBLIC_KEY") && defined("MAILJET_PRIVATE_KEY") && $mail_tag != "system" && stripos($email, '@muenchen.de') === false) {
                                        $mailjetMessage = [
                                            'From'     => [
                            Severity: Minor
                            Found in protected/components/RISTools.php - About 1 hr to fix

                              Function request has 32 lines of code (exceeds 30 allowed). Consider refactoring.
                              Open

                                  function request(term, success, failure) {
                                      if (!options.matchCase)
                                          term = term.toLowerCase();
                                      var data = cache.load(term);
                                      data = null; // Avoid buggy cache and go to Solr every time 
                              Severity: Minor
                              Found in docs/solr-core/conf/velocity/jquery.autocomplete.js - About 1 hr to fix

                                Method getUrl has 32 lines of code (exceeds 30 allowed). Consider refactoring.
                                Open

                                    public function getUrl($path = "index/suche")
                                    {
                                        $str = "";
                                        foreach ($this->krits as $krit) {
                                            if ($str != "") $str .= "&";
                                Severity: Minor
                                Found in protected/components/RISSucheKrits.php - About 1 hr to fix

                                  Method pointInBA has 32 lines of code (exceeds 30 allowed). Consider refactoring.
                                  Open

                                      public function pointInBA($point_lon, $point_lat)
                                      {
                                          // Check if the point is inside the polygon or on the boundary
                                          if ($this->kontur_cache === null) {
                                              $this->kontur_cache = json_decode($this->osm_shape);
                                  Severity: Minor
                                  Found in protected/models/Bezirksausschuss.php - About 1 hr to fix

                                    Method solrIndex_termin_do has 32 lines of code (exceeds 30 allowed). Consider refactoring.
                                    Open

                                        private function solrIndex_termin_do(Solarium\QueryType\Update\Query\Query $update): void
                                        {
                                            $gremienname = ($this->termin->gremium ? $this->termin->gremium->name : "");
                                            /** @var RISSolrDocument $doc */
                                            $doc                     = $update->createDocument();
                                    Severity: Minor
                                    Found in protected/models/Dokument.php - About 1 hr to fix

                                      Function index_geo_dokumente_load has 31 lines of code (exceeds 30 allowed). Consider refactoring.
                                      Open

                                      function index_geo_dokumente_load(url, lng, lat, radius) {
                                          var $holder = $("#stadtratsdokumente_holder"),
                                              topc = $("#main_navbar").height() * -1,
                                              $benachrichtigung_hinweis = $("#benachrichtigung_hinweis_text");
                                      
                                      
                                      Severity: Minor
                                      Found in html/js/custom/dokumente-load.js - About 1 hr to fix

                                        Method actionNeuesPasswortSetzen has 31 lines of code (exceeds 30 allowed). Consider refactoring.
                                        Open

                                            public function actionNeuesPasswortSetzen($id = "", $code = "")
                                            {
                                                $my_url = $this->createUrl("benachrichtigungen/NeuesPasswortSetzen", ["id" => $id, "code" => $code]);
                                                if (AntiXSS::isTokenSet("reset_password")) {
                                                    /** @var null|BenutzerIn $benutzerIn */
                                        Severity: Minor
                                        Found in protected/controllers/BenachrichtigungenController.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language