New contact form with friendlycaptcha

This commit is contained in:
Jorit Tijsen
2026-02-24 14:04:04 +01:00
parent 6786ac7ce1
commit 3b4030113b
80 changed files with 2860 additions and 1918 deletions

View File

@@ -22,6 +22,7 @@ use Nette\Utils\ObjectHelpers;
trait SmartObject
{
/**
* @return mixed
* @throws MemberAccessException
*/
public function __call(string $name, array $args)
@@ -35,11 +36,13 @@ trait SmartObject
$handler(...$args);
}
} elseif ($handlers !== null) {
throw new UnexpectedValueException("Property $class::$$name must be iterable or null, " . gettype($handlers) . ' given.');
throw new UnexpectedValueException("Property $class::$$name must be iterable or null, " . get_debug_type($handlers) . ' given.');
}
} else {
ObjectHelpers::strictCall($class, $name);
return null;
}
ObjectHelpers::strictCall($class, $name);
}
@@ -87,11 +90,9 @@ trait SmartObject
/**
* @param mixed $value
* @return void
* @throws MemberAccessException if the property is not defined or is read-only
*/
public function __set(string $name, $value)
public function __set(string $name, mixed $value): void
{
$class = static::class;
@@ -121,10 +122,9 @@ trait SmartObject
/**
* @return void
* @throws MemberAccessException
*/
public function __unset(string $name)
public function __unset(string $name): void
{
$class = static::class;
if (!ObjectHelpers::hasProperty($class, $name)) {