Showing 1,049 of 1,049 total issues
The class GlobalConfig has an overall complexity of 55 which is very high. The configured complexity threshold is 50. Open
class GlobalConfig extends BaseConfig
{
/** Cache reference */
private $cache;
/** Location of the configuration file. Used for caching. */
- Exclude checks
The class Model has an overall complexity of 118 which is very high. The configured complexity threshold is 50. Open
class Model
{
/** cache for Vocabulary objects */
private $allVocabularies = null;
/** cache for Vocabulary objects */
- Exclude checks
The class Vocabulary has an overall complexity of 118 which is very high. The configured complexity threshold is 50. Open
class Vocabulary extends DataObject implements Modifiable
{
/** cached value of URI space */
private $urispace = null;
private $config;
- Exclude checks
The class Request has an overall complexity of 57 which is very high. The configured complexity threshold is 50. Open
class Request
{
private $lang;
private $clang;
private $page;
- Exclude checks
The class GenericSparql has an overall complexity of 325 which is very high. The configured complexity threshold is 50. Open
class GenericSparql
{
/**
* A SPARQL Client eg. an EasyRDF instance.
* @property EasyRdf\Sparql\Client $client
- Exclude checks
The class VocabularyConfig has an overall complexity of 124 which is very high. The configured complexity threshold is 50. Open
class VocabularyConfig extends BaseConfig
{
private $globalPlugins;
private $pluginRegister;
private $pluginParameters = array();
- Exclude checks
The class GenericSparql has 23 public methods. Consider refactoring GenericSparql to keep number of public methods under 10. Open
class GenericSparql
{
/**
* A SPARQL Client eg. an EasyRDF instance.
* @property EasyRdf\Sparql\Client $client
- Read upRead up
- Exclude checks
TooManyPublicMethods
Since: 0.1
A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.
By default it ignores methods starting with 'get' or 'set'.
Example
Source https://phpmd.org/rules/codesize.html#toomanypublicmethods
The class GenericSparql has 77 non-getter- and setter-methods. Consider refactoring GenericSparql to keep number of methods under 25. Open
class GenericSparql
{
/**
* A SPARQL Client eg. an EasyRDF instance.
* @property EasyRdf\Sparql\Client $client
- Read upRead up
- Exclude checks
TooManyMethods
Since: 0.1
A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.
By default it ignores methods starting with 'get' or 'set'.
The default was changed from 10 to 25 in PHPMD 2.3.
Example
Source https://phpmd.org/rules/codesize.html#toomanymethods
Similar blocks of code found in 3 locations. Consider refactoring. Open
conceptMappingsApp.directive('load-concept-page', {
mounted: (el, binding) => {
el.loadConceptPageEvent = event => {
binding.value() // calling the method given as the attribute value (loadMappings)
}
- 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 101.
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 3 locations. Consider refactoring. Open
tabHierApp.directive('resize-window', {
beforeMount: (el, binding) => {
el.resizeWindowEvent = event => {
binding.value() // calling the method given as the attribute value (setListStyle)
}
- 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 101.
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 3 locations. Consider refactoring. Open
tabAlphaApp.directive('resize-window', {
beforeMount: (el, binding) => {
el.resizeWindowEvent = event => {
binding.value() // calling the method given as the attribute value (setListStyle)
}
- 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 101.
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 getInfo
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getInfo($lang = null)
{
$ret = array();
if (!$lang) {
$lang = $this->getLang();
File tab-hierarchy.js
has 300 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* global Vue */
/* global partialPageLoad, getConceptURL */
const tabHierApp = Vue.createApp({
data () {
Method generateConceptSearchQuery
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function generateConceptSearchQuery($fields, $unique, $params, $showDeprecated = false)
{
$vocabs = $params->getVocabs();
$gcl = $this->graphClause;
$fcl = empty($vocabs) ? '' : $this->generateFromClause($vocabs);
Function startResourceCountsApp
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
function startResourceCountsApp () {
const resourceCountsApp = Vue.createApp({
data () {
return {
concepts: {},
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function newConcepts($request)
{
$offset = ($request->getQueryParam('offset') && is_numeric($request->getQueryParam('offset')) && $request->getQueryParam('offset') >= 0) ? $request->getQueryParam('offset') : 0;
$limit = ($request->getQueryParam('limit') && is_numeric($request->getQueryParam('limit')) && $request->getQueryParam('limit') >= 0) ? $request->getQueryParam('limit') : 200;
- 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 138.
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
public function modifiedConcepts($request)
{
$offset = ($request->getQueryParam('offset') && is_numeric($request->getQueryParam('offset')) && $request->getQueryParam('offset') >= 0) ? $request->getQueryParam('offset') : 0;
$limit = ($request->getQueryParam('limit') && is_numeric($request->getQueryParam('limit')) && $request->getQueryParam('limit') >= 0) ? $request->getQueryParam('limit') : 200;
- 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 138.
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
ConceptSearchParameters
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
class ConceptSearchParameters
{
private $config;
private $request;
private $vocabs;
Method asJskos
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function asJskos($queryExVocabs = true, $lang = null, $hrefLink = null)
{
$propertyLabel = $this->getLabel($lang, $queryExVocabs);
$propertyLang = $lang;
if (!is_string($propertyLabel)) {
Method vocabularyStatistics
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function vocabularyStatistics($request)
{
if ($this->notModified($request->getVocab())) {
return null;
}