Showing 46 of 108 total issues
Method registration
has 512 lines of code (exceeds 25 allowed). Consider refactoring. Open
function registration($app)
{
// Library group
$app->group('/registrazione', function () use ($app) {
Method sfide
has 482 lines of code (exceeds 25 allowed). Consider refactoring. Open
function sfide($app)
{
$app->group('/sfide', function () use ($app) {
$app->get('/:id', function ($sfida_id) use ($app) {
File registration.php
has 519 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use Dreamland\Errori;
use Dreamland\Ruoli;
use RedBean_Facade as R;
File sfide.php
has 492 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use BitPrepared\Event\EventElement;
use BitPrepared\Event\EventManager;
use Dreamland\Errori;
Method squadriglia
has 168 lines of code (exceeds 25 allowed). Consider refactoring. Open
function squadriglia($app)
{
$app->group('/squadriglia', function () use ($app) {
$app->get('/', function () use ($app) {
Method editor
has 157 lines of code (exceeds 25 allowed). Consider refactoring. Open
function editor($app)
{
// Library group
$app->group('/editor', function () use ($app) {
Function sfideController
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
var sfideController = dreamApp.controller('SfideController', function ($scope, $q, $rootScope, $http, $state, ngDialog, $stateParams, Portal, $window) {
$scope.sfidaid = angular.isDefined($stateParams.id) ? $stateParams.id : -1;
$scope.squadriglia = null;
$scope.sfida = null;
Function registrationController
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
var registrationController = dreamApp.controller('RegistrationController', function ($scope, $rootScope, $http, $state, ngDialog, Portal, $stateParams, $window) {
$scope.ruolisquadriglia = [ {'desc' : 'Altro' , 'code' : 3}, {'desc' : 'Capo Sq.', 'code' : 1}, {'desc' : 'Vice capo Sq.', 'code' : 2} ];
$scope.caller = '';
Function chiusuraController
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
var chiusuraController = dreamApp.controller('ChiusuraController', function ($scope, $q, $rootScope, $http, $state, ngDialog, $stateParams, Portal, $window, $log) {
$scope.sfidaid = angular.isDefined($stateParams.id) ? $stateParams.id : -1;
$scope.squadriglia = null;
$scope.sfida = null;
Method asa
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
function asa($app)
{
// Library group
$app->group('/asa', function () use ($app) {
Function findDatiCapoReparto
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
function findDatiCapoReparto($regione, $gruppo, $legame = null)
{
$info_cc = [];
if (null != $legame) {
$legameBean = R::findOne('legami', ' codicecensimento = ? ', [$legame]);
- 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 configure_slim
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
function configure_slim($config)
{
$log_level = \Slim\Log::WARN;
$log_enable = false;
if (isset($config['log'])) {
Function configure_slim
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function configure_slim($config)
{
$log_level = \Slim\Log::WARN;
$log_enable = false;
if (isset($config['log'])) {
- 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 15 (exceeds 5 allowed). Consider refactoring. Open
public function send($referenceCode, $toEmailAddress, $subject, $txtMessage, $htmlMessage = null, $attachment = null)
{
$this->lastId = -1;
$result = false;
foreach ($this->pipe as $sender) {
- 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 findDatiCapoReparto
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function findDatiCapoReparto($regione, $gruppo, $legame = null)
{
$info_cc = [];
if (null != $legame) {
$legameBean = R::findOne('legami', ' codicecensimento = ? ', [$legame]);
Method livello
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function livello($livelloArrayA, $livelloArrayB, $livelloArrayC, $stelleAssoc)
{
?>
<div class="container">
Method livello
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function livello($livelloArrayA, $livelloArrayB, $livelloArrayC, $stelleAssoc)
{
?>
<div class="container">
Method send
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function send($referenceCode, $toEmailAddress, $subject, $txtMessage, $htmlMessage = null, $attachment = null)
{
$this->lastId = -1;
try {
Function editorController
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
var editorController = dreamApp.controller('EditorController', function ($scope, $rootScope, $http, $log,$state, $stateParams) {
$scope.stato = "alert-info";
$scope.result = ".";
$scope.gruppo = null;
Function portal
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
var portal = sharedServicesModule.service('Portal', function ($http) {
this.loadSquadriglia = function (x,y) {
$http.get('./api/squadriglia/').
success(function(data, status, headers, config) {