Showing 138 of 151 total issues
Method getItemSuggestions
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Items $oItem,
$aPossibleSuggestions,
$sSetSuggestions,
$sCurrentitem,
$mItemindex,
Function preparePage
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function preparePage()
{
$this->P = new \HaaseIT\HCSF\CorePage($this->serviceManager);
$this->P->cb_pagetype = 'content';
- 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 getShippingcost
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getShippingcost()
{
$fShippingcost = $this->shop['shippingcoststandardrate'];
$sCountry = $this->helperCustomer->getDefaultCountryByConfig($this->config->getLang());
- 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 mailWrapper
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function mailWrapper($to, $subject = '(No subject)', $message = '', $aImagesToEmbed = [], $aFilesToAttach = []) {
Function refreshCartItems
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function refreshCartItems(ServiceManager $serviceManager) // bei login/logout ändern sich ggf die preise, shoppingcart neu berechnen
{
if (isset($_SESSION['cart']) && is_array($_SESSION['cart'])) {
foreach ($_SESSION['cart'] as $sKey => $aValue) {
$sItemkey = $sKey;
- 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 addAdditionalCostsToItems
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function addAdditionalCostsToItems($aSumme, $iVATfull, $iVATreduced)
{
$fGesamtnetto = $aSumme['sumvoll'] + $aSumme['sumerm'];
$fSteuervoll = $aSumme['sumvoll'] * $iVATfull / 100;
$fSteuererm = $aSumme['sumerm'] * $iVATreduced / 100;
- 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 getPurifier
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getPurifier($purpose)
{
$purifier_config = \HTMLPurifier_Config::createDefault();
$purifier_config->set('Core.Encoding', 'UTF-8');
$purifier_config->set('Cache.SerializerPath', PATH_PURIFIERCACHE);
- 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
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return $router->getPage();
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return $this->setupHardcodedTextcats();
Avoid too many return
statements within this method. Open
return null;
Avoid too many return
statements within this method. Open
return new \HaaseIT\HCSF\Shop\Items($serviceManager);
Function replyToCartUpdate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function replyToCartUpdate($sReply, $aMore = []) {
if (filter_input(INPUT_GET, 'ajax') !== null) {
$aAR = [
'cart' => $_SESSION['cart'],
'reply' => $sReply,
- 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 getShoppingcartData
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getShoppingcartData()
{
$aCartinfo = [
'numberofitems' => 0,
'cartsums' => [],
- 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 prepareItem
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function prepareItem($aItemdata)
{
$aData = [
'form' => ['action' => Tools::makeLinkHRefWithAddedGetVars('/_admin/itemadmin.html', ['action' => 'showitem', 'itemno' => $aItemdata['base']['itm_no']]),],
'id' => $aItemdata['base']['itm_id'],
- 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 getSignedGlideURL
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getSignedGlideURL($file, $width = 0, $height = 0)
{
$urlBuilder = \League\Glide\Urls\UrlBuilderFactory::create('', $this->secrets['glide_signkey']);
$param = [];
- 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"