Showing 191 of 1,049 total issues
Avoid too many return
statements within this method. Open
return $label;
Avoid too many return
statements within this method. Open
return null;
Avoid too many return
statements within this method. Open
return ($a < $b) ? -1 : 1;
Avoid too many return
statements within this method. Open
return strcoll($a->getSortKey(), $b->getSortKey());
Avoid too many return
statements within this method. Open
return $this->resource->shorten() ? $this->resource->shorten() : $this->getUri();
Avoid too many return
statements within this method. Open
return $this->returnJson($ret);
Avoid too many return
statements within this method. Open
return $this->resource->label();
Avoid too many return
statements within this method. Open
return $this->resource->getLiteral('rdf:value');
Avoid too many return
statements within this method. Open
return strnatcasecmp($anot, $bnot);
Avoid too many return
statements within this method. Open
return null;
Avoid too many return
statements within this method. Open
return "";
Avoid too many return
statements within this method. Open
return self::DEFAULT_PROPERTY_ORDER;
Function getExternalLabel
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function getExternalLabel($exvoc, $exuri, $lang)
{
if ($exvoc) {
try {
$exsparql = $exvoc->getSparql();
- 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 getExternalNotation
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function getExternalNotation($exvoc, $exuri)
{
if ($exvoc) {
try {
$exsparql = $exvoc->getSparql();
- 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 getSidebarViews
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getSidebarViews()
{
$views = $this->resource->getResource('skosmos:sidebarViews');
if ($views) {
$viewsArray = 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 data
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function data($request)
{
$vocab = $request->getVocab();
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 updateJsonLD
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const updateJsonLD = (conceptHTML) => {
const JsonLD = document.querySelector('script[type="application/ld+json"]')
const newJsonLD = conceptHTML.querySelector('script[type="application/ld+json"]')
if (JsonLD) {
JsonLD.innerHTML = '{}'
- 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 mappings
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function mappings(Request $request)
{
$this->model->setLocale($request->getLang());
$vocab = $request->getVocab();
if ($this->notModified($vocab)) {
- 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 parseSearchLang
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
parseSearchLang () {
// if content language can be found from uri params, use that and update it to SKOSMOS object and to search lang cookie
const urlParams = new URLSearchParams(window.location.search)
const paramLang = urlParams.get('clang')
const anyLang = urlParams.get('anylang')
- 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 setPluginParameters
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function setPluginParameters(Easyrdf\Resource $pluginResource): void
{
$pluginName = $pluginResource->getLiteral('skosmos:usePlugin')->getValue();
$this->pluginParameters[$pluginName] = 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"