Showing 83 of 114 total issues
Function deselectAll
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
deselectAll: function (justVisible, triggerOnDeselectAll) {
var justVisible = typeof justVisible === 'undefined' ? true : justVisible;
var allLis = $("li:not(.divider):not(.disabled):not(.multiselect-group)", this.$ul);
var visibleLis = $("li:not(.divider):not(.disabled):not(.multiselect-group):not(.multiselect-filter-hidden):not(.multiselect-collapisble-hidden)", this.$ul).filter(':visible');
Function selectAll
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
selectAll: function (justVisible, triggerOnSelectAll) {
var justVisible = typeof justVisible === 'undefined' ? true : justVisible;
var allLis = $("li:not(.divider):not(.disabled):not(.multiselect-group)", this.$ul);
var visibleLis = $("li:not(.divider):not(.disabled):not(.multiselect-group):not(.multiselect-filter-hidden):not(.multiselect-collapisble-hidden)", this.$ul).filter(':visible');
Function prepareAjaxRequest
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function prepareAjaxRequest($queryBuilder, $search, $custom)
{
if (!empty($search)) {
$queryBuilder->where(
- 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 processVendors
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function processVendors()
{
$vendors = $this->vendorManager->findAll();
$logs = array();
Method create
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
$email,
$miraklId,
$hipayId,
$hipayUserSpaceId,
$hipayIdentified,
Function processVendors
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function processVendors()
{
$vendors = $this->vendorManager->findAll();
$logs = 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 prepareAjaxData
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function prepareAjaxData($data)
{
foreach ($data as $key => $logRow) {
$data[$key]['startedAt'] = $logRow['startedAt']->format('Y-m-d H:i:s');
- 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 reRunAction
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function reRunAction(Request $request)
{
$reRunForm = $this->generateReRunForm();
$settingsForm = $this->generateSettingsForm();
- 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 __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($miraklId = null, $action = null, $message = null, $context = null, $level = null,
$levelName = null, $extra = null)
Avoid deeply nested control flow statements. Open
if (this.options.enableCaseInsensitiveFiltering) {
filterCandidate = filterCandidate.toLowerCase();
this.query = this.query.toLowerCase();
}
Avoid deeply nested control flow statements. Open
if (this.options.enableFullValueFiltering && this.options.filterBehavior !== 'both') {
var valueToMatch = filterCandidate.trim().substring(0, this.query.length);
if (this.query.indexOf(valueToMatch) > -1) {
showElement = true;
}
Function processVendors
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function processVendors()
{
$vendors = $this->vendorManager->findAll();
$logs = 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 prepareAjaxData
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function prepareAjaxData($data)
{
foreach ($data as $key => $logRow) {
$data[$key]['date'] = $logRow['date']->format('Y-m-d H:i:s');
$data[$key]['statusWalletAccount'] = 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
Avoid deeply nested control flow statements. Open
if(!showElement){
$(element).css('display', 'none');
$(element).addClass('multiselect-filter-hidden');
}
Method create
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function create($miraklId, $hipayId, $paymentVoucher, $amount, $originAmount, $balance)
Method findAjax
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function findAjax($first, $limit, $sortedColumn, $dir, $search, $custom)
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($miraklId, $hipayId, $paymentVoucher, $amount, $originAmount, $balance)
Avoid deeply nested control flow statements. Open
if ($(element).hasClass('multiselect-group')) {
// Remember group status.
currentGroup = element;
currentGroupVisible = showElement;
}
Avoid deeply nested control flow statements. Open
if(showElement){
$(element).css('display', 'block');
$(element).removeClass('multiselect-filter-hidden');
}
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
LoggerInterface $logger,
Processor $processor,
VendorManagerInterface $manager,
VendorInterface $operator,
VendorInterface $technical