Skip to content

Commit 8e71baf

Browse files
committed
compatibility with nette/utils 3.0
1 parent 44d363c commit 8e71baf

16 files changed

+16
-16
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"php": ">=7.1",
1818
"nette/component-model": "^2.3",
1919
"nette/http": "^2.2 || ~3.0.0",
20-
"nette/utils": "^2.4"
20+
"nette/utils": "^3.0"
2121
},
2222
"require-dev": {
2323
"nette/di": "^2.4 || ~3.0.0",

examples/localization.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function __construct(array $table)
3131
/**
3232
* Translates the given string.
3333
*/
34-
public function translate($message, $count = NULL)
34+
public function translate($message, int $count = NULL): string
3535
{
3636
return $this->table[$message] ?? $message;
3737
}

src/Forms/Form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ public function render(...$args)
644644
* @param can throw exceptions? (hidden parameter)
645645
* @return string
646646
*/
647-
public function __toString()
647+
public function __toString(): string
648648
{
649649
try {
650650
$this->fireRenderEvents();

src/Forms/Rendering/DefaultFormRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ public function renderLabel(Nette\Forms\IControl $control)
423423
} elseif ($label != NULL) { // @intentionally ==
424424
$label .= $suffix;
425425
}
426-
return $this->getWrapper('label container')->setHtml($label);
426+
return $this->getWrapper('label container')->setHtml((string) $label);
427427
}
428428

429429

tests/Forms/Controls.Button.render.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require __DIR__ . '/../bootstrap.php';
1616

1717
class Translator implements Nette\Localization\ITranslator
1818
{
19-
function translate($s, $plural = NULL)
19+
function translate($s, int $count = NULL): string
2020
{
2121
return strtoupper($s);
2222
}

tests/Forms/Controls.Checkbox.render.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require __DIR__ . '/../bootstrap.php';
1616

1717
class Translator implements Nette\Localization\ITranslator
1818
{
19-
function translate($s, $plural = NULL)
19+
function translate($s, int $count = NULL): string
2020
{
2121
return strtoupper($s);
2222
}

tests/Forms/Controls.CheckboxList.render.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require __DIR__ . '/../bootstrap.php';
1616

1717
class Translator implements Nette\Localization\ITranslator
1818
{
19-
function translate($s, $plural = NULL)
19+
function translate($s, int $count = NULL): string
2020
{
2121
return strtoupper($s);
2222
}

tests/Forms/Controls.HiddenField.render.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require __DIR__ . '/../bootstrap.php';
1616

1717
class Translator implements Nette\Localization\ITranslator
1818
{
19-
function translate($s, $plural = NULL)
19+
function translate($s, int $count = NULL): string
2020
{
2121
return strtoupper($s);
2222
}

tests/Forms/Controls.ImageButton.render.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require __DIR__ . '/../bootstrap.php';
1616

1717
class Translator implements Nette\Localization\ITranslator
1818
{
19-
function translate($s, $plural = NULL)
19+
function translate($s, int $count = NULL): string
2020
{
2121
return strtoupper($s);
2222
}

tests/Forms/Controls.MultiSelectBox.render.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require __DIR__ . '/../bootstrap.php';
1616

1717
class Translator implements Nette\Localization\ITranslator
1818
{
19-
function translate($s, $plural = NULL)
19+
function translate($s, int $count = NULL): string
2020
{
2121
return strtoupper($s);
2222
}

0 commit comments

Comments
 (0)