Skip to content

Commit

Permalink
compatibility: fixed interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Nov 9, 2021
1 parent 043a7bc commit f456d05
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Forms/Controls/SubmitButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function setValidationScope(?iterable $scope)
$this->validationScope = [];
foreach ($scope ?: [] as $control) {
if (!$control instanceof Nette\Forms\Container && !$control instanceof Nette\Forms\Control) {
throw new Nette\InvalidArgumentException('Validation scope accepts only Nette\Forms\Container or Nette\Forms\IControl instances.');
throw new Nette\InvalidArgumentException('Validation scope accepts only Nette\Forms\Container or Nette\Forms\Control instances.');
}
$this->validationScope[] = $control;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Forms/Rendering/DefaultFormRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ public function renderPairMulti(array $controls): string
$s = [];
foreach ($controls as $control) {
if (!$control instanceof Nette\Forms\Control) {
throw new Nette\InvalidArgumentException('Argument must be array of Nette\Forms\IControl instances.');
throw new Nette\InvalidArgumentException('Argument must be array of Nette\Forms\Control instances.');
}
$description = $control->getOption('description');
if ($description instanceof HtmlStringable) {
Expand Down
6 changes: 3 additions & 3 deletions src/compatibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

if (false) {
/** @deprecated use Nette\Forms\Control */
class IControl extends Control
interface IControl extends Control
{
}
} elseif (!interface_exists(IControl::class)) {
Expand All @@ -20,7 +20,7 @@ class_alias(Control::class, IControl::class);

if (false) {
/** @deprecated use Nette\Forms\FormRenderer */
class IFormRenderer extends FormRenderer
interface IFormRenderer extends FormRenderer
{
}
} elseif (!interface_exists(IFormRenderer::class)) {
Expand All @@ -29,7 +29,7 @@ class_alias(FormRenderer::class, IFormRenderer::class);

if (false) {
/** @deprecated use Nette\Forms\SubmitterControl */
class ISubmitterControl extends SubmitterControl
interface ISubmitterControl extends SubmitterControl
{
}
} elseif (!interface_exists(ISubmitterControl::class)) {
Expand Down

0 comments on commit f456d05

Please sign in to comment.