Showing 428 of 1,426 total issues
Function handle
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
public function handle(DomainMessage $domainMessage)
{
$payload = $domainMessage->getPayload();
if ($payload instanceof EmailRegistered) {
- 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 resetFooter
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
BootstrapTable.prototype.resetFooter = function () {
var that = this,
data = that.getData(),
html = [];
Function _fnFilterData
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnFilterData ( settings )
{
var columns = settings.aoColumns;
var column;
var i, j, ien, jen, filterData, cellData, row;
Function _selector_row_indexes
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var _selector_row_indexes = function ( settings, opts )
{
var
i, ien, tmp, a=[],
displayFiltered = settings.aiDisplay,
Function _fnInitialise
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnInitialise ( settings )
{
var i, iLen, iAjaxStart=settings.iInitDisplayStart;
var columns = settings.aoColumns, column;
var features = settings.oFeatures;
Function controller
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
controller: function () {
var sequences = [
{pct: 20, label: '4'},
{pct: 40, label: '3'},
{pct: 60, label: '2'},
Method answerQuestion
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function answerQuestion(
\DateTimeImmutable $answeredOn,
?Answer $answer
): void {
if ($this->askingQuestion) {
Method start
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function start(Request $request): Response
{
try {
/** @var StartQuiz $startQuiz */
$startQuiz = $this->serializer->deserialize(
Function toggle
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_proto.toggle = function toggle() {
if (this._element.disabled || $$$1(this._element).hasClass(ClassName.DISABLED)) {
return;
}
Function __details_events
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var __details_events = function ( settings )
{
var api = new _Api( settings );
var namespace = '.dt.DT_details';
var drawEvent = 'draw'+namespace;
Function renderAnsweredQuestion
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function renderAnsweredQuestion (data) {
let answerResult = 'wrong';
for (var i = 1; i <= 3; i++) {
view.find('[data-value="answer' + i + '"]').hide();
Function access
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
var i = 0,
len = elems.length,
bulk = key == null;
Function extend
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.extend = jQuery.fn.extend = function() {
var options, name, src, copy, copyIsArray, clone,
target = arguments[ 0 ] || {},
i = 1,
length = arguments.length,
Function stop
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
stop: function( type, clearQueue, gotoEnd ) {
var stopQueue = function( hooks ) {
var stop = hooks.stop;
delete hooks.stop;
stop( gotoEnd );
Function style
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
style: function( elem, name, value, extra ) {
// Don't set styles on text and comment nodes
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
return;
Function initContainer
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
BootstrapTable.prototype.initContainer = function () {
this.$container = $([
'<div class="bootstrap-table">',
'<div class="fixed-table-toolbar"></div>',
this.options.paginationVAlign === 'top' || this.options.paginationVAlign === 'both' ?
Function _fnFeatureHtmlPaginate
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnFeatureHtmlPaginate ( settings )
{
var
type = settings.sPaginationType,
plugin = DataTable.ext.pager[ type ],
Method getTopCompanies
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getTopCompanies(NaturalNumber $nrOfPassedEmployees): iterable
{
$batchSize = 10;
$firstResult = 0;
Method buildForm
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function buildForm(FormBuilderInterface $builder, array $options)
{
parent::buildForm($builder, $options);
$languages = $options['languages']->toArray();
Method edit
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function edit(Request $request, string $id): Response
{
$question = $this->questionRepository->getById(
$this->uuidFactory->fromString($id)
);