Showing 428 of 1,426 total issues
Method getEventBus
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getEventBus(InputInterface $input): SimpleEventBus
{
$name = $input->getOption('projector');
$eventBus = null;
Method generateQuestions
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function generateQuestions(Language $language, Year $year, ?string $firstQuestionId): Questions
{
$pickedQuestions = [];
$firstQuestion = null;
Function requestPassword
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Open
public function requestPassword(Request $request): Response
{
$form = $this->createRequestPasswordForm();
$form->handleRequest($request);
- 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 _fnColumnTypes
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnColumnTypes ( settings )
{
var columns = settings.aoColumns;
var data = settings.aoData;
var types = DataTable.ext.type.detect;
Function hide
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_proto.hide = function hide(callback) {
var _this2 = this;
var tip = this.getTipElement();
var hideEvent = $$$1.Event(this.constructor.Event.HIDE);
Function resetView
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
BootstrapTable.prototype.resetView = function (params) {
var padding = 0;
if (params && params.height) {
this.options.height = params.height;
Function data
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.data = s ? $.grep(this.data, function (item, i) {
for (var j = 0; j < that.header.fields.length; j++) {
if (!that.header.searchables[j]) {
continue;
Function objectKeys
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var objectKeys = function () {
// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys
if (!Object.keys) {
Object.keys = (function() {
var hasOwnProperty = Object.prototype.hasOwnProperty,
Method buildForm
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function buildForm(FormBuilderInterface $builder, array $options)
{
$this->translator = $options['translator'];
$builder
Method __construct
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
string $id,
int $year,
string $language,
string $channel,
ContestParticipantEmbeddable $contestParticipant,
Method __construct
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
UuidInterface $id,
Year $year,
Language $language,
QuizChannel $channel,
ContestParticipant $contestParticipant,
Function handlers
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
handlers: function( event, handlers ) {
var i, handleObj, sel, matchedHandlers, matchedSelectors,
handlerQueue = [],
delegateCount = handlers.delegateCount,
cur = event.target;
Function setOffset
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setOffset: function( elem, options, i ) {
var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
position = jQuery.css( elem, "position" ),
curElem = jQuery( elem ),
props = {};
Function jqueryui
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jqueryui: function ( settings, cell, column, classes ) {
$('<div/>')
.addClass( classes.sSortJUIWrapper )
.append( cell.contents() )
.append( $('<span/>')
Function show
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_proto.show = function show(relatedTarget) {
var _this = this;
if (this._isTransitioning || this._isShown) {
return;
Method denormalize
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function denormalize($data, $class, $format = null, array $context = array()): Company
{
$translatedAliases = array_map(
function (array $translatedAlias) use ($format) {
return $this->translatedAliasDenormalizer->denormalize(
Method report
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function report(): Response
{
if ($this->canViewReport()) {
$correctNlQuestions = $this->reportService->getCorrectQuestions(
new Language(Language::NL)
Function controller
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
controller: function (quizId, score, totalQuestions) {
setViewValue('score', score);
setViewValue('totalQuestions', totalQuestions);
function checkEmail () {
Consider simplifying this complex logical expression. Open
Open
if ( ie67 || ! userInputs && ! scrollX && ! scrollY &&
columnCount == _fnVisbleColumns( oSettings ) &&
columnCount == headerCells.length
) {
for ( i=0 ; i<columnCount ; i++ ) {
Function showHide
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function showHide( elements, show ) {
var display, elem,
values = [],
index = 0,
length = elements.length;