Showing 127 of 127 total issues
Function parseOrderCustomer
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
public function parseOrderCustomer($response)
{
foreach ($response->transactions->transaction as $transaction) {
// if not a guest transaction in FoxyCart
if (isset($transaction->customer_email) && $transaction->is_anonymous == 0) {
- Read upRead up
- Create a ticketCreate a ticket
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 easeInBack
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInBack: function (x, t, b, c, d, s) {
- Create a ticketCreate a ticket
Function getProductOptionSet
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function getProductOptionSet()
{
$options = $this->product->ProductOptions();
$groupedOptions = new GroupedList($options);
$groupedBy = $groupedOptions->groupBy('ProductOptionGroupID');
- Read upRead up
- Create a ticketCreate a ticket
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 deeply nested control flow statements. Open
Open
if ($result = $client->get($store_exists_uri, $data)) {
$errors = array_merge($errors, $client->getErrors($result));
if ($store = $client->getLink('fx:store')) {
$errors = array_merge($errors, $client->getErrors($store));
$this->current_store = $store;
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
Open
} else if ( ( window.navigator.msPointerEnabled ) || e.touches.length === 1 ) {
slider.pause();
// CAROUSEL:
cwidth = (vertical) ? slider.h : slider. w;
startT = Number(new Date());
- Create a ticketCreate a ticket
Function queryNewValue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
queryNewValue = function (code, newValue, link, id, clicked) {
- Create a ticketCreate a ticket
Function easeOutElastic
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeOutElastic: function (x, t, b, c, d) {
- Create a ticketCreate a ticket
Function easeInOutExpo
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInOutExpo: function (x, t, b, c, d) {
- Create a ticketCreate a ticket
Function easeInSine
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInSine: function (x, t, b, c, d) {
- Create a ticketCreate a ticket
Function flexAnimate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
slider.flexAnimate = function(target, pause, override, withSync, fromNav) {
- Create a ticketCreate a ticket
Function easeInQuad
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInQuad: function (x, t, b, c, d) {
- Create a ticketCreate a ticket
Function easeInOutCubic
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInOutCubic: function (x, t, b, c, d) {
- Create a ticketCreate a ticket
Function easeOutCubic
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeOutCubic: function (x, t, b, c, d) {
- Create a ticketCreate a ticket
Function easeInCirc
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInCirc: function (x, t, b, c, d) {
- Create a ticketCreate a ticket
Function easeOutCirc
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeOutCirc: function (x, t, b, c, d) {
- Create a ticketCreate a ticket
Function easeInQuart
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInQuart: function (x, t, b, c, d) {
- Create a ticketCreate a ticket
Function easeOutExpo
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeOutExpo: function (x, t, b, c, d) {
- Create a ticketCreate a ticket
Function easeInOutQuint
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInOutQuint: function (x, t, b, c, d) {
- Create a ticketCreate a ticket
Function easeOutQuad
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeOutQuad: function (x, t, b, c, d) {
- Create a ticketCreate a ticket
Function easeInOutQuad
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInOutQuad: function (x, t, b, c, d) {
- Create a ticketCreate a ticket