Showing 68 of 213 total issues
File markdown.js
has 999 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Released under MIT license
// Copyright (c) 2009-2010 Dominic Baggott
// Copyright (c) 2009-2010 Ash Berlin
// Copyright (c) 2011 Christoph Dorn <christoph@christophdorn.com> (http://www.christophdorn.com)
File bootstrap-markdown.js
has 978 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* ===================================================
* bootstrap-markdown.js v2.9.0
* http://github.com/toopay/bootstrap-markdown
* ===================================================
* Copyright 2013-2015 Taufan Aditya
File routes.php
has 462 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
use Illuminate\Routing\Router;
/*
Function showEditor
has 168 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, showEditor: function() {
var instance = this,
textarea,
ns = this.$ns,
container = this.$element,
Function lists
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
lists: (function( ) {
// Use a closure to hide a few variables.
var any_list = "[*+-]|\\d+\\.",
bullet_list = /[*+-]/,
number_list = /\d+\./,
Function toMarkdown
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var toMarkdown = function(string) {
var ELEMENTS = [
{
patterns: 'p',
Method up
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function up()
{
Schema::create('work_requests', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
Function toMarkdown
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
Open
var toMarkdown = function(string) {
var ELEMENTS = [
{
patterns: 'p',
- 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
File base.js
has 361 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// JavaScript Document
/*
* Set ajax cache to false to prevent back
* button from spewing json responses
File app.js
has 360 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// JavaScript Document
/*
* Set ajax cache to false to prevent back
* button from spewing json responses
Function convert_tree_to_html
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function convert_tree_to_html( tree, references, options ) {
var i;
options = options || {};
// shallow clone
WorkOrderViewer
has 31 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class WorkOrderViewer extends BaseViewer
{
/**
* The work order profile view.
*
File permissions.php
has 319 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/*
* Default Permissions configuration file.
*
WorkOrder
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class WorkOrder extends Model
{
use SoftDeletes, HasNotesTrait, HasLocationTrait, HasUserTrait, HasEventsTrait, HasCategoryTrait;
/**
Method form
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function form(Asset $asset)
{
return $this->form->of('assets', function (FormGrid $form) use ($asset) {
if ($asset->exists) {
$method = 'PATCH';
EventViewer
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class EventViewer extends BaseViewer
{
/**
* Returns the API events profile view.
*
Method form
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function form(WorkOrder $workOrder)
{
return $this->form->of('work-orders', function (FormGrid $form) use ($workOrder) {
if ($workOrder->exists) {
$method = 'PATCH';
Method up
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function up()
{
Schema::create('inventories', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
Function datePicker
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Grid.Index.datePicker = function()
{
var startDate, endDate, config, filter;
var filters = _.compact(
Function link
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
"[": function link( text ) {
var orig = String(text);
// Inline content is possible inside `link text`
var res = Markdown.DialectHelpers.inline_until_char.call( this, text.substr(1), ']' );