Showing 54 of 80 total issues
File field.js
has 5482 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
Function Form
has 201 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Form = function () {
/**
* Create a new Form instance.
*
* @param {object} data
Method fields
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function fields(Request $request)
{
return [
Text::make('ID')->onlyOnDetail(),
Text::make('Slug')->onlyOnDetail(),
Function main
has a Cognitive Complexity of 44 (exceeds 20 allowed). Consider refactoring. Open
Open
func main() {
g := generator.New()
t, err := template.New("protoc-gen-router").Parse(tmpl)
if err != nil {
- 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 xhrAdapter
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function xhrAdapter(config) {
return new Promise(function dispatchXhrRequest(resolve, reject) {
var requestData = config.data;
var requestHeaders = config.headers;
Function dispatchXhrRequest
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
return new Promise(function dispatchXhrRequest(resolve, reject) {
var requestData = config.data;
var requestHeaders = config.headers;
if (utils.isFormData(requestData)) {
Function debounce
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function debounce(func, wait, options) {
var lastArgs,
lastThis,
maxWait,
result,
File edit.blade.php
has 304 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row mb-3">
Consider simplifying this complex logical expression. Open
Open
if ((inherited || hasOwnProperty.call(value, key)) &&
!(skipIndexes && (
// Safari 9 has enumerable `arguments.length` in strict mode.
key == 'length' ||
// Node.js 0.10 has enumerable non-index properties on buffers.
Method run
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function run()
{
$user = '00000000-0000-0000-0000-000000000000';
if (! Post::where('slug', 'lolibrary-open-source')->exists()) {
Function normalizeComponent
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function normalizeComponent (
rawScriptExports,
compiledTemplate,
functionalTemplate,
injectStyles,
Function Errors
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Errors = function () {
/**
* Create a new Errors instance.
*/
function Errors() {
Function makeInvokeMethod
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function makeInvokeMethod(innerFn, self, context) {
var state = GenStateSuspendedStart;
return function invoke(method, arg) {
if (state === GenStateExecuting) {
Function invoke
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
return function invoke(method, arg) {
if (state === GenStateExecuting) {
throw new Error("Generator is already running");
}
Function exports
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function () {
var head, last, notify;
var flush = function () {
var parent, fn;
Method update
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function update(ItemUpdateRequest $request, Item $item)
{
/** @var \App\Models\User $user */
$user = auth()->user();
if ($item->published()) {
Method store
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function store(ItemStoreRequest $request)
{
DB::transaction(function () use ($request) {
$brand = Brand::findOrFail($request->brand);
$category = Category::findOrFail($request->category);
Function maybeInvokeDelegate
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function maybeInvokeDelegate(delegate, context) {
var method = delegate.iterator[context.method];
if (method === undefined) {
// A .throw or .return when the delegate iterator has no .throw
// method always terminates the yield* loop.
Function exports
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
$iterCreate(Constructor, NAME, next);
var getMethod = function (kind) {
if (!BUGGY && kind in proto) return proto[kind];
switch (kind) {
Function notify
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var notify = function (promise, isReject) {
if (promise._n) return;
promise._n = true;
var chain = promise._c;
microtask(function () {