Showing 191 of 1,049 total issues
RestController
has 35 functions (exceeds 20 allowed). Consider refactoring. Open
class RestController extends Controller
{
/* supported MIME types that can be used to return RDF data */
public const SUPPORTED_FORMATS = 'application/rdf+xml text/turtle application/ld+json application/json application/marcxml+xml';
/* context array template */
Method generateConceptInfoQuery
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function generateConceptInfoQuery($uris, $arrayClass, $vocabs)
{
$gcl = $this->graphClause;
$fcl = empty($vocabs) ? '' : $this->generateFromClause($vocabs);
$values = $this->formatValues('?uri', $uris, 'uri');
File vocab-search.js
has 343 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* global Vue */
const vocabSearch = Vue.createApp({
data () {
return {
GlobalConfig
has 33 functions (exceeds 20 allowed). Consider refactoring. Open
class GlobalConfig extends BaseConfig
{
/** Cache reference */
private $cache;
/** Location of the configuration file. Used for caching. */
Function getLabel
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function getLabel($lang = '', $fallbackToUri = 'uri')
{
if ($this->clang) {
$lang = $this->clang;
}
- 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
Request
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
class Request
{
private $lang;
private $clang;
private $page;
Function transformTransitivePropertyResults
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
private function transformTransitivePropertyResults($result, $lang, $fallbacklang)
{
$ret = array();
foreach ($result as $row) {
if (!isset($row->object)) {
- 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 getCollections
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
private function getCollections($includeArrays)
{
$groups = array();
$collections = $this->graph->resourcesMatching('skos:member', $this->resource);
if (isset($collections)) {
- 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
Model
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
class Model
{
/** cache for Vocabulary objects */
private $allVocabularies = null;
/** cache for Vocabulary objects */
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: {},
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;
}
Function searchConcepts
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function searchConcepts($params)
{
// don't even try to search for empty prefix if no other search criteria (group or parent concept) has been set
if (($params->getSearchTerm() === "" || !preg_match('/[^*]/', $params->getSearchTerm())) && !$params->getGroupLimit() && !$params->getParentLimit()) {
return array();
- 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 getCrumbs
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
private function getCrumbs($bTresult, $uri, $path = null)
{
$crumbs = array();
if (!isset($path)) {
$path = array();
- 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 startTermCountsApp
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
function startTermCountsApp () {
const termCountsApp = Vue.createApp({
data () {
return {
languages: []
Method transformConceptSearchResult
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function transformConceptSearchResult($row, $vocabs, $fields)
{
$hit = array();
$hit['uri'] = $row->s->getUri();