Skip to content

Commit 53f5e88

Browse files
committed
compatibility: improved code hinting
1 parent 72d8f08 commit 53f5e88

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

src/compatibility.php

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,26 @@
77

88
declare(strict_types=1);
99

10-
namespace Nette\Utils {
11-
if (false) {
12-
/** @deprecated use Nette\HtmlStringable */
13-
interface IHtmlString
14-
{
15-
}
16-
} elseif (!interface_exists(IHtmlString::class)) {
17-
class_alias(\Nette\HtmlStringable::class, IHtmlString::class);
10+
namespace Nette\Utils;
11+
12+
use Nette;
13+
14+
if (false) {
15+
/** @deprecated use Nette\HtmlStringable */
16+
interface IHtmlString extends Nette\HtmlStringable
17+
{
1818
}
19+
} elseif (!interface_exists(IHtmlString::class)) {
20+
class_alias(Nette\HtmlStringable::class, IHtmlString::class);
1921
}
2022

21-
namespace Nette\Localization {
22-
if (false) {
23-
/** @deprecated use Nette\Localization\Translator */
24-
interface ITranslator
25-
{
26-
}
27-
} elseif (!interface_exists(ITranslator::class)) {
28-
class_alias(Translator::class, ITranslator::class);
23+
namespace Nette\Localization;
24+
25+
if (false) {
26+
/** @deprecated use Nette\Localization\Translator */
27+
interface ITranslator extends Translator
28+
{
2929
}
30+
} elseif (!interface_exists(ITranslator::class)) {
31+
class_alias(Translator::class, ITranslator::class);
3032
}

0 commit comments

Comments
 (0)