Showing 428 of 1,426 total issues
Function hide
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
_proto.hide = function hide() {
var _this2 = this;
if (this._isTransitioning || !$$$1(this._element).hasClass(ClassName.SHOW)) {
return;
Function expandAllRows
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
BootstrapTable.prototype.expandAllRows = function (isSubTable) {
if (isSubTable) {
var $tr = this.$body.find(sprintf('> tr[data-index="%s"]', 0)),
that = this,
detailIcon = null,
Function toggle
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
_proto.toggle = function toggle() {
var triggerChangeEvent = true;
var addAriaPressed = true;
var rootElement = $$$1(this._element).closest(Selector.DATA_TOGGLE)[0];
Function _dataApiKeydownHandler
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
// If not input/textarea:
// - And not a key in REGEXP_KEYDOWN => not a dropdown command
// If input/textarea:
// - If space key => not a dropdown command
Method buildForm
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function buildForm(FormBuilderInterface $builder, array $options)
{
/** @var TranslatorInterface $translator */
$translator = $options['translator'];
Method newQuestionFromData
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function newQuestionFromData(
UuidFactoryInterface $uuidFactory,
NotEmptyString $imageFileName,
array $data
): Question {
Function _clearMenus
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Dropdown._clearMenus = function _clearMenus(event) {
if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
return;
}
Function setFieldIndex
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
var setFieldIndex = function (columns) {
var i, j, k,
totalCol = 0,
flag = [];
Method requestPassword
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function requestPassword(Request $request): Response
{
$form = $this->createRequestPasswordForm();
$form->handleRequest($request);
Function controller
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
controller: function (quizId, score, totalQuestions) {
setViewValue('score', score);
setViewValue('totalQuestions', totalQuestions);
view.find('button.gvq-play-again').on('click', function () {
Method denormalize
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function denormalize($data, $class, $format = null, array $context = []): Question
{
$category = $this->categoryDenormalizer->denormalize(
$data['category'],
Category::class,
Method __construct
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
TranslatorInterface $translator,
UuidFactoryInterface $uuidFactory,
UserRepository $userRepository,
CompanyRepository $companyRepository,
RegistrationRepository $registrationRepository,
Method __construct
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Year $year,
ContestService $contestService,
UuidFactoryInterface $uuidFactory,
QuizRepository $quizRepository,
TieBreakerRepository $tieBreakerRepository,
Function validate
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function validate($value, Constraint $constraint): void
{
if ($constraint instanceof UserIsUnique) {
$user = $this->userRepository->getByEmail(new Email($value));
$raiseError = false;
- 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 validate
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function validate($value, Constraint $constraint): void
{
if ($constraint instanceof AliasIsUnique) {
$company = $this->companyRepository->getByAlias(new Alias($value));
$raiseError = false;
- 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 __construct
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Year $year,
UserRepository $userRepository,
CompanyRepository $companyRepository,
DashboardService $dashboardService,
StatisticsService $statisticsService,
Method __construct
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
string $id,
string $language,
int $year,
CategoryEntity $categoryEntity,
string $text,
Function getEventBus
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function getEventBus(InputInterface $input): SimpleEventBus
{
$name = $input->getOption('projector');
$eventBus = 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 validate
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function validate($value, Constraint $constraint): void
{
if ($constraint instanceof CompanyIsUnique) {
$company = $this->companyRepository->getByName(new NotEmptyString($value));
$raiseError = false;
- 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 load
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.fn.load = function( url, params, callback ) {
var selector, type, response,
self = this,
off = url.indexOf( " " );