Showing 50 of 50 total issues
Method js
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function js()
{
$id = self::$id;
$items = json_encode(self::$items);
Method styles
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function styles()
{
$borderColor = self::$borderColor ?? '#FFF';
return <<<styles
Method process
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function process()
{
$header = '';
$footerContent = '';
$close = '';
Method process
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function process()
{
$class = '';
if (self::$css) {
Function process
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Open
public static function process()
{
$collection = self::$collection;
$keys = self::$keys;
$sortable = self::$sortable;
- 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 styles
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function styles()
{
return <<<styles
.html-component-avatar {
width: 200px;
Method process
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function process()
{
self::$id = static::$attributes['id'] ?? 'html_' . Str::uuid();
$id = self::$id;
Method process
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function process()
{
$id = self::$id ?? 'html_carousel_' . Str::uuid() . '_';
if (! Str::of(get_class(self::$items))->contains('Collection')) {
Method processLinks
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function processLinks($items, $id, $show)
{
$index = 1;
$steps = '';
Method styles
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function styles()
{
$width = self::$width;
$height = self::$height;
$color = self::$color;
Method setDefaultProperties
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$id,
$css,
$url,
$text,
$html,
Method __contruct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$id = null,
$css = null,
$url = null,
$text = null,
$html = null,
Method styles
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function styles()
{
return <<<CSS
.pulse-loading svg polyline {
fill: none;
Method styles
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function styles()
{
return <<<CSS
@media (prefers-color-scheme: light) {
:root {
Method __construct
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$id = null,
$title = null,
$content = null,
$text = 'Modal Button',
$cssClass = null,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$thumbnail = false,
$lazy = false,
$fluid = false,
$placeholder = false,
$css = '',
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$body = null,
$title = null,
$header = null,
$footer = null,
$imageSrc = null,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$title = null,
$cssClass = null,
$id = null,
$width = null,
$backdrop = 'true',
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$imageA = null,
$imageB = null,
$width = null,
$height = null,
$color = null,
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$class = null,
$collection = [],
$keys = [],
$sortable = null,
$headers = []