GrafiteInc/FormMaker

View on GitHub
src/Fields/Bootstrap/DateTimePicker.php

Summary

Maintainability
A
2 hrs
Test Coverage

Method styles has 38 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: Minor
Found in src/Fields/Bootstrap/DateTimePicker.php - About 1 hr to fix

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

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

      There are no issues that match your filters.

      Category
      Status