Showing 1,763 of 1,765 total issues

The class Context has 42 public methods. Consider refactoring Context to keep number of public methods under 10.
Open

class Context extends RawMinkContext implements BehatContext
{
    use JsCoverageContextTrait;
    use RwDemosContextTrait;
    use WarnDynamicPropertyTrait;
Severity: Minor
Found in src/Behat/Context.php by phpmd

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

Source https://phpmd.org/rules/codesize.html#toomanypublicmethods

The class App has an overall complexity of 196 which is very high. The configured complexity threshold is 50.
Open

class App
{
    use AppScopeTrait;
    use DiContainerTrait;
    use DynamicMethodTrait;
Severity: Minor
Found in src/App.php by phpmd

The class Form has an overall complexity of 59 which is very high. The configured complexity threshold is 50.
Open

class Form extends View
{
    use HookTrait;

    /** Executed when form is submitted */
Severity: Minor
Found in src/Form.php by phpmd

The class ScopeBuilder has an overall complexity of 71 which is very high. The configured complexity threshold is 50.
Open

class ScopeBuilder extends Form\Control
{
    public $renderLabel = false;

    public array $options = [
Severity: Minor
Found in src/Form/Control/ScopeBuilder.php by phpmd

The class Ui has an overall complexity of 64 which is very high. The configured complexity threshold is 50.
Open

class Ui extends Persistence
{
    /** @var string */
    public $locale = 'en';

Severity: Minor
Found in src/Persistence/Ui.php by phpmd

The class Grid has an overall complexity of 79 which is very high. The configured complexity threshold is 50.
Open

class Grid extends View
{
    use HookTrait;

    /** @var Menu|array|false Will be initialized to Menu object, however you can set this to false to disable menu. */
Severity: Minor
Found in src/Grid.php by phpmd

The class Table has an overall complexity of 87 which is very high. The configured complexity threshold is 50.
Open

class Table extends Lister
{
    public $ui = 'table';

    public $defaultTemplate = 'table.html';
Severity: Minor
Found in src/Table.php by phpmd

The class Crud has an overall complexity of 50 which is very high. The configured complexity threshold is 50.
Open

class Crud extends Grid
{
    /** @var array of fields to display in Grid */
    public $displayFields;

Severity: Minor
Found in src/Crud.php by phpmd

The class Grid has 22 public methods. Consider refactoring Grid to keep number of public methods under 10.
Open

class Grid extends View
{
    use HookTrait;

    /** @var Menu|array|false Will be initialized to Menu object, however you can set this to false to disable menu. */
Severity: Minor
Found in src/Grid.php by phpmd

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

Source https://phpmd.org/rules/codesize.html#toomanypublicmethods

The class Console has 15 public methods. Consider refactoring Console to keep number of public methods under 10.
Open

class Console extends View implements LoggerInterface
{
    public $ui = 'inverted black segment';

    /**
Severity: Minor
Found in src/Console.php by phpmd

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

Source https://phpmd.org/rules/codesize.html#toomanypublicmethods

The class Table has 11 public methods. Consider refactoring Table to keep number of public methods under 10.
Open

class Table extends Lister
{
    public $ui = 'table';

    public $defaultTemplate = 'table.html';
Severity: Minor
Found in src/Table.php by phpmd

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

Source https://phpmd.org/rules/codesize.html#toomanypublicmethods

The class HtmlTemplate has an overall complexity of 82 which is very high. The configured complexity threshold is 50.
Open

class HtmlTemplate
{
    use WarnDynamicPropertyTrait;

    public const TOP_TAG = '_top';
Severity: Minor
Found in src/HtmlTemplate.php by phpmd

The class Multiline has an overall complexity of 121 which is very high. The configured complexity threshold is 50.
Open

class Multiline extends Form\Control
{
    /** @var HtmlTemplate|null The template needed for the multiline view. */
    public $multiLineTemplate;

Severity: Minor
Found in src/Form/Control/Multiline.php by phpmd

The class View has 27 non-getter- and setter-methods. Consider refactoring View to keep number of methods under 25.
Open

class View extends AbstractView
{
    /**
     * When you call renderAll() this will be populated with JavaScript chains.
     *
Severity: Minor
Found in src/View.php by phpmd

TooManyMethods

Since: 0.1

A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

The default was changed from 10 to 25 in PHPMD 2.3.

Example

Source https://phpmd.org/rules/codesize.html#toomanymethods

The class View has 22 public methods. Consider refactoring View to keep number of public methods under 10.
Open

class View extends AbstractView
{
    /**
     * When you call renderAll() this will be populated with JavaScript chains.
     *
Severity: Minor
Found in src/View.php by phpmd

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

Source https://phpmd.org/rules/codesize.html#toomanypublicmethods

The class Grid has 27 non-getter- and setter-methods. Consider refactoring Grid to keep number of methods under 25.
Open

class Grid extends View
{
    use HookTrait;

    /** @var Menu|array|false Will be initialized to Menu object, however you can set this to false to disable menu. */
Severity: Minor
Found in src/Grid.php by phpmd

TooManyMethods

Since: 0.1

A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

The default was changed from 10 to 25 in PHPMD 2.3.

Example

Source https://phpmd.org/rules/codesize.html#toomanymethods

The class View has an overall complexity of 152 which is very high. The configured complexity threshold is 50.
Open

class View extends AbstractView
{
    /**
     * When you call renderAll() this will be populated with JavaScript chains.
     *
Severity: Minor
Found in src/View.php by phpmd

The class HtmlTemplate has 17 public methods. Consider refactoring HtmlTemplate to keep number of public methods under 10.
Open

class HtmlTemplate
{
    use WarnDynamicPropertyTrait;

    public const TOP_TAG = '_top';
Severity: Minor
Found in src/HtmlTemplate.php by phpmd

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

Source https://phpmd.org/rules/codesize.html#toomanypublicmethods

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        for (var i = 0; i < self.config.showMonths; i++) {
            var d = new Date(self.currentYear, self.currentMonth, 1);
            d.setMonth(self.currentMonth + i);
            frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));
        }
Severity: Major
Found in public/js/vendor-vue-flatpickr.js and 1 other location - About 3 hrs to fix
public/external/flatpickr/dist/flatpickr.js on lines 1276..1280

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 101.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

            for (var i = 0; i < self.config.showMonths; i++) {
                var d = new Date(self.currentYear, self.currentMonth, 1);
                d.setMonth(self.currentMonth + i);
                frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));
            }
Severity: Major
Found in public/external/flatpickr/dist/flatpickr.js and 1 other location - About 3 hrs to fix
public/js/vendor-vue-flatpickr.js on lines 576..580

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 101.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language