New contact form with friendlycaptcha
This commit is contained in:
16
vendor/nette/utils/src/SmartObject.php
vendored
16
vendor/nette/utils/src/SmartObject.php
vendored
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user