Skip to content

Commit ec07cdf

Browse files
authored
Merge pull request #18 from robskr/dev/php8.4-compatibility
PHP 8.4 compatibility
2 parents a907c8b + 8f597b8 commit ec07cdf

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

src/Renderers/Bs3FormRenderer.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
namespace Nextras\FormsRendering\Renderers;
1111

12+
use Nette\Forms\Container;
1213
use Nette\Forms\Control;
14+
use Nette\Forms\ControlGroup;
1315
use Nette\Forms\Controls;
1416
use Nette\Forms\Form;
1517
use Nette\Forms\Rendering\DefaultFormRenderer;
@@ -42,7 +44,7 @@ public function __construct()
4244
}
4345

4446

45-
public function render(Form $form, string $mode = null): string
47+
public function render(Form $form, ?string $mode = null): string
4648
{
4749
if (!isset($this->form) || $this->form !== $form) {
4850
$this->controlsInit = false;
@@ -73,6 +75,9 @@ public function renderBody(): string
7375
}
7476

7577

78+
/**
79+
* @param Container|ControlGroup $parent
80+
*/
7681
public function renderControls($parent): string
7782
{
7883
$this->controlsInit();

src/Renderers/Bs4FormRenderer.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
namespace Nextras\FormsRendering\Renderers;
1111

12+
use Nette\Forms\Container;
1213
use Nette\Forms\Control;
14+
use Nette\Forms\ControlGroup;
1315
use Nette\Forms\Controls;
1416
use Nette\Forms\Form;
1517
use Nette\Forms\Rendering\DefaultFormRenderer;
@@ -63,7 +65,7 @@ public function __construct(string $layout = FormLayout::HORIZONTAL)
6365
}
6466

6567

66-
public function render(Form $form, string $mode = null): string
68+
public function render(Form $form, ?string $mode = null): string
6769
{
6870
if (!isset($this->form) || $this->form !== $form) {
6971
$this->controlsInit = false;
@@ -94,6 +96,9 @@ public function renderBody(): string
9496
}
9597

9698

99+
/**
100+
* @param Container|ControlGroup $parent
101+
*/
97102
public function renderControls($parent): string
98103
{
99104
$this->controlsInit();

src/Renderers/Bs5FormRenderer.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
namespace Nextras\FormsRendering\Renderers;
1111

12+
use Nette\Forms\Container;
1213
use Nette\Forms\Control;
14+
use Nette\Forms\ControlGroup;
1315
use Nette\Forms\Controls;
1416
use Nette\Forms\Form;
1517
use Nette\Forms\Rendering\DefaultFormRenderer;
@@ -65,7 +67,7 @@ public function __construct(string $layout = FormLayout::HORIZONTAL)
6567
}
6668

6769

68-
public function render(Form $form, string $mode = null): string
70+
public function render(Form $form, ?string $mode = null): string
6971
{
7072
if (!isset($this->form) || $this->form !== $form) {
7173
$this->controlsInit = false;
@@ -95,7 +97,9 @@ public function renderBody(): string
9597
return parent::renderBody();
9698
}
9799

98-
100+
/**
101+
* @param Container|ControlGroup $parent
102+
*/
99103
public function renderControls($parent): string
100104
{
101105
$this->controlsInit();

0 commit comments

Comments
 (0)