Showing 1,630 of 1,630 total issues
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);
IndexController
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class IndexController extends RISBaseController
{
public static $BA_DOKUMENTE_TAGE_PRO_SEITE = 14;
/**
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)) {
Method actionGeojsonSuche
has 77 lines of code (exceeds 30 allowed). Consider refactoring. Open
public function actionGeojsonSuche()
{
$krits = new RISSucheKrits();
$solr = RISSolrHelper::getSolrClient();
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();
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);
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');
}
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');
}
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;
Similar blocks of code found in 2 locations. Consider refactoring. Open
<?php
class Reindex_BA_GremienCommand extends CConsoleCommand
{
public function run($args)
- Read upRead up
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 131.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
<?php
class Reindex_BA_MitgliedCommand extends CConsoleCommand
{
public function run($args)
- Read upRead up
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 131.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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 );
Method actionSuche
has 63 lines of code (exceeds 30 allowed). Consider refactoring. Open
public function actionSuche($code = "")
{
if (AntiXSS::isTokenSet("search_form")) {
$krits = new RISSucheKrits();
if (trim($_REQUEST["volltext"]) != "") $krits->addKrit('volltext', $_REQUEST["volltext"]);
Function input
has 61 lines of code (exceeds 30 allowed). Consider refactoring. Open
"input": function(selector) {
$((selector) ? selector : this.options.inputElements)
.filter(":notmdproc")
.data("mdproc", true)
.each( function() {
File StadtraetIn.php
has 260 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @property integer $id
* @property integer $referentIn
Identical blocks of code found in 3 locations. Consider refactoring. Open
for ($i = 0; $i < count($matches['id']); $i++) {
$link = new DokumentLink();
$link->filename = $matches['filename'][$i];
$link->title = $matches['title'][$i];
$link->id = intval($matches['id'][$i]);
- Read upRead up
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 126.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 3 locations. Consider refactoring. Open
for ($i = 0; $i < count($matches['id']); $i++) {
$link = new DokumentLink();
$link->filename = $matches['filename'][$i];
$link->title = $matches['title'][$i];
$link->id = intval($matches['id'][$i]);
- Read upRead up
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 126.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 3 locations. Consider refactoring. Open
for ($i = 0; $i < count($matches['id']); $i++) {
$link = new DokumentLink();
$link->filename = $matches['filename'][$i];
$link->title = $matches['title'][$i];
$link->id = intval($matches['id'][$i]);
- Read upRead up
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 126.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
File Termin.php
has 259 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This is the model class for table "termine".
*
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (options.text != "") div.innerHTML = '<img src="' + iconurl + '" class="leaflet-marker-icon" alt="Icon" style="' + iconsize_style + '"><div class="text">' + options.text + '</div>';
else div.innerHTML = '<img src="' + iconurl + '" class="leaflet-marker-icon" alt="Icon" style="' + iconsize_style + '">';
- Read upRead up
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 79.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76