Skip to content

Commit 9e94222

Browse files
committed
compatible with nette/utils v3
1 parent 3bdb1ad commit 9e94222

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.0",
1818
"nette/component-model": "~2.3",
1919
"nette/http": "~2.2",
20-
"nette/utils": "~2.4"
20+
"nette/utils": "~3.0"
2121
},
2222
"require-dev": {
2323
"nette/di": "~2.4",

examples/localization.php

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

src/Forms/Form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ public function render(...$args)
639639
* @param can throw exceptions? (hidden parameter)
640640
* @return string
641641
*/
642-
public function __toString()
642+
public function __toString(): string
643643
{
644644
try {
645645
$this->fireRenderEvents();

src/Forms/Rendering/DefaultFormRenderer.php

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

427427

tests/Forms/Controls.Button.render.phpt

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

1515
class Translator implements Nette\Localization\ITranslator
1616
{
17-
function translate($s, $plural = NULL)
17+
function translate($s, int $count = NULL): string
1818
{
1919
return strtoupper($s);
2020
}

tests/Forms/Controls.Checkbox.render.phpt

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

1515
class Translator implements Nette\Localization\ITranslator
1616
{
17-
function translate($s, $plural = NULL)
17+
function translate($s, int $count = NULL): string
1818
{
1919
return strtoupper($s);
2020
}

tests/Forms/Controls.CheckboxList.render.phpt

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

1515
class Translator implements Nette\Localization\ITranslator
1616
{
17-
function translate($s, $plural = NULL)
17+
function translate($s, int $count = NULL): string
1818
{
1919
return strtoupper($s);
2020
}

tests/Forms/Controls.HiddenField.render.phpt

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

1515
class Translator implements Nette\Localization\ITranslator
1616
{
17-
function translate($s, $plural = NULL)
17+
function translate($s, int $count = NULL): string
1818
{
1919
return strtoupper($s);
2020
}

tests/Forms/Controls.ImageButton.render.phpt

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

1515
class Translator implements Nette\Localization\ITranslator
1616
{
17-
function translate($s, $plural = NULL)
17+
function translate($s, int $count = NULL): string
1818
{
1919
return strtoupper($s);
2020
}

tests/Forms/Controls.MultiSelectBox.render.phpt

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

1515
class Translator implements Nette\Localization\ITranslator
1616
{
17-
function translate($s, $plural = NULL)
17+
function translate($s, int $count = NULL): string
1818
{
1919
return strtoupper($s);
2020
}

0 commit comments

Comments
 (0)