Showing 83 of 114 total issues
File bootstrap-multiselect.js
has 1156 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* Bootstrap Multiselect (http://davidstutz.de/bootstrap-multiselect/)
*
* Apache License, Version 2.0:
* Copyright (c) 2012 - 2017 David Stutz
Function buildDropdownOptions
has 220 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
buildDropdownOptions: function() {
this.$select.children().each($.proxy(function(index, element) {
var $element = $(element);
Function buildFilter
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
buildFilter: function() {
// Build filter if filtering OR case insensitive filtering is enabled and the number of options exceeds (or equals) enableFilterLength.
if (this.options.enableFiltering || this.options.enableCaseInsensitiveFiltering) {
var enableFilterLength = Math.max(this.options.enableFiltering, this.options.enableCaseInsensitiveFiltering);
Operation
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Operation implements OperationInterface
{
/**
* @var int
* @ORM\Id
Function init
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init: function(element, valueAccessor, allBindings, viewModel, bindingContext) {
var $element = $(element);
var config = ko.toJS(valueAccessor());
$element.multiselect(config);
Function is_writable_r
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
Open
private function is_writable_r($dir)
{
if (is_dir($dir)) {
if (is_writable($dir)) {
$objects = scandir($dir);
- 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
LogVendors
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class LogVendors implements LogVendorsInterface
{
/**
* @var int
*
OperationRepository
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class OperationRepository extends AbstractTableRepository implements ManagerInterface
{
protected $privateLabelTemplate = "private {{miraklId}} – {{hipayId}} - {{cycleDate}}";
protected $publicLabelTemplate = "public {{miraklId}} – {{hipayId}} - {{cycleDate}}";
Function searchTimeout
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.searchTimeout = this.asyncFunction($.proxy(function() {
if (this.query !== event.target.value) {
this.query = event.target.value;
File SettingController.php
has 268 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* 2017 HiPay
*
* NOTICE OF LICENSE
Method prepareAjaxRequest
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function prepareAjaxRequest($queryBuilder, $search, $custom)
{
if (!empty($search)) {
$queryBuilder->andWhere(
$queryBuilder->expr()->orX(
Vendor
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Vendor implements VendorInterface, Timestampable
{
/**
* @var int
*
LogOperations
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class LogOperations implements LogOperationsInterface
{
/**
* @var int
*
Function createOptionValue
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createOptionValue: function(element) {
var $element = $(element);
if ($element.is(':selected')) {
$element.prop('selected', true);
}
Function prepareAjaxRequest
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function prepareAjaxRequest($queryBuilder, $search, $custom)
{
if (!empty($search)) {
$queryBuilder->andWhere(
$queryBuilder->expr()->orX(
- 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 generateSettingsForm
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function generateSettingsForm()
{
$default = array(
'token' => $this->parameters->offsetGet('github.token'),
Method prepareAjaxData
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
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(
Function dataprovider
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
dataprovider: function(dataprovider) {
var groupCounter = 0;
var $select = this.$select.empty();
Function refresh
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
refresh: function () {
var inputs = {};
$('li input', this.$ul).each(function() {
inputs[$(this).val()] = $(this);
});
Function Multiselect
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Multiselect(select, options) {
this.$select = $(select);
this.options = this.mergeOptions($.extend({}, options, this.$select.data()));