codeformunich/Muenchen-Transparent

View on GitHub

Showing 1,630 of 1,630 total issues

File IndexController.php has 774 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

class IndexController extends RISBaseController
{
    public static $BA_DOKUMENTE_TAGE_PRO_SEITE = 14;
Severity: Major
Found in protected/controllers/IndexController.php - About 1 day to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    if (count($data["antraege"]) > 0) {
        echo "=== Anträge & Vorlagen ===\n\n";
    
        foreach ($data["antraege"] as $dat) {
            /** @var Antrag $antrag */
    protected/views/benachrichtigungen/suchergebnisse_email_txt.php on lines 59..92

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 357.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    if (count($data["termine"]) > 0) {
        echo "=== Sitzungen ===\n\n";
    
    foreach ($data["termine"] as $dat) {
        /** @var Termin $termin */
    protected/views/benachrichtigungen/suchergebnisse_email_txt.php on lines 24..57

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 357.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    function ris_download_string($url_to_read, $username = "", $password = "", $timeout = 30)
    {
        $ch = curl_init();
    
        if ($username != "" || $password != "") curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
    Severity: Major
    Found in protected/config/main-production.template.php and 1 other location - About 1 day to fix
    protected/config/main-test.php on lines 57..80

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 305.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    function ris_download_string($url_to_read, $username = "", $password = "", $timeout = 30)
    {
        $ch = curl_init();
    
        if ($username != "" || $password != "") curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
    Severity: Major
    Found in protected/config/main-test.php and 1 other location - About 1 day to fix
    protected/config/main-production.template.php on lines 66..89

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 305.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

    /*
     * Autocomplete - jQuery plugin 1.1pre
     *
     * Copyright (c) 2007 Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, Jörn Zaefferer
     *
    Severity: Major
    Found in docs/solr-core/conf/velocity/jquery.autocomplete.js - About 1 day to fix

      Function Autocompleter has 272 lines of code (exceeds 30 allowed). Consider refactoring.
      Open

      $.Autocompleter = function(input, options) {
      
          var KEY = {
              UP: 38,
              DOWN: 40,
      Severity: Major
      Found in docs/solr-core/conf/velocity/jquery.autocomplete.js - About 1 day to fix

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

                for ($sm_page = 0; $sm_page < $sm_num; $sm_page++) {
                    echo "Termine - Seite $sm_page\n";
        
                    $sitemap_file = "sitemap-termine-" . $sm_page . ".xml";
                    $fp           = fopen($sitemap_basepath . $sitemap_file, "w");
        Severity: Major
        Found in protected/commands/GoogleSitemapCreateCommand.php and 2 other locations - About 1 day to fix
        protected/commands/GoogleSitemapCreateCommand.php on lines 29..49
        protected/commands/GoogleSitemapCreateCommand.php on lines 58..78

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 287.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

                for ($sm_page = 0; $sm_page < $sm_num; $sm_page++) {
                    echo "Anträge - Seite $sm_page\n";
        
                    $sitemap_file = "sitemap-antraege-" . $sm_page . ".xml";
                    $fp           = fopen($sitemap_basepath . $sitemap_file, "w");
        Severity: Major
        Found in protected/commands/GoogleSitemapCreateCommand.php and 2 other locations - About 1 day to fix
        protected/commands/GoogleSitemapCreateCommand.php on lines 29..49
        protected/commands/GoogleSitemapCreateCommand.php on lines 87..107

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 287.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

                for ($sm_page = 0; $sm_page < $sm_num; $sm_page++) {
                    echo "Dokumente - Seite $sm_page\n";
        
                    $sitemap_file = "sitemap-dokumente-" . $sm_page . ".xml";
                    $fp           = fopen($sitemap_basepath . $sitemap_file, "w");
        Severity: Major
        Found in protected/commands/GoogleSitemapCreateCommand.php and 2 other locations - About 1 day to fix
        protected/commands/GoogleSitemapCreateCommand.php on lines 58..78
        protected/commands/GoogleSitemapCreateCommand.php on lines 87..107

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 287.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        File Dokument.php has 484 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        /**
         * This is the model class for table "dokumente".
         *
        Severity: Minor
        Found in protected/models/Dokument.php - About 7 hrs to fix

          Function Select has 169 lines of code (exceeds 30 allowed). Consider refactoring.
          Open

          $.Autocompleter.Select = function (options, input, select, config) {
              var CLASSES = {
                  ACTIVE: "ac_over"
              };
              
          Severity: Major
          Found in docs/solr-core/conf/velocity/jquery.autocomplete.js - About 6 hrs to fix

            Similar blocks of code found in 4 locations. Consider refactoring.
            Open

                public function parseUpdate(): void
                {
                    echo "Updates: Stadtratsanträge (3 Monate)\n";
            
                    $loaded_ids = [];
            Severity: Major
            Found in protected/RISParser/StadtratsantragParser.php and 3 other locations - About 6 hrs to fix
            protected/RISParser/BAAntragParser.php on lines 124..141
            protected/RISParser/BAInitiativeParser.php on lines 119..136
            protected/RISParser/StadtratsvorlageParser.php on lines 200..217

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 208.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            <?php
            
            // Runs München Transparent with the test config
            
            defined('YII_DEBUG') or define('YII_DEBUG', true);
            Severity: Major
            Found in html/index-test.php and 1 other location - About 6 hrs to fix
            html/index.php on lines 1..21

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 208.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 4 locations. Consider refactoring.
            Open

                public function parseUpdate(): void
                {
                    echo "Updates: Stadtratsvorlagen (3 Monate)\n";
            
                    $loaded_ids = [];
            Severity: Major
            Found in protected/RISParser/StadtratsvorlageParser.php and 3 other locations - About 6 hrs to fix
            protected/RISParser/BAAntragParser.php on lines 124..141
            protected/RISParser/BAInitiativeParser.php on lines 119..136
            protected/RISParser/StadtratsantragParser.php on lines 132..149

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 208.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            <?php
            
            defined('YII_DEBUG') or define('YII_DEBUG', false);
            
            // specify how many levels of call stack should be shown in each log message
            Severity: Major
            Found in html/index.php and 1 other location - About 6 hrs to fix
            html/index-test.php on lines 1..23

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 208.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 4 locations. Consider refactoring.
            Open

                public function parseUpdate(): void
                {
                    echo "Updates: BA-Initiativen (3 Monate)\n";
            
                    $loaded_ids = [];
            Severity: Major
            Found in protected/RISParser/BAInitiativeParser.php and 3 other locations - About 6 hrs to fix
            protected/RISParser/BAAntragParser.php on lines 124..141
            protected/RISParser/StadtratsantragParser.php on lines 132..149
            protected/RISParser/StadtratsvorlageParser.php on lines 200..217

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 208.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 4 locations. Consider refactoring.
            Open

                public function parseUpdate(): void
                {
                    echo "Updates: BA-Anträge (3 Monate)\n";
            
                    $loaded_ids = [];
            Severity: Major
            Found in protected/RISParser/BAAntragParser.php and 3 other locations - About 6 hrs to fix
            protected/RISParser/BAInitiativeParser.php on lines 119..136
            protected/RISParser/StadtratsantragParser.php on lines 132..149
            protected/RISParser/StadtratsvorlageParser.php on lines 200..217

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 208.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            File Antrag.php has 395 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            
            /**
             * This is the model class for table "antraege".
             *
            Severity: Minor
            Found in protected/models/Antrag.php - About 5 hrs to fix

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                      if ($alter_eintrag) {
                          $changed = false;
                          if ($alter_eintrag->name != $daten->name) $aenderungen .= "Name: " . $alter_eintrag->name . " => " . $daten->name . "\n";
                          if ($alter_eintrag->ba_nr != $daten->ba_nr) $aenderungen .= "BA: " . $alter_eintrag->ba_nr . " => " . $daten->ba_nr . "\n";
                          if ($alter_eintrag->kuerzel != $daten->kuerzel) $aenderungen .= "Kürzel: " . $alter_eintrag->kuerzel . " => " . $daten->kuerzel . "\n";
              Severity: Major
              Found in protected/RISParser/BAGremienParser.php and 1 other location - About 5 hrs to fix
              protected/RISParser/StadtratGremiumParser.php on lines 33..40

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 190.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Severity
              Category
              Status
              Source
              Language