$item = $item->value;
}
if (!$item instanceof Stub) {
- return gettype($item);
+ return \gettype($item);
}
if (Stub::TYPE_STRING === $item->type) {
return 'string';
/**
* @param bool $recursive Whether values should be resolved recursively or not
*
- * @return string|int|float|bool|array|null|Data[] A native representation of the original value
+ * @return string|int|float|bool|array|Data[]|null A native representation of the original value
*/
public function getValue($recursive = false)
{
public function count()
{
- return count($this->getValue());
+ return \count($this->getValue());
}
public function getIterator()
{
- if (!is_array($value = $this->getValue())) {
- throw new \LogicException(sprintf('%s object holds non-iterable type "%s".', self::class, gettype($value)));
+ if (!\is_array($value = $this->getValue())) {
+ throw new \LogicException(sprintf('%s object holds non-iterable type "%s".', self::class, \gettype($value)));
}
foreach ($value as $k => $v) {
{
$value = $this->getValue();
- if (!is_array($value)) {
+ if (!\is_array($value)) {
return (string) $value;
}
- return sprintf('%s (count=%d)', $this->getType(), count($value));
+ return sprintf('%s (count=%d)', $this->getType(), \count($value));
}
/**
*/
public function getRawData()
{
- @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the array or object access instead.', __METHOD__));
+ @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the array or object access instead.', __METHOD__));
return $this->data;
}
$cursor->hardRefCount = $item->refCount;
}
$cursor->attr = $item->attr;
- $type = $item->class ?: gettype($item->value);
+ $type = $item->class ?: \gettype($item->value);
$item = $this->getStub($item->value);
}
if ($item instanceof Stub) {
if ($cursor->stop) {
if ($cut >= 0) {
- $cut += count($children);
+ $cut += \count($children);
}
$children = array();
}
$cut = $this->dumpChildren($dumper, $cursor, $refs, $children, $cut, $item->type, null !== $item->class);
}
} elseif ($children && 0 <= $cut) {
- $cut += count($children);
+ $cut += \count($children);
}
$cursor->skipChildren = false;
$dumper->leaveHash($cursor, $item->type, $item->class, $withChildren, $cut);
++$cursor->depth;
$cursor->hashType = $hashType;
$cursor->hashIndex = 0;
- $cursor->hashLength = count($children);
+ $cursor->hashLength = \count($children);
$cursor->hashCut = $hashCut;
foreach ($children as $key => $child) {
$cursor->hashKeyIsBinary = isset($key[0]) && !preg_match('//u', $key);