mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 15:22:17 +02:00
N°8834 - Add compatibility with PHP 8.4 (#819)
* N°8834 - Add compatibility with PHP 8.4 * Rollback of scssphp/scssphp version upgrade due to compilation error
This commit is contained in:
@@ -115,7 +115,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate, \Stringable
|
||||
public function getIterator(): \Traversable
|
||||
{
|
||||
if (!\is_array($value = $this->getValue())) {
|
||||
throw new \LogicException(sprintf('"%s" object holds non-iterable type "%s".', self::class, get_debug_type($value)));
|
||||
throw new \LogicException(\sprintf('"%s" object holds non-iterable type "%s".', self::class, get_debug_type($value)));
|
||||
}
|
||||
|
||||
yield from $value;
|
||||
@@ -168,7 +168,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate, \Stringable
|
||||
return (string) $value;
|
||||
}
|
||||
|
||||
return sprintf('%s (count=%d)', $this->getType(), \count($value));
|
||||
return \sprintf('%s (count=%d)', $this->getType(), \count($value));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -298,7 +298,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate, \Stringable
|
||||
if (!$item instanceof Stub) {
|
||||
$cursor->attr = [];
|
||||
$type = \gettype($item);
|
||||
if ($item && 'array' === $type) {
|
||||
if ('array' === $type && $item) {
|
||||
$item = $this->getStub($item);
|
||||
}
|
||||
} elseif (Stub::TYPE_REF === $item->type) {
|
||||
@@ -375,7 +375,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate, \Stringable
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new \RuntimeException(sprintf('Unexpected Stub type: "%s".', $item->type));
|
||||
throw new \RuntimeException(\sprintf('Unexpected Stub type: "%s".', $item->type));
|
||||
}
|
||||
} elseif ('array' === $type) {
|
||||
$dumper->enterHash($cursor, Cursor::HASH_INDEXED, 0, false);
|
||||
|
||||
Reference in New Issue
Block a user