/**
* Writes a "resource" node.
*
* @param resource $file The file handle to write to
* @param mixed $value The value of the node
*
* @see http://source.icu-project.org/repos/icu/icuhtml/trunk/design/bnf_rb.txt
*/
private function writeResource($file, mixed
$value, int
$indentation, bool
$requireBraces = true
): void
{ if (\
is_int($value)) { $this->
writeInteger($file,
$value);
return;
} if ($value instanceof \Traversable
) { $value =
iterator_to_array($value);
} if (\
is_array($value)) { $intValues = \
count($value) === \
count(array_filter($value, 'is_int'
));