private static function setObjectProperties($object, array &$properties, bool $isInternal, Closure $propertyDecoder)
    {
        Closure::bind(function () use ($object, &$properties, $propertyDecoder) {
            foreach ($properties as $key => &$value) {
                $object->$key = $propertyDecoder($value);
            }
        }, null, $isInternal ? null : $object)->__invoke();
    }
private static function setObjectProperties($object, array &$properties, bool $isInternal, Closure $propertyDecoder)
    {
        Closure::bind(function () use ($object, &$properties, $propertyDecoder) {
            foreach ($properties as $key => &$value) {
                $object->$key = $propertyDecoder($value);
            }
        }, null, $isInternal ? null : $object)->__invoke();
    }
private static function setObjectProperties ( $ object , array & $ properties , bool $ isInternal , Closure $ propertyDecoder ) { Closure :: bind ( function ( ) use ( $ object , & $ properties , $ propertyDecoder ) { foreach ( $ properties as $ key => & $ value ) { $ object -> $ key = $ propertyDecoder ( $ value ) ; } } , null , $ isInternal ? null : $ object ) -> __invoke ( ) ; }
Set the given object properties.

@param mixed $object The object which properties should be set.
@param mixed[] $properties The object properties.
@param bool $isInternal Tells whether the object class is internal.
@param Closure $propertyDecoder The object property decoder.
Set the given object properties .