Showing 1,049 of 1,049 total issues
Missing class import via use statement (line '33', column '24'). Open
$res = new LinkedDataResource($this->model, $uri);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '172', column '24'). Open
$res = new EasyRdf\Resource($uri);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method generateConceptSearchQuery has a boolean flag argument $showDeprecated, which is a certain sign of a Single Responsibility Principle violation. Open
protected function generateConceptSearchQuery($fields, $unique, $params, $showDeprecated = false)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Missing class import via use statement (line '473', column '19'). Open
throw new ValueError("Vocabulary id '$vocid' not found in configuration.");
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method filterPlugins has a boolean flag argument $raw, which is a certain sign of a Single Responsibility Principle violation. Open
private function filterPlugins($type, $raw = false)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Missing class import via use statement (line '628', column '54'). Open
$path = array_merge($path, array(new Breadcrumb($uri, $bTresult[$uri]['label'])));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method queryConceptsAlphabetical has a boolean flag argument $showDeprecated, which is a certain sign of a Single Responsibility Principle violation. Open
public function queryConceptsAlphabetical($letter, $lang, $limit = null, $offset = null, $classes = null, $showDeprecated = false, $qualifier = null)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method generateConceptGroupContentsQuery has a boolean flag argument $showDeprecated, which is a certain sign of a Single Responsibility Principle violation. Open
private function generateConceptGroupContentsQuery($groupClass, $group, $lang, $showDeprecated = false)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method listConceptGroupContents has a boolean flag argument $showDeprecated, which is a certain sign of a Single Responsibility Principle violation. Open
public function listConceptGroupContents($groupClass, $group, $lang, $showDeprecated = false)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Missing class import via use statement (line '500', column '23'). Open
throw new ValueError("no vocabulary found for graph $graph and endpoint $endpoint");
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '31', column '24'). Open
$res = new WDQSResource($this->model, $uri);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
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"
Further reading
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"