codeformunich/Muenchen-Transparent

View on GitHub

Showing 176 of 1,630 total issues

Method getBeschreibungDerSuche has 97 lines of code (exceeds 30 allowed). Consider refactoring.
Open

    public function getBeschreibungDerSuche($dokument = null)
    {
        if (count($this->krits) == 1) switch ($this->krits[0]["typ"]) {
            case "betreff":
                $such = $this->krits[0]["suchbegriff"];
Severity: Major
Found in protected/components/RISSucheKrits.php - About 3 hrs to fix

    File anzeige.php has 318 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /**
     * @var Antrag $antrag
     * @var AntraegeController $this
     * @var bool $tag_mode
    Severity: Minor
    Found in protected/views/antraege/anzeige.php - About 3 hrs to fix

      Method parse has 95 lines of code (exceeds 30 allowed). Consider refactoring.
      Open

          public function parse(int $id): StadtraetIn
          {
              if (SITE_CALL_MODE != "cron") echo "- StadträtIn $id\n";
      
              $htmlFraktionen = $this->curlBasedDownloader->loadUrl(RIS_URL_PREFIX . 'person/detail/' . $id . '?tab=fraktionen');
      Severity: Major
      Found in protected/RISParser/StadtraetInnenParser.php - About 3 hrs to fix

        Method run has 93 lines of code (exceeds 30 allowed). Consider refactoring.
        Open

            public function run($args)
            {
        
                $sitemap_files = [];
        
        
        Severity: Major
        Found in protected/commands/GoogleSitemapCreateCommand.php - About 3 hrs to fix

          Antrag has 29 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class Antrag extends CActiveRecord implements IRISItemHasDocuments
          {
          
              public const TYP_STADTRAT_ANTRAG = "stadtrat_antrag";
              public const TYP_STADTRAT_VORLAGE = "stadtrat_vorlage";
          Severity: Minor
          Found in protected/models/Antrag.php - About 3 hrs to fix

            File index.php has 304 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            /**
             * @var $this IndexController
             * @var $error array
             * @var string $code
            Severity: Minor
            Found in protected/views/benachrichtigungen/index.php - About 3 hrs to fix

              Method parse has 86 lines of code (exceeds 30 allowed). Consider refactoring.
              Open

                  public function parse(int $id): ?Antrag
                  {
                      if (SITE_CALL_MODE != "cron") echo "- Antrag $id\n";
              
                      $html = $this->curlBasedDownloader->loadUrl(RIS_URL_PREFIX . 'antrag/detail/' . $id);
              Severity: Major
              Found in protected/RISParser/StadtratsantragParser.php - About 3 hrs to fix

                Method parse has 85 lines of code (exceeds 30 allowed). Consider refactoring.
                Open

                    public function parse($ba_nr): mixed
                    {
                        $ba_nr = IntVal($ba_nr);
                
                        if (SITE_CALL_MODE != "cron") echo "- BA $ba_nr\n";
                Severity: Major
                Found in protected/RISParser/BAMitgliederParser.php - About 3 hrs to fix

                  Function initBAsWidget has 83 lines of code (exceeds 30 allowed). Consider refactoring.
                  Open

                      initBAsWidget: function () {
                          function geojson_show(e) {
                              var layer = e.target;
                  
                              layer.setStyle({
                  Severity: Major
                  Found in html/js/antraegekarte.jquery.js - About 3 hrs to fix

                    File antraegekarte.jquery.js has 296 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    "use strict";
                    
                    $.widget("muenchen-transparent.AntraegeKarte", {
                        options: {
                            lat: 48.15509285476017,
                    Severity: Minor
                    Found in html/js/antraegekarte.jquery.js - About 3 hrs to fix

                      Method parse has 81 lines of code (exceeds 30 allowed). Consider refactoring.
                      Open

                          public function parse(int $id): ?Antrag
                          {
                              if (SITE_CALL_MODE != "cron") echo "- Antrag $id\n";
                      
                              $html = $this->curlBasedDownloader->loadUrl(RIS_URL_PREFIX . 'antrag/detail/' . $id);
                      Severity: Major
                      Found in protected/RISParser/BAAntragParser.php - About 3 hrs to fix

                        IndexController has 26 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class IndexController extends RISBaseController
                        {
                            public static $BA_DOKUMENTE_TAGE_PRO_SEITE = 14;
                        
                            /**
                        Severity: Minor
                        Found in protected/controllers/IndexController.php - About 3 hrs to fix

                          Method korrigiereDokumentenTitel has 80 lines of code (exceeds 30 allowed). Consider refactoring.
                          Open

                              public static function korrigiereDokumentenTitel($titel)
                              {
                                  $titel = trim(str_replace("_", " ", $titel));
                          
                                  if (preg_match("/^[0-9]+to[0-9]+$/siu", $titel)) {
                          Severity: Major
                          Found in protected/components/RISTools.php - About 3 hrs to fix

                            Method actionGeojsonSuche has 77 lines of code (exceeds 30 allowed). Consider refactoring.
                            Open

                                public function actionGeojsonSuche()
                                {
                                    $krits = new RISSucheKrits();
                            
                                    $solr   = RISSolrHelper::getSolrClient();
                            Severity: Major
                            Found in protected/controllers/IndexController.php - About 2 hrs to fix

                              Method benachrichtigungsErgebnisse has 77 lines of code (exceeds 30 allowed). Consider refactoring.
                              Open

                                  #[ArrayShape(["antraege" => "array", "termine" => "array", "vorgaenge" => "array"])]
                                  public function benachrichtigungsErgebnisse(int $zeitspanne): array
                                  {
                                      $benachrichtigungen = $this->getBenachrichtigungen();
                              
                              
                              Severity: Major
                              Found in protected/models/BenutzerIn.php - About 2 hrs to fix

                                Method parse has 76 lines of code (exceeds 30 allowed). Consider refactoring.
                                Open

                                    public function parse(int $id): ?Antrag
                                    {
                                        if (SITE_CALL_MODE != "cron") echo "- Initiative $id\n";
                                
                                        $html = $this->curlBasedDownloader->loadUrl(RIS_URL_PREFIX . 'antrag/detail/' . $id);
                                Severity: Major
                                Found in protected/RISParser/BAInitiativeParser.php - About 2 hrs to fix

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

                                      public static function parseFromHtml(string $html): ?self
                                      {
                                          if (!preg_match('/<section class="card">.*<div><h2>Betreff<\/h2><\/div>.*<div class="card-body">\s*<div[^>]*>(?<title>[^<]*)<\/div>/siuU', $html, $match)) {
                                              throw new ParsingException('Not found: title');
                                          }
                                  Severity: Major
                                  Found in protected/RISParser/StadtratsvorlageData.php - About 2 hrs to fix

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

                                        public static function parseFromHtml(string $html, int $id): ?self
                                        {
                                            if (!preg_match('/<h1[^>]*>\s*<span[^>]*>(?<date>[^<]*)<span[^>]*><span[^>]*>(?<status>[^>]*)<\/span>/siuU', $html, $match)) {
                                                throw new ParsingException('Not found: date/status');
                                            }
                                    Severity: Major
                                    Found in protected/RISParser/CalendarData.php - About 2 hrs to fix

                                      Termin has 23 functions (exceeds 20 allowed). Consider refactoring.
                                      Open

                                      class Termin extends CActiveRecord implements IRISItemHasDocuments
                                      {
                                          public const CANCELED_STR = 'Entfällt';
                                      
                                          public const TYP_AUTO = 0;
                                      Severity: Minor
                                      Found in protected/models/Termin.php - About 2 hrs to fix

                                        Method actionFraktionantraege has 65 lines of code (exceeds 30 allowed). Consider refactoring.
                                        Open

                                            public function actionFraktionantraege($fraktion_id, $limit = 30, $offset = 0) {
                                                Header("Content-Type: application/json; charset=UTF-8");
                                        
                                                /** @var Fraktion $fraktion */
                                                $fraktion = Fraktion::model()->findByPk( $fraktion_id );
                                        Severity: Major
                                        Found in protected/controllers/ExportController.php - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language