Showing 249 of 257 total issues
Function getGenericKeywords
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function getGenericKeywords($properties, $options)
{
$keywords = array();
for ($i = 0, $ii = count($properties); $i < $ii; $i++) {
$keyword = $this->getGenericKeyword($properties[$i], $options['defaultName'], $options['parentId']);
- 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 kvpsToQueryString
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function kvpsToQueryString($kvps)
{
$paramsStr = '';
if (!is_array($kvps)) {
return $paramsStr;
- 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 jsonQueryToKVP
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function jsonQueryToKVP($jsonQuery)
{
$params = 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 getThemesRootLinks
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function getThemesRootLinks()
{
$links = array();
// Load 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
Function storeCollectionDescription
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function storeCollectionDescription($collection)
{
/*
* First generate a right keywords 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 mergeRights
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function mergeRights($rights)
{
// Default rights allows only to delete/update things
// that belongs to user
- 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 storeOSDescription
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function storeOSDescription($collection)
{
/*
* Insert OpenSearch descriptions within osdescriptions table
* (one description per lang)
- 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 getLinks
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function getLinks($sorting, $collectionId)
{
/*
* Base links are always returned
*/
- 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 cql2FiltersToSQL
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function cql2FiltersToSQL($cql2Filters, $operator)
{
$filters = array();
$paramsWithOperation = 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 sanitizeSQLColumns
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function sanitizeSQLColumns($featureColumns, $fields)
{
$discarded = 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 getTimeExtent
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function getTimeExtent($dates)
{
if (count($dates) === 0 || !isset($dates[0])) {
return array(
'startDate' => 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
Method storeUserProfile
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function storeUserProfile($profile, $storageInfo)
{
if (!is_array($profile) || !isset($profile['email'])) {
RestoLogUtil::httpError(400, 'Cannot save user profile - invalid user identifier');
}
Method processITagKeywords
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function processITagKeywords($iTagFeature)
{
/*
* Initialize keywords array from faceted properties
*/
Method namedOperation
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function namedOperation($value)
{
switch ($value) {
case self::T_IS_NULL:
return 'isNull';
Method getChildren
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getChildren($params)
{
$childs = array();
// Initialize router to process each children individually
Method checkGeoJSONFeature
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function checkGeoJSONFeature($object)
{
// Default is nice
$error = 'Invalid GeoJSON feature';
Method keywordsFromITag
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function keywordsFromITag($properties, $geometry, $iTagParams)
{
/*
* No geometry = no iTag
*
Method addGeoRSSWhere
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function addGeoRSSWhere($type, $geometry)
{
$this->startElement('georss:where');
$this->startElement('gml:' . $type);
switch ($type) {
Method intersectsExpression
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function intersectsExpression($not)
{
$filter = array(
'not' => $not
);
Method getUsersProfiles
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getUsersProfiles($params, $userid)
{
// Only returns activated profiles
$where = array(
'activated=1'