Showing 251 of 1,173 total issues
Function show
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Modal.prototype.show = function (_relatedTarget) {
var that = this
var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
this.$element.trigger(e)
Method getChildren
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getChildren(
array $criteria = [],
$order = '',
$start = 0,
$limit = 0,
Function backdrop
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Modal.prototype.backdrop = function (callback) {
var that = this
var animate = this.$element.hasClass('fade') ? 'fade' : ''
if (this.isShown && this.options.backdrop) {
Function activate
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Tab.prototype.activate = function (element, container, callback) {
var $active = container.find('> .active')
var transition = callback
&& $.support.transition
&& ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
Method batchDeleteGroup
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function batchDeleteGroup()
{
$inputs = (new Request('POST'))->getInputs();
/**
Method batchDeleteMember
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function batchDeleteMember()
{
$inputs = (new Request('POST'))->getInputs();
/**
Method safeBatchDeleteMessage
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function safeBatchDeleteMessage()
{
$inputs = (new Request('POST'))->getInputs();
/**
Method batchDeleteMessage
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function batchDeleteMessage()
{
$inputs = (new Request('POST'))->getInputs();
/**
Method getOneByUsername
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getOneByUsername($username, $status = null, $excludeArchived = true)
{
/**
* start validating.
*/
Method getOneByName
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getOneByName($name, $status = null, $excludeArchived = true)
{
/**
* Start validating.
*/
Method getFieldsValues
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getFieldsValues(array $inputs, array $definedInputs, $case, array $columnsWhitelist = [])
{
$fieldsValues = [];
if (!empty($definedInputs)) {
foreach ($definedInputs as $definedInput) {
Function show
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Collapse.prototype.show = function () {
if (this.transitioning || this.$element.hasClass('in')) return
var activesData
var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
Function arrayComparison
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function arrayComparison(array $oldArray, array $newArray)
{
$toBeDeleted = [];
$toBeAdded = [];
- 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 send
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function send($to, $subject, $message)
{
if (empty($to)) {
throw new \Exception('Recipient for sending email cannot be empty');
}
- 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 generateDropDownList
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function generateDropDownList($options, $name = null, $selected = null, array $configs = [])
{
if (empty($options)) {
return '';
}
- 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 make
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function make(Page $page, array $templates, $masterTemplate = null, $formHandler = null)
{
// set master template
if ($masterTemplate === null) {
$this->getMaster()->setTemplateName($this->getConfig()->get('defaultMasterTemplate'));
- 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 generateCheckboxes
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function generateCheckboxes($options, $name = null, $checked = null, array $configs = [])
{
$html = '';
$name = ($name !== null) ? " name='{$name}'" : '';
- 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 getServer
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function getServer($key)
{
switch ($key) {
case 'SERVER_NAME':
$info = filter_input(INPUT_SERVER, 'SERVER_NAME', FILTER_SANITIZE_STRING);
- 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 success
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
success: function(response) {
// if redirectTo is specified
if (response.redirectTo !== undefined && response.redirectTo !== null) {
window.location.href = response.redirectTo;
}
Method generateDropDownList
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function generateDropDownList($options, $name = null, $selected = null, array $configs = [])
{
if (empty($options)) {
return '';
}