Showing 495 of 495 total issues
Function init
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
static init(container)
{
if (container.hasClass('modifier-modal')) {
container.find('form').addClass('form-disabled');
Function sumUpProducts
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
private function sumUpProducts($booking, &$datarow)
{
/*
TODO: Nel caso di prenotazioni salvate sarebbe molto più efficiente
cambiare semplicemente lo stato della prenotazione stessa, giacché
- 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 list
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function list($request)
{
/*
TODO sarebbe assai più efficiente usare with('sender') e
with('target'), ma poi la relazione in Movement si spacca (cambiando
- 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 document
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function document(Request $request, $type, $subtype = 'none')
{
$user = $this->checkAuth();
switch ($type) {
- 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 computeStrings
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function computeStrings()
{
$names = [];
$dates = [];
- 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
File utils.js
has 309 lines of code (exceeds 250 allowed). Consider refactoring. Open
require('continous-calendar');
import jBob from "jbob";
import Lists from "./lists";
File MovementsService.php
has 306 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace App\Services;
use App\Exceptions\IllegalArgumentException;
Aggregate
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
class Aggregate extends Model
{
use HasFactory, GASModel, ModifiableTrait, ReducibleTrait, WithinGas;
protected $dispatchesEvents = [
Function init
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
static init(container)
{
$('.reloader', container).click(function(e) {
var listid = $(this).attr('data-reload-target');
File edit.blade.php
has 303 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
$more_orders = ($aggregate->orders->count() > 1);
$handling_movements = someoneCan('movements.admin', $currentgas);
$tot_amount = 0;
Function updateAccessType
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
private function updateAccessType($id, $request)
{
$user = Auth::user();
if (is_null($user)) {
throw new AuthException(401);
- 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 init
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
static init(container)
{
$('.icons-legend button, .icons-legend a', container).click((e) => {
e.preventDefault();
this.iconsLegendTrigger($(e.currentTarget), '.icons-legend');
File Role.php
has 299 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
Callables
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class Callables {
static attachUserRole(role_id, user_id, target_id, target_class) {
utils.postAjax({
method: 'POST',
url: 'roles/attach',
UsersController
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class UsersController extends BackedController
{
public function __construct(UsersService $service)
{
$this->middleware('auth');
Method displayColumns
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function displayColumns()
{
$ret = [
'selection' => (object) [
'label' => _i('Selezione'),
Function systemInit
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function systemInit($mov)
{
$mov->callbacks = [
'pre' => function (Movement $movement) {
/*
- 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 paymentsByType
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
function paymentsByType($type)
{
$ret = [];
if ($type != null) {
- 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 minimumRedux
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function minimumRedux($modifiers)
{
if ($modifiers->isEmpty()) {
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
File Product.php
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;