Showing 67 of 70 total issues
Model
has 70 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class Model implements Arrayable, ArrayAccess, CanBeEscapedWhenCastToString, Jsonable, JsonSerializable
{
use ForwardsCalls,
GuardsAttributes,
HasAttributes,
File Model.php
has 561 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Moox\RedisModel;
use ArrayAccess;
File press.php
has 399 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
|--------------------------------------------------------------------------
| Moox Configuration
Method useGoogleIcons
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function useGoogleIcons()
{
FilamentIcon::register([
'panels::global-search.field' => 'gmdi-search-o',
'panels::pages.dashboard.actions.filter' => 'gmdi-filter-alt-o',
File core.php
has 359 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
|--------------------------------------------------------------------------
| Moox Configuration
Function moox_check_laravel_db_session
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
function moox_check_laravel_db_session()
{
static $already_checked = false;
if ($already_checked || did_action('moox_session_checked')) {
return;
- 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 authenticate
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function authenticate(): Redirector|RedirectResponse|LoginResponse|null
{
if (! $this->isWhitelisted()) {
try {
$this->rateLimit(5);
- 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 panel
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function panel(Panel $panel): Panel
{
return $panel
->id('press')
->path('press')
Method authenticate
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function authenticate(): Redirector|RedirectResponse|LoginResponse|null
{
if (! $this->isWhitelisted()) {
try {
$this->rateLimit(5);
WpBasePost
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class WpBasePost extends Model
{
use HasFactory, Mutable;
protected $fillable = [
Method handle
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle()
{
$this->setProgress(1);
// Beispiel-Daten (du kannst beliebige Demo-Daten hinzufügen)
Builder
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class Builder extends \Illuminate\Database\Eloquent\Builder
{
/**
* @var PhpRedisConnection
*/
Method setUp
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function setUp(): void
{
parent::setUp();
$this->label(config('expiry.expiry_action_name', 'Set Expiry Date'))
Function setPolicies
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function setPolicies()
{
$packages = $this->getPackageNames();
foreach ($packages as $package) {
- 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
WpUser
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class WpUser extends Authenticatable implements FilamentUser
{
use HasFactory, Mutable, Notifiable;
protected $fillable = [
Function updateBackLinkAndLogo
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
(function updateBackLinkAndLogo() {
const backLink = document.querySelector(".edit-post-fullscreen-mode-close");
const postType = getQueryParam("post_type");
if (backLink) {
Method authenticate
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function authenticate(): Redirector|RedirectResponse|LoginResponse|null
{
if (! $this->isWhitelisted()) {
try {
$this->rateLimit(5);
Method table
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function table(Table $table): Table
{
$tabsConfig = Config::get('expiry.expiry.tabs', []);
$query = Expiry::query()->where('notified_to', auth()->id())->where('done_at', null);
Method handleModelEvent
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function handleModelEvent($model, $eventType)
{
if (! $this->currentPlatform) {
$this->logDebug('Moox Sync: Model event ignored - current platform not set', ['model' => get_class($model), 'event' => $eventType]);
Method handle
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle()
{
$this->setProgress(1);
$invitationRequests = Training::where('due_at', '<', now())