Showing 191 of 1,049 total issues
Function label
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function label($request)
{
if (!$request->getUri()) {
return $this->returnError(400, "Bad Request", "uri parameter missing");
}
- 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 arbitrarySort
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function arbitrarySort($sortable)
{
// sorting the result list to a arbitrary order defined below in mycompare()
if ($sortable !== null) {
uksort($sortable, array($this, 'mycompare'));
- 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 getVocabularyByGraph
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getVocabularyByGraph($graph, $endpoint = null)
{
if ($endpoint === null) {
$endpoint = $this->getConfig()->getDefaultEndpoint();
}
- 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 getDefaultSidebarView
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getDefaultSidebarView()
{
$defview = $this->resource->getLiteral('skosmos:defaultSidebarView');
$sidebarViews = $this->getSidebarViews();
if ($defview) {
- 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 getDefaultConceptSidebarView
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getDefaultConceptSidebarView()
{
$defview = $this->resource->getLiteral('skosmos:defaultConceptSidebarView');
$sidebarViews = $this->getSidebarViews();
if ($defview) {
- 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 redirect
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function redirect($request)
{
/* determine parameters: URI and (optional) vocabulary */
$request->setUri($request->getQueryParam('uri'));
if ($request->getQueryParam('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 getVocabGraphs
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function getVocabGraphs($vocabs)
{
if ($vocabs === null || sizeof($vocabs) == 0) {
// searching from all vocabularies - limit to known graphs
$vocabs = $this->model->getVocabularies();
- 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 redirectWeb
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function redirectWeb($vocab, $uri)
{
$baseurl = $this->getBaseHref();
$vocid = $vocab->getId();
$localname = $vocab->getLocalName($uri);
- 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 invokeVocabularySearch
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function invokeVocabularySearch($request)
{
$template = $this->twig->load('vocab-search.twig');
$this->model->setLocale($request->getLang());
$vocab = $request->getVocab();
- 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 getModifiedDate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getModifiedDate()
{
$modifiedDate = null;
$conceptSchemeURI = $this->getDefaultConceptScheme();
- 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 getTemplates
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getTemplates($names = null)
{
$templateStrings = array();
$plugins = $this->getPluginsTemplates($names);
foreach ($plugins as $folder => $templates) {
- 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"