| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | protected function setStyles() |
||
| 43 | { |
||
| 44 | $this->class[] = config('blade-form-components.themes.'.$this->getTheme().'.fields.checkbox') ?? config('blade-form-components.themes.'.$this->getTheme().'.fields.default'); |
||
| 45 | $this->labelClass[] = config('blade-form-components.themes.'.$this->getTheme().'.labels.checkbox'); |
||
| 46 | |||
| 47 | // Attach the error class if an error is displayed against this field |
||
| 48 | $errors = session()->get('errors', app(ViewErrorBag::class)); |
||
| 49 | if ($errors->has($this->name)) { |
||
| 50 | $this->labelClass[] = config('blade-form-components.themes.'.$this->getTheme().'.fields.is-error'); |
||
| 51 | } |
||
| 54 |