Showing 191 of 1,049 total issues
Method generateConceptSearchQueryInner
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function generateConceptSearchQueryInner($term, $lang, $searchLang, $props, $unique, $filterGraph)
Function getLanguages
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getLanguages()
{
$languageResources = $this->getResource()->getResource('skosmos:languages');
if (!is_null($languageResources) && !empty($languageResources)) {
$languages = 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
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($model, $vocab, $resource, $literal, $prop, $clang = '')
Function getReifiedPropertyValues
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getReifiedPropertyValues()
{
$ret = array();
$props = $this->resource->propertyUris();
foreach ($props as $prop) {
- 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 sendFeedback
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function sendFeedback($request, $message, $messageSubject, $fromName = null, $fromEmail = null, $fromVocab = null, $toMail = null)
{
$toAddress = ($toMail) ? $toMail : $this->model->getConfig()->getFeedbackAddress();
$messageSubject = "[" . $this->model->getConfig()->getServiceName() . "] " . $messageSubject;
if ($fromVocab !== null && $fromVocab !== '') {
- 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
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($model, $prop, $label, $tooltip = null, $super = null, $sort_by_notation = false)
Method queryTransitiveProperty
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function queryTransitiveProperty($uri, $props, $lang, $limit, $anylang = false, $fallbacklang = '')
Function initializeConfig
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function initializeConfig(): EasyRdf\Resource
{
// retrieve last modified time for config file (filemtime returns int|bool!)
$configModifiedTime = filemtime($this->filePath);
if (!is_bool($configModifiedTime)) {
- 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 getLanguageOrder
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getLanguageOrder($clang)
{
if (array_key_exists($clang, $this->languageOrderCache)) {
return $this->languageOrderCache[$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
Function getVocabularyList
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getVocabularyList($categories = true, $shortname = false)
{
$cats = $this->getVocabularyCategories();
$ret = array();
foreach ($cats as $cat) {
- 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
Method linkUrlFilter
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function linkUrlFilter($uri, $vocab, $lang, $type = 'page', $clang = null, $term = null)
Function search
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function search(Request $request): void
{
$maxhits = $request->getQueryParam('maxhits');
$offset = $request->getQueryParam('offset');
$term = $request->getQueryParamRaw('query');
- 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 dumpJsonLd
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function dumpJsonLd()
{
$context = array(
'skos' => EasyRdf\RdfNamespace::get("skos"),
'isothes' => EasyRdf\RdfNamespace::get("isothes"),
- 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 getVocabName
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getVocabName($lang = '')
{
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
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(Model $model, Vocabulary $vocab, Resource $target, Resource $source, string $prop, $clang = '')
Method transformPropertyResults
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private function transformPropertyResults($uri, $lang, $objects, $propname, $propuri)
Method generateChangeListQuery
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private function generateChangeListQuery($prop, $lang, $offset, $limit = 200, $showDeprecated = false)
Method generateTransitivePropertyQuery
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private function generateTransitivePropertyQuery($uri, $props, $lang, $limit, $anylang)
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 = '')