Showing 428 of 1,426 total issues
Method sendActivation
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function sendActivation(Request $request, string $id): Response
{
$user = $this->userRepository->getById(Uuid::fromString($id));
if (!$user) {
Function controller
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
controller: function (quizId, questionNr) {
let deferredRender = $.Deferred();
let counterInterval;
function startCountdown () {
Function init
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init = jQuery.fn.init = function( selector, context, root ) {
var match, elem;
// HANDLE: $(""), $(null), $(undefined), $(false)
if ( !selector ) {
Function _fnPageChange
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnPageChange ( settings, action, redraw )
{
var
start = settings._iDisplayStart,
len = settings._iDisplayLength,
Function iterator
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
iterator: function ( flatten, type, fn, alwaysNew ) {
var
a = [], ret,
i, ien, j, jen,
context = this.context,
Method buildForm
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function buildForm(FormBuilderInterface $builder, array $options)
{
$this->user = $options['user'];
$this->translator = $options['translator'];
Function _showBackdrop
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_proto._showBackdrop = function _showBackdrop(callback) {
var _this8 = this;
var animate = $$$1(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
Function _fnSortListener
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnSortListener ( settings, colIdx, append, callback )
{
var col = settings.aoColumns[ colIdx ];
var sorting = settings.aaSorting;
var asSorting = col.asSorting;
Function __row_selector
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var __row_selector = function ( settings, selector, opts )
{
var rows;
var run = function ( sel ) {
var selInt = _intVal( sel );
Method editImage
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function editImage(Request $request, string $id): Response
{
$question = $this->questionRepository->getById(
$this->uuidFactory->fromString($id)
);
Function generateQuestions
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
Open
private function generateQuestions(Language $language, Year $year, ?string $firstQuestionId): Questions
{
$pickedQuestions = [];
$firstQuestion = 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 remove
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
remove: function( elem, types, handler, selector, mappedTypes ) {
var j, origCount, tmp,
events, t, handleObj,
special, handlers, type, namespaces, origType,
Function buildFragment
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildFragment( elems, context, scripts, selection, ignored ) {
var elem, tmp, tag, wrap, contains, j,
fragment = context.createDocumentFragment(),
nodes = [],
i = 0,
Function loaded
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var loaded = function ( s ) {
if ( ! s || ! s.time ) {
callback();
return;
}
Method execute
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): void
{
$helper = $this->getHelper('question');
$question = new ConfirmationQuestion('Continue with cleaning the read models? ', false);
Consider simplifying this complex logical expression. Open
Open
if ( ( mappedTypes || origType === handleObj.origType ) &&
( !handler || handler.guid === handleObj.guid ) &&
( !tmp || tmp.test( handleObj.namespace ) ) &&
( !selector || selector === handleObj.selector ||
selector === "**" && handleObj.selector ) ) {
Function _fnCreateTr
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnCreateTr ( oSettings, iRow, nTrIn, anTds )
{
var
row = oSettings.aoData[iRow],
rowData = row._aData,
Function _fnApplyColumnDefs
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnApplyColumnDefs( oSettings, aoColDefs, aoCols, fn )
{
var i, iLen, j, jLen, k, kLen, def;
var columns = oSettings.aoColumns;
Function _fnSortFlatten
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnSortFlatten ( settings )
{
var
i, iLen, k, kLen,
aSort = [],
Function run
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var run = function ( sel ) {
var selInt = _intVal( sel );
var i, ien;
// Short cut - selector is a number and no options provided (default is