ALPHA 3.0.2a

This commit is contained in:
TheGamecraft
2018-09-10 08:51:18 -04:00
parent 7fe13ae0a7
commit 0e0ef86b71
1404 changed files with 10604 additions and 33714 deletions

View File

@@ -44,7 +44,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
$item = $item->value;
}
if (!$item instanceof Stub) {
return gettype($item);
return \gettype($item);
}
if (Stub::TYPE_STRING === $item->type) {
return 'string';
@@ -106,13 +106,13 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
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) {
@@ -158,11 +158,11 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
{
$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));
}
/**
@@ -300,7 +300,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
$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) {
@@ -322,7 +322,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
if ($cursor->stop) {
if ($cut >= 0) {
$cut += count($children);
$cut += \count($children);
}
$children = array();
}
@@ -351,7 +351,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
$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);
@@ -389,7 +389,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
++$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);