Showing 138 of 151 total issues
Method addAdditionalCostsToItems
has 59 lines of code (exceeds 25 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;
Method validateCustomerForm
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function validateCustomerForm($sLang, $aErr = [], $bEdit = false)
{
if (empty(filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL))) {
$aErr['email'] = true;
}
Method updateGroup
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function updateGroup()
{
$purifier = false;
if ($this->config->getShop('itemgrouptext_enable_purifier')) {
$purifier = $this->helper->getPurifier('itemgroup');
Function preparePage
has a Cognitive Complexity of 17 (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 loadNavigation
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function loadNavigation(ServiceManager $serviceManager)
{
if (is_file(PATH_BASEDIR.'config/navigation.yml')) {
$navstruct = Yaml::parse(file_get_contents(PATH_BASEDIR.'config/navigation.yml'));
} else {
- 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 init
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function init()
{
$this->serviceManager = new ServiceManager();
if (!CLI) {
Method updateItem
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function updateItem()
{
$purifier = false;
if ($this->config->getShop('itemtext_enable_purifier')) {
$purifier = $this->helper->getPurifier('item');
Function removeDataWhere
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function removeDataWhere($field, $needle, $fieldtoremove)
{
foreach ($this->items as $key => $item) {
if (!empty($item['itm_data']->$field)) {
if ($needle) {
- 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 queryItemWhereClause
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function queryItemWhereClause($mItemIndex = '', $mItemno = '')
{
$sql = ' WHERE ';
$getsearchtext = filter_input(INPUT_GET, 'searchtext', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
if (!empty($mItemno)) {
- 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 getLanguage
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function getLanguage()
{
$langavailable = $this->core['lang_available'];
if (
$this->core['lang_detection_method'] === 'domain'
- 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 getLogin
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private function getLogin()
{
$bTryEmail = false;
if ('cust_no' !== 'cust_email') {
$bTryEmail = true;
- 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 handleEditPage
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
protected function handleEditPage()
{
$requestpagekey = filter_input(INPUT_GET, 'page_key', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
if ($requestpagekey !== null && $Ptoedit = new UserPage($this->serviceManager, $requestpagekey, true)) {
if (filter_input(INPUT_POST, 'action_a') === 'true') {
- 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 preparePage
has a Cognitive Complexity of 16 (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
Method handleEditPage
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function handleEditPage()
{
$requestpagekey = filter_input(INPUT_GET, 'page_key', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
if ($requestpagekey !== null && $Ptoedit = new UserPage($this->serviceManager, $requestpagekey, true)) {
if (filter_input(INPUT_POST, 'action_a') === 'true') {
Function showMyOrders
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private function showMyOrders($COList)
{
$return = '';
$sql = 'SELECT * FROM orders WHERE o_custno = :custno ORDER BY o_ordertimestamp DESC';
- 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 handleItemPage
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function handleItemPage(ServiceManager $serviceManager, \HaaseIT\HCSF\Page $P, array $aP)
{
$mItemIndex = '';
if (isset($P->cb_pageconfig->itemindex)) {
$mItemIndex = $P->cb_pageconfig->itemindex;
- 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 getLogin
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getLogin()
{
$bTryEmail = false;
if ('cust_no' !== 'cust_email') {
$bTryEmail = true;
Method handleForgotPassword
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function handleForgotPassword($aErr) {
if (!filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL)) {
$aErr[] = 'emailinvalid';
} else {
$querybuilder = $this->dbal->createQueryBuilder();
Method calcPrice
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function calcPrice($aData)
{
$aPrice = [];
if ($aData['itm_vatid'] !== 'reduced') {
$aData['itm_vatid'] = 'full';
Method buildOrderMailBody
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function buildOrderMailBody($bCust = true, $iId)
{
$aM = [
'customdata' => $this->helperShop->buildShoppingCartTable($_SESSION['cart'], true),
'currency' => $this->config->getShop('waehrungssymbol'),