Showing 37 of 149 total issues
Function nxt_motor
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
function nxt_motor() {
motorHTML = `
<div id="left">
<div id="port">
<h3>Port</h3>
Method run
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
$post = $this->findPost('lorem-ipsum-post');
if (!$post->exists) {
$post->fill([
Method dataTypesTranslations
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function dataTypesTranslations()
{
// Adding translations for 'display_name_singular'
//
$_fld = 'display_name_singular';
File CountryToLang.php
has 253 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
|--------------------------------------------------------------------------
| Country Code to Language Code
File CountryToCode.php
has 252 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
|--------------------------------------------------------------------------
| Country Name to Country Code
Method handle
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle()
{
$originalTile = $this->ask('Please give a title to the post:');
$author = $this->ask('Please specify the author:');
$image = $image_alt = "";
Function fileUpload
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function fileUpload() {
var x = document.getElementById("myFile");
var txt = "";
if ('files' in x) {
if (x.files.length == 0) {
- 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 nxt_sound
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function nxt_sound() {
soundHTML = `
<div id="left">
<div id="action">
<h3>Action</h3>
Method menusTranslations
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function menusTranslations()
{
$_tpl = ['menu_items', 'title'];
$_item = $this->findMenuItem('Dashboard');
if ($_item->exists) {
Function dataTypesTranslations
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private function dataTypesTranslations()
{
// Adding translations for 'display_name_singular'
//
$_fld = 'display_name_singular';
- 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 menusTranslations
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function menusTranslations()
{
$_tpl = ['menu_items', 'title'];
$_item = $this->findMenuItem('Dashboard');
if ($_item->exists) {
- 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 __modal__
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function __modal__(header, htmlBody) {
var html = `
<div class="modal-content">
<div class="modal-header">
<span class="close">Χ</span>
Method up
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function up()
{
// Create table for storing roles
Schema::create('data_types', function (Blueprint $table) {
$table->increments('id');
Function run
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function run()
{
$setting = $this->findSetting('site.title');
if (!$setting->exists) {
$setting->fill([
- 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 Content
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function Content(path) {
if (path === "") {
return;
} else {
if (window.XMLHttpRequest) {
- 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 handle
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function handle()
{
$indexJsonFile = file_get_contents(resource_path('views/blog/index.json'));
$indexDecode = json_decode($indexJsonFile, true);
- 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 run
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function run()
{
$dataType = $this->dataType('slug', 'posts');
if (!$dataType->exists) {
$dataType->fill([
- 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"