Showing 37 of 149 total issues
Method run
has 863 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function run()
{
$postDataType = DataType::where('slug', 'posts')->firstOrFail();
$pageDataType = DataType::where('slug', 'pages')->firstOrFail();
$userDataType = DataType::where('slug', 'users')->firstOrFail();
File DataRowsTableSeeder.php
has 880 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
use Illuminate\Database\Seeder;
use TCG\Voyager\Models\DataRow;
use TCG\Voyager\Models\DataType;
Function run
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
Open
public function run()
{
$postDataType = DataType::where('slug', 'posts')->firstOrFail();
$pageDataType = DataType::where('slug', 'pages')->firstOrFail();
$userDataType = DataType::where('slug', 'users')->firstOrFail();
- 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 run
has 196 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function run()
{
if (file_exists(base_path('routes/web.php'))) {
require base_path('routes/web.php');
File nxt-ui.js
has 472 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*******************************************************************************
* Main Functions
*
*******************************************************************************/
File register.blade.php
has 406 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row">
File voyager.php
has 396 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
return [
'date' => [
'last_week' => 'Letzte Woche',
File voyager.php
has 385 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
return [
'date' => [
'last_week' => 'Last Week',
File voyager.php
has 385 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
return [
'date' => [
'last_week' => 'Ultima Settimana',
File voyager.php
has 384 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
return [
'date' => [
'last_week' => 'La semana pasada',
File voyager.php
has 382 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
return [
'date' => [
'last_week' => 'La semaine dernière',
File voyager.php
has 372 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
return [
'date' => [
'last_week' => '上周',
File voyager.php
has 371 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
return [
'date' => [
'last_week' => 'Geçen Hafta',
File voyager.php
has 370 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
return [
'date' => [
'last_week' => 'На прошлой неделе',
File voyager.php
has 359 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
return [
'date' => [
'last_week' => 'Semana Passada',
File voyager.php
has 359 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
return [
'date' => [
'last_week' => 'الأسبوع الماضي',
File voyager.php
has 358 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
return [
'date' => [
'last_week' => 'Semana Passada',
Method run
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function run()
{
$setting = $this->findSetting('site.title');
if (!$setting->exists) {
$setting->fill([
Function run
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
Open
public function run()
{
if (file_exists(base_path('routes/web.php'))) {
require base_path('routes/web.php');
- 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 run
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function run()
{
$dataType = $this->dataType('slug', 'posts');
if (!$dataType->exists) {
$dataType->fill([