GrafiteInc/FormMaker

View on GitHub
src/Fields/Datepicker.php

Summary

Maintainability
A
3 hrs
Test Coverage

Method styles has 62 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function styles($id, $options)
    {
        $color = (Str::of(config('forms.bootstrap-version'))->startsWith('5')) ? '--bs-primary' : '--primary';

        $darkTheme = '';
Severity: Major
Found in src/Fields/Datepicker.php - About 2 hrs to fix

    Method js has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function js($id, $options)
        {
            return <<<JS
            _formsjs_DatepickerField = function (element) {
                if (! element.getAttribute('data-formsjs-rendered')) {
    Severity: Minor
    Found in src/Fields/Datepicker.php - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status