📁 File Manager Pro
v10.0.3 | PHP: 8.2.31
Server: LiteSpeed
2026-07-03 15:47:44
📂
/ (Root)
/
home
/
orkouolp
/
web
/
testing.orkobd
/
laravel
/
vendor
/
nette
/
utils
/
tests
/
Utils
📍 /home/orkouolp/web/testing.orkobd/laravel/vendor/nette/utils/tests/Utils
🔄 Refresh
✏️
Editing: Type.fromReflection.function.80.phpt
Writable
<?php /** * @phpversion 8.0 */ declare(strict_types=1); use Nette\Utils\Type; use Tester\Assert; require __DIR__ . '/../bootstrap.php'; $type = Type::fromReflection(new ReflectionFunction(function (): string {})); Assert::same(['string'], $type->getNames()); Assert::same('string', (string) $type); $type = Type::fromReflection(new ReflectionFunction(function (): ?string {})); Assert::same(['string', 'null'], $type->getNames()); Assert::same('?string', (string) $type); $type = Type::fromReflection(new ReflectionFunction(function (): Foo {})); Assert::same(['Foo'], $type->getNames()); Assert::same('Foo', (string) $type); $type = Type::fromReflection(new ReflectionFunction(function (): Foo|string {})); Assert::same(['Foo', 'string'], $type->getNames()); Assert::same('Foo|string', (string) $type); $type = Type::fromReflection(new ReflectionFunction(function (): mixed {})); Assert::same(['mixed'], $type->getNames()); Assert::same('mixed', (string) $type);
💾 Save Changes
❌ Cancel