<commit_before><?php

declare(strict_types=1);

namespace VencaX\NetteFormRenderer;

use Nette;
use Nette\Utils\Html;

class BootstrapRendererV4 extends Nette\Forms\Rendering\DefaultFormRenderer
{
	public const FORM_CHECK_INLINE = 'form-check-inline';

	/**
	 * Default is vertical orientation form
	 * @var bool
	 */
	private $formOrientationVertical = true;

	/**
	 * Default is not inline form
	 * @var bool
	 */
	private $formInline = false;

	private $formControlLabelWidth = 'col-sm-3';

	private $formControlContainerWidth = 'col-sm-9';


	/**
	 * Renders form begin.
	 */
	public function renderBegin(): string
	{
		$renderer->wrappers['error']['container'] = 'div';
		$renderer->wrappers['error']['item'] = 'div class="alert alert-danger"';

		$this->wrappers['controls']['container'] = null;
		if ($this->isFormVerticalOrientation()) {
			$this->wrappers['pair']['container'] = 'div class="form-group"';//vertical
		} else {
			$this->wrappers['pair']['container'] = 'div class="form-group row"';//horizontal
		}
		$this->wrappers['pair']['.error'] = 'has-danger';
		if ($this->isFormVerticalOrientation()) {<commit_msg>Fix warining in php 7.4<commit_after><?php

declare(strict_types=1);

namespace VencaX\NetteFormRenderer;

use Nette;
use Nette\Utils\Html;

class BootstrapRendererV4 extends Nette\Forms\Rendering\DefaultFormRenderer
{
	public const FORM_CHECK_INLINE = 'form-check-inline';

	/**
	 * Default is vertical orientation form
	 * @var bool
	 */
	private $formOrientationVertical = true;

	/**
	 * Default is not inline form
	 * @var bool
	 */
	private $formInline = false;

	private $formControlLabelWidth = 'col-sm-3';

	private $formControlContainerWidth = 'col-sm-9';


	/**
	 * Renders form begin.
	 */
	public function renderBegin(): string
	{
		$renderer = new \stdClass();
		$renderer->wrappers['error']['container'] = 'div';
		$renderer->wrappers['error']['item'] = 'div class="alert alert-danger"';

		$this->wrappers['controls']['container'] = null;
		if ($this->isFormVerticalOrientation()) {
			$this->wrappers['pair']['container'] = 'div class="form-group"';//vertical
		} else {
			$this->wrappers['pair']['container'] = 'div class="form-group row"';//horizontal
		}
		$this->wrappers['pair']['.error'] = 'has-danger';
		if ($this->isFormVerticalOrientation()) {
{'fraction_non_alphanumeric': 0.17427205562798784, 'fraction_numerical': 0.004345936549326379, 'mean_word_length': 4.740648379052369, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '746219', 'n_tokens_mistral': 785, 'n_tokens_neox': 734, 'n_words': 149}