update lock clucknut
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 14s
Build, Push and Deploy / build-and-push (push) Successful in 3m14s
Build, Push and Deploy / deploy-staging (push) Successful in 25s
Build, Push and Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-04-18 20:32:18 +07:00
parent 4554035227
commit dcaf267458
3359 changed files with 153185 additions and 205489 deletions

View File

@@ -1,12 +1,10 @@
<?php
<?php declare(strict_types=1);
/**
* This file is part of the Nette Framework (https://nette.org)
* Copyright (c) 2004 David Grudl (https://davidgrudl.com)
*/
declare(strict_types=1);
namespace Nette\Schema;
use Nette;
@@ -74,9 +72,9 @@ public static function getPropertyType(\ReflectionProperty|\ReflectionParameter
/**
* Returns an annotation value.
* @param \ReflectionProperty $ref
* @param \ReflectionClass<object>|\ReflectionProperty $ref
*/
public static function parseAnnotation(\Reflector $ref, string $name): ?string
public static function parseAnnotation(\ReflectionClass|\ReflectionProperty $ref, string $name): ?string
{
if (!Reflection::areCommentsAvailable()) {
throw new Nette\InvalidStateException('You have to enable phpDoc comments in opcode cache.');
@@ -121,12 +119,13 @@ public static function validateType(mixed $value, string $expected, Context $con
}
/** @param array{?float, ?float} $range */
public static function validateRange(mixed $value, array $range, Context $context, string $types = ''): void
{
if (is_array($value) || is_string($value)) {
[$length, $label] = is_array($value)
? [count($value), 'items']
: (in_array('unicode', explode('|', $types), true)
: (in_array('unicode', explode('|', $types), strict: true)
? [Nette\Utils\Strings::length($value), 'characters']
: [strlen($value), 'bytes']);
@@ -147,6 +146,7 @@ public static function validateRange(mixed $value, array $range, Context $contex
}
/** @param array{?float, ?float} $range */
public static function isInRange(mixed $value, array $range): bool
{
return ($range[0] === null || $value >= $range[0])
@@ -166,6 +166,7 @@ public static function validatePattern(string $value, string $pattern, Context $
}
/** @return \Closure(mixed): mixed */
public static function getCastStrategy(string $type): \Closure
{
if (Nette\Utils\Validators::isBuiltinType($type)) {