mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-25 20:29:10 -04:00
ALPHA 3.0.2a
This commit is contained in:
@@ -35,10 +35,10 @@ class ArgsStub extends EnumStub
|
||||
|
||||
return;
|
||||
}
|
||||
if (count($values) < count($params)) {
|
||||
$params = array_slice($params, 0, count($values));
|
||||
} elseif (count($values) > count($params)) {
|
||||
$values[] = new EnumStub(array_splice($values, count($params)), false);
|
||||
if (\count($values) < \count($params)) {
|
||||
$params = \array_slice($params, 0, \count($values));
|
||||
} elseif (\count($values) > \count($params)) {
|
||||
$values[] = new EnumStub(array_splice($values, \count($params)), false);
|
||||
$params[] = $variadic;
|
||||
}
|
||||
if (array('...') === $params) {
|
||||
|
||||
4
vendor/symfony/var-dumper/Caster/Caster.php
vendored
4
vendor/symfony/var-dumper/Caster/Caster.php
vendored
@@ -117,10 +117,10 @@ class Caster
|
||||
} elseif (false === $v || '' === $v || '0' === $v || 0 === $v || 0.0 === $v || array() === $v) {
|
||||
$type |= self::EXCLUDE_EMPTY & $filter;
|
||||
}
|
||||
if ((self::EXCLUDE_NOT_IMPORTANT & $filter) && !in_array($k, $listedProperties, true)) {
|
||||
if ((self::EXCLUDE_NOT_IMPORTANT & $filter) && !\in_array($k, $listedProperties, true)) {
|
||||
$type |= self::EXCLUDE_NOT_IMPORTANT;
|
||||
}
|
||||
if ((self::EXCLUDE_VERBOSE & $filter) && in_array($k, $listedProperties, true)) {
|
||||
if ((self::EXCLUDE_VERBOSE & $filter) && \in_array($k, $listedProperties, true)) {
|
||||
$type |= self::EXCLUDE_VERBOSE;
|
||||
}
|
||||
|
||||
|
||||
14
vendor/symfony/var-dumper/Caster/ClassStub.php
vendored
14
vendor/symfony/var-dumper/Caster/ClassStub.php
vendored
@@ -27,7 +27,7 @@ class ClassStub extends ConstStub
|
||||
$this->value = $identifier;
|
||||
|
||||
if (0 < $i = strrpos($identifier, '\\')) {
|
||||
$this->attr['ellipsis'] = strlen($identifier) - $i;
|
||||
$this->attr['ellipsis'] = \strlen($identifier) - $i;
|
||||
$this->attr['ellipsis-type'] = 'class';
|
||||
$this->attr['ellipsis-tail'] = 1;
|
||||
}
|
||||
@@ -36,9 +36,9 @@ class ClassStub extends ConstStub
|
||||
if (null !== $callable) {
|
||||
if ($callable instanceof \Closure) {
|
||||
$r = new \ReflectionFunction($callable);
|
||||
} elseif (is_object($callable)) {
|
||||
} elseif (\is_object($callable)) {
|
||||
$r = array($callable, '__invoke');
|
||||
} elseif (is_array($callable)) {
|
||||
} elseif (\is_array($callable)) {
|
||||
$r = $callable;
|
||||
} elseif (false !== $i = strpos($callable, '::')) {
|
||||
$r = array(substr($callable, 0, $i), substr($callable, 2 + $i));
|
||||
@@ -51,7 +51,7 @@ class ClassStub extends ConstStub
|
||||
$r = new \ReflectionClass($identifier);
|
||||
}
|
||||
|
||||
if (is_array($r)) {
|
||||
if (\is_array($r)) {
|
||||
try {
|
||||
$r = new \ReflectionMethod($r[0], $r[1]);
|
||||
} catch (\ReflectionException $e) {
|
||||
@@ -70,13 +70,13 @@ class ClassStub extends ConstStub
|
||||
|
||||
public static function wrapCallable($callable)
|
||||
{
|
||||
if (is_object($callable) || !is_callable($callable)) {
|
||||
if (\is_object($callable) || !\is_callable($callable)) {
|
||||
return $callable;
|
||||
}
|
||||
|
||||
if (!is_array($callable)) {
|
||||
if (!\is_array($callable)) {
|
||||
$callable = new static($callable);
|
||||
} elseif (is_string($callable[0])) {
|
||||
} elseif (\is_string($callable[0])) {
|
||||
$callable[0] = new static($callable[0]);
|
||||
} else {
|
||||
$callable[1] = new static($callable[1], $callable);
|
||||
|
||||
@@ -25,6 +25,6 @@ class CutArrayStub extends CutStub
|
||||
parent::__construct($value);
|
||||
|
||||
$this->preservedSubset = array_intersect_key($value, array_flip($preservedKeys));
|
||||
$this->cut -= count($this->preservedSubset);
|
||||
$this->cut -= \count($this->preservedSubset);
|
||||
}
|
||||
}
|
||||
|
||||
8
vendor/symfony/var-dumper/Caster/CutStub.php
vendored
8
vendor/symfony/var-dumper/Caster/CutStub.php
vendored
@@ -24,17 +24,17 @@ class CutStub extends Stub
|
||||
{
|
||||
$this->value = $value;
|
||||
|
||||
switch (gettype($value)) {
|
||||
switch (\gettype($value)) {
|
||||
case 'object':
|
||||
$this->type = self::TYPE_OBJECT;
|
||||
$this->class = get_class($value);
|
||||
$this->class = \get_class($value);
|
||||
$this->cut = -1;
|
||||
break;
|
||||
|
||||
case 'array':
|
||||
$this->type = self::TYPE_ARRAY;
|
||||
$this->class = self::ARRAY_ASSOC;
|
||||
$this->cut = $this->value = count($value);
|
||||
$this->cut = $this->value = \count($value);
|
||||
break;
|
||||
|
||||
case 'resource':
|
||||
@@ -51,7 +51,7 @@ class CutStub extends Stub
|
||||
case 'string':
|
||||
$this->type = self::TYPE_STRING;
|
||||
$this->class = preg_match('//u', $value) ? self::STRING_UTF8 : self::STRING_BINARY;
|
||||
$this->cut = self::STRING_BINARY === $this->class ? strlen($value) : mb_strlen($value, 'UTF-8');
|
||||
$this->cut = self::STRING_BINARY === $this->class ? \strlen($value) : mb_strlen($value, 'UTF-8');
|
||||
$this->value = '';
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ class DateCaster
|
||||
{
|
||||
$location = $timeZone->getLocation();
|
||||
$formatted = (new \DateTime('now', $timeZone))->format($location ? 'e (P)' : 'P');
|
||||
$title = $location && extension_loaded('intl') ? \Locale::getDisplayRegion('-'.$location['country_code']) : '';
|
||||
$title = $location && \extension_loaded('intl') ? \Locale::getDisplayRegion('-'.$location['country_code']) : '';
|
||||
|
||||
$z = array(Caster::PREFIX_VIRTUAL.'timezone' => new ConstStub($formatted, $title));
|
||||
|
||||
@@ -117,6 +117,6 @@ class DateCaster
|
||||
|
||||
private static function formatSeconds($s, $us)
|
||||
{
|
||||
return sprintf('%02d.%s', $s, 0 === ($len = strlen($t = rtrim($us, '0'))) ? '0' : ($len <= 3 ? str_pad($t, 3, '0') : $us));
|
||||
return sprintf('%02d.%s', $s, 0 === ($len = \strlen($t = rtrim($us, '0'))) ? '0' : ($len <= 3 ? str_pad($t, 3, '0') : $us));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
namespace Symfony\Component\VarDumper\Caster;
|
||||
|
||||
use Doctrine\Common\Proxy\Proxy as CommonProxy;
|
||||
use Doctrine\ORM\Proxy\Proxy as OrmProxy;
|
||||
use Doctrine\ORM\PersistentCollection;
|
||||
use Doctrine\ORM\Proxy\Proxy as OrmProxy;
|
||||
use Symfony\Component\VarDumper\Cloner\Stub;
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
namespace Symfony\Component\VarDumper\Caster;
|
||||
|
||||
use Symfony\Component\Debug\Exception\SilencedErrorContext;
|
||||
use Symfony\Component\VarDumper\Exception\ThrowingCasterException;
|
||||
use Symfony\Component\VarDumper\Cloner\Stub;
|
||||
use Symfony\Component\VarDumper\Exception\ThrowingCasterException;
|
||||
|
||||
/**
|
||||
* Casts common Exception classes to array representation.
|
||||
@@ -71,8 +71,8 @@ class ExceptionCaster
|
||||
|
||||
if (isset($a[$xPrefix.'previous'], $a[$trace]) && $a[$xPrefix.'previous'] instanceof \Exception) {
|
||||
$b = (array) $a[$xPrefix.'previous'];
|
||||
self::traceUnshift($b[$xPrefix.'trace'], get_class($a[$xPrefix.'previous']), $b[$prefix.'file'], $b[$prefix.'line']);
|
||||
$a[$trace] = new TraceStub($b[$xPrefix.'trace'], false, 0, -count($a[$trace]->value));
|
||||
self::traceUnshift($b[$xPrefix.'trace'], \get_class($a[$xPrefix.'previous']), $b[$prefix.'file'], $b[$prefix.'line']);
|
||||
$a[$trace] = new TraceStub($b[$xPrefix.'trace'], false, 0, -\count($a[$trace]->value));
|
||||
}
|
||||
|
||||
unset($a[$xPrefix.'previous'], $a[$prefix.'code'], $a[$prefix.'file'], $a[$prefix.'line']);
|
||||
@@ -118,7 +118,7 @@ class ExceptionCaster
|
||||
$prefix = Caster::PREFIX_VIRTUAL;
|
||||
|
||||
$a = array();
|
||||
$j = count($frames);
|
||||
$j = \count($frames);
|
||||
if (0 > $i = $trace->sliceOffset) {
|
||||
$i = max(0, $j + $i);
|
||||
}
|
||||
@@ -175,7 +175,7 @@ class ExceptionCaster
|
||||
$lastCall = $call;
|
||||
}
|
||||
if (null !== $trace->sliceLength) {
|
||||
$a = array_slice($a, 0, $trace->sliceLength, true);
|
||||
$a = \array_slice($a, 0, $trace->sliceLength, true);
|
||||
}
|
||||
|
||||
return $a;
|
||||
@@ -199,7 +199,7 @@ class ExceptionCaster
|
||||
$a[$prefix.'src'] = self::$framesCache[$cacheKey];
|
||||
} else {
|
||||
if (preg_match('/\((\d+)\)(?:\([\da-f]{32}\))? : (?:eval\(\)\'d code|runtime-created function)$/', $f['file'], $match)) {
|
||||
$f['file'] = substr($f['file'], 0, -strlen($match[0]));
|
||||
$f['file'] = substr($f['file'], 0, -\strlen($match[0]));
|
||||
$f['line'] = (int) $match[1];
|
||||
}
|
||||
$caller = isset($f['function']) ? sprintf('in %s() on line %d', (isset($f['class']) ? $f['class'].$f['type'] : '').$f['function'], $f['line']) : null;
|
||||
@@ -212,7 +212,7 @@ class ExceptionCaster
|
||||
|
||||
if (file_exists($f['file']) && 0 <= self::$srcContext) {
|
||||
if (!empty($f['class']) && (is_subclass_of($f['class'], 'Twig\Template') || is_subclass_of($f['class'], 'Twig_Template')) && method_exists($f['class'], 'getDebugInfo')) {
|
||||
$template = isset($f['object']) ? $f['object'] : unserialize(sprintf('O:%d:"%s":0:{}', strlen($f['class']), $f['class']));
|
||||
$template = isset($f['object']) ? $f['object'] : unserialize(sprintf('O:%d:"%s":0:{}', \strlen($f['class']), $f['class']));
|
||||
|
||||
$ellipsis = 0;
|
||||
$templateSrc = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getCode() : (method_exists($template, 'getSource') ? $template->getSource() : '');
|
||||
@@ -231,7 +231,7 @@ class ExceptionCaster
|
||||
$src = self::extractSource(file_get_contents($f['file']), $f['line'], self::$srcContext, $caller, 'php', $f['file']);
|
||||
$srcKey .= ':'.$f['line'];
|
||||
if ($ellipsis) {
|
||||
$ellipsis += 1 + strlen($f['line']);
|
||||
$ellipsis += 1 + \strlen($f['line']);
|
||||
}
|
||||
}
|
||||
$srcAttr .= '&separator= ';
|
||||
|
||||
22
vendor/symfony/var-dumper/Caster/LinkStub.php
vendored
22
vendor/symfony/var-dumper/Caster/LinkStub.php
vendored
@@ -30,7 +30,7 @@ class LinkStub extends ConstStub
|
||||
if (null === $href) {
|
||||
$href = $label;
|
||||
}
|
||||
if (!is_string($href)) {
|
||||
if (!\is_string($href)) {
|
||||
return;
|
||||
}
|
||||
if (0 === strpos($href, 'file://')) {
|
||||
@@ -53,11 +53,11 @@ class LinkStub extends ConstStub
|
||||
return;
|
||||
}
|
||||
if ($composerRoot = $this->getComposerRoot($href, $this->inVendor)) {
|
||||
$this->attr['ellipsis'] = strlen($href) - strlen($composerRoot) + 1;
|
||||
$this->attr['ellipsis'] = \strlen($href) - \strlen($composerRoot) + 1;
|
||||
$this->attr['ellipsis-type'] = 'path';
|
||||
$this->attr['ellipsis-tail'] = 1 + ($this->inVendor ? 2 + strlen(implode(array_slice(explode(DIRECTORY_SEPARATOR, substr($href, 1 - $this->attr['ellipsis'])), 0, 2))) : 0);
|
||||
} elseif (3 < count($ellipsis = explode(DIRECTORY_SEPARATOR, $href))) {
|
||||
$this->attr['ellipsis'] = 2 + strlen(implode(array_slice($ellipsis, -2)));
|
||||
$this->attr['ellipsis-tail'] = 1 + ($this->inVendor ? 2 + \strlen(implode(\array_slice(explode(\DIRECTORY_SEPARATOR, substr($href, 1 - $this->attr['ellipsis'])), 0, 2))) : 0);
|
||||
} elseif (3 < \count($ellipsis = explode(\DIRECTORY_SEPARATOR, $href))) {
|
||||
$this->attr['ellipsis'] = 2 + \strlen(implode(\array_slice($ellipsis, -2)));
|
||||
$this->attr['ellipsis-type'] = 'path';
|
||||
$this->attr['ellipsis-tail'] = 1;
|
||||
}
|
||||
@@ -71,16 +71,16 @@ class LinkStub extends ConstStub
|
||||
foreach (get_declared_classes() as $class) {
|
||||
if ('C' === $class[0] && 0 === strpos($class, 'ComposerAutoloaderInit')) {
|
||||
$r = new \ReflectionClass($class);
|
||||
$v = dirname(dirname($r->getFileName()));
|
||||
$v = \dirname(\dirname($r->getFileName()));
|
||||
if (file_exists($v.'/composer/installed.json')) {
|
||||
self::$vendorRoots[] = $v.DIRECTORY_SEPARATOR;
|
||||
self::$vendorRoots[] = $v.\DIRECTORY_SEPARATOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$inVendor = false;
|
||||
|
||||
if (isset(self::$composerRoots[$dir = dirname($file)])) {
|
||||
if (isset(self::$composerRoots[$dir = \dirname($file)])) {
|
||||
return self::$composerRoots[$dir];
|
||||
}
|
||||
|
||||
@@ -96,13 +96,13 @@ class LinkStub extends ConstStub
|
||||
// open_basedir restriction in effect
|
||||
break;
|
||||
}
|
||||
if ($parent === dirname($parent)) {
|
||||
if ($parent === \dirname($parent)) {
|
||||
return self::$composerRoots[$dir] = false;
|
||||
}
|
||||
|
||||
$parent = dirname($parent);
|
||||
$parent = \dirname($parent);
|
||||
}
|
||||
|
||||
return self::$composerRoots[$dir] = $parent.DIRECTORY_SEPARATOR;
|
||||
return self::$composerRoots[$dir] = $parent.\DIRECTORY_SEPARATOR;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ class PdoCaster
|
||||
}
|
||||
|
||||
try {
|
||||
$attr[$k] = 'ERRMODE' === $k ? $errmode : $c->getAttribute(constant('PDO::ATTR_'.$k));
|
||||
$attr[$k] = 'ERRMODE' === $k ? $errmode : $c->getAttribute(\constant('PDO::ATTR_'.$k));
|
||||
if ($v && isset($v[$attr[$k]])) {
|
||||
$attr[$k] = new ConstStub($v[$attr[$k]], $attr[$k]);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ class RedisCaster
|
||||
}
|
||||
|
||||
$ser = $c->getOption(\Redis::OPT_SERIALIZER);
|
||||
$retry = defined('Redis::OPT_SCAN') ? $c->getOption(\Redis::OPT_SCAN) : 0;
|
||||
$retry = \defined('Redis::OPT_SCAN') ? $c->getOption(\Redis::OPT_SCAN) : 0;
|
||||
|
||||
return $a + array(
|
||||
$prefix.'isConnected' => $connected,
|
||||
|
||||
@@ -198,7 +198,7 @@ class ReflectionCaster
|
||||
|
||||
if ($v = $c->getStaticVariables()) {
|
||||
foreach ($v as $k => &$v) {
|
||||
if (is_object($v)) {
|
||||
if (\is_object($v)) {
|
||||
$a[$prefix.'use']['$'.$k] = new CutStub($v);
|
||||
} else {
|
||||
$a[$prefix.'use']['$'.$k] = &$v;
|
||||
|
||||
@@ -30,7 +30,7 @@ class StubCaster
|
||||
$stub->cut = $c->cut;
|
||||
$stub->attr = $c->attr;
|
||||
|
||||
if (Stub::TYPE_REF === $c->type && !$c->class && is_string($c->value) && !preg_match('//u', $c->value)) {
|
||||
if (Stub::TYPE_REF === $c->type && !$c->class && \is_string($c->value) && !preg_match('//u', $c->value)) {
|
||||
$stub->type = Stub::TYPE_STRING;
|
||||
$stub->class = Stub::STRING_BINARY;
|
||||
}
|
||||
@@ -49,7 +49,7 @@ class StubCaster
|
||||
public static function cutInternals($obj, array $a, Stub $stub, $isNested)
|
||||
{
|
||||
if ($isNested) {
|
||||
$stub->cut += count($a);
|
||||
$stub->cut += \count($a);
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user