Showing 1,049 of 1,049 total issues
Method queryConcepts
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function queryConcepts($vocabs, $fields, $unique, $params, $showDeprecated = false)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($model, $vocab, $resource, $prop, $clang = '')
Method queryChangeList
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function queryChangeList($prop, $lang, $offset, $limit, $showDeprecated = false)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($model, $vocab, $resource, $graph, $clang)
Function vocabularyStatistics
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function vocabularyStatistics($request)
{
if ($this->notModified($request->getVocab())) {
return null;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function guessLanguage
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function guessLanguage($request, $vocid = null)
{
// 1. select language based on SKOSMOS_LANGUAGE cookie
$languageCookie = $request->getCookie('SKOSMOS_LANGUAGE');
if ($languageCookie) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getGitModifiedDate
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function getGitModifiedDate()
{
$commitDate = null;
$cache = $this->model->getConfig()->getCache();
$cacheKey = "git:modified_date";
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getRDF
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getRDF($vocid, $uri, $format)
{
if ($format == 'text/turtle') {
$retform = 'turtle';
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function redirectToVocabData
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function redirectToVocabData($request)
{
$urls = $request->getVocab()->getConfig()->getDataURLs();
if (sizeof($urls) == 0) {
$vocid = $request->getVocab()->getId();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function labelStatistics
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function labelStatistics($request)
{
if ($this->notModified($request->getVocab())) {
return null;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getConceptURL
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const getConceptURL = (uri) => {
const clangParam = (window.SKOSMOS.content_lang !== window.SKOSMOS.lang) ? 'clang=' + window.SKOSMOS.content_lang : ''
let clangSeparator = '?'
let page = ''
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function transformCountLangConceptsResults
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function transformCountLangConceptsResults($result, $langs, $props)
{
$ret = array();
// set default count to zero; overridden below if query found labels
foreach ($langs as $lang) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function compareConcepts
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
compareConcepts (a, b) {
let strA, strB
if (window.SKOSMOS.sortByNotation) {
if (a.notation && b.notation) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getAlphabet
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getAlphabet($clang)
{
$chars = $this->getSparql()->queryFirstCharacters($clang, $this->config->getIndexClasses());
$letters = array();
$digits = false;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getForeignLabels
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getForeignLabels()
{
$prefLabels = $this->getForeignLabelList('skos:prefLabel', 'prefLabel');
$altLabels = $this->getForeignLabelList('skos:altLabel', 'altLabel');
$ret = array_merge_recursive($prefLabels, $altLabels);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getPropertyOrder
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getPropertyOrder()
{
$order = $this->getResource()->getResource('skosmos:propertyOrder');
if ($order === null) {
return self::DEFAULT_PROPERTY_ORDER;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid too many return
statements within this method. Open
return $this->resource->getLiteral('rdf:value', $lang);
Avoid too many return
statements within this method. Open
return $this->returnError(404, 'Bad Request', "no concept found with given uri");
Avoid too many return
statements within this method. Open
return $this->returnDataResults($results, $format);
Avoid too many return
statements within this method. Open
return $hits;