mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-23 11:29:10 -04:00
ALPHA 3.0.2a
This commit is contained in:
@@ -11,10 +11,10 @@
|
||||
|
||||
namespace Symfony\Component\HttpKernel\DataCollector;
|
||||
|
||||
use Symfony\Component\HttpKernel\KernelInterface;
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
use Symfony\Component\HttpKernel\KernelInterface;
|
||||
use Symfony\Component\VarDumper\Caster\LinkStub;
|
||||
|
||||
/**
|
||||
@@ -67,11 +67,11 @@ class ConfigDataCollector extends DataCollector implements LateDataCollectorInte
|
||||
'php_architecture' => PHP_INT_SIZE * 8,
|
||||
'php_intl_locale' => class_exists('Locale', false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a',
|
||||
'php_timezone' => date_default_timezone_get(),
|
||||
'xdebug_enabled' => extension_loaded('xdebug'),
|
||||
'apcu_enabled' => extension_loaded('apcu') && ini_get('apc.enabled'),
|
||||
'zend_opcache_enabled' => extension_loaded('Zend OPcache') && ini_get('opcache.enable'),
|
||||
'xdebug_enabled' => \extension_loaded('xdebug'),
|
||||
'apcu_enabled' => \extension_loaded('apcu') && ini_get('apc.enabled'),
|
||||
'zend_opcache_enabled' => \extension_loaded('Zend OPcache') && ini_get('opcache.enable'),
|
||||
'bundles' => array(),
|
||||
'sapi_name' => PHP_SAPI,
|
||||
'sapi_name' => \PHP_SAPI,
|
||||
);
|
||||
|
||||
if (isset($this->kernel)) {
|
||||
|
||||
@@ -80,7 +80,7 @@ abstract class DataCollector implements DataCollectorInterface, \Serializable
|
||||
'*' => function ($v, array $a, Stub $s, $isNested) {
|
||||
if (!$v instanceof Stub) {
|
||||
foreach ($a as $k => $v) {
|
||||
if (is_object($v) && !$v instanceof \DateTimeInterface && !$v instanceof Stub) {
|
||||
if (\is_object($v) && !$v instanceof \DateTimeInterface && !$v instanceof Stub) {
|
||||
$a[$k] = new CutStub($v);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@ use Symfony\Component\VarDumper\Cloner\Data;
|
||||
use Symfony\Component\VarDumper\Cloner\VarCloner;
|
||||
use Symfony\Component\VarDumper\Dumper\CliDumper;
|
||||
use Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider;
|
||||
use Symfony\Component\VarDumper\Dumper\HtmlDumper;
|
||||
use Symfony\Component\VarDumper\Dumper\DataDumperInterface;
|
||||
use Symfony\Component\VarDumper\Dumper\HtmlDumper;
|
||||
use Symfony\Component\VarDumper\Server\Connection;
|
||||
|
||||
/**
|
||||
@@ -154,7 +154,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface
|
||||
parent::unserialize($data);
|
||||
$charset = array_pop($this->data);
|
||||
$fileLinkFormat = array_pop($this->data);
|
||||
$this->dataCount = count($this->data);
|
||||
$this->dataCount = \count($this->data);
|
||||
self::__construct($this->stopwatch, $fileLinkFormat, $charset);
|
||||
}
|
||||
|
||||
@@ -198,13 +198,13 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface
|
||||
$this->isCollected = true;
|
||||
|
||||
$h = headers_list();
|
||||
$i = count($h);
|
||||
$i = \count($h);
|
||||
array_unshift($h, 'Content-Type: '.ini_get('default_mimetype'));
|
||||
while (0 !== stripos($h[$i], 'Content-Type:')) {
|
||||
--$i;
|
||||
}
|
||||
|
||||
if (!\in_array(PHP_SAPI, array('cli', 'phpdbg'), true) && stripos($h[$i], 'html')) {
|
||||
if (!\in_array(\PHP_SAPI, array('cli', 'phpdbg'), true) && stripos($h[$i], 'html')) {
|
||||
$dumper = new HtmlDumper('php://output', $this->charset);
|
||||
$dumper->setDisplayOptions(array('fileLinkFormat' => $this->fileLinkFormat));
|
||||
} else {
|
||||
@@ -230,7 +230,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface
|
||||
$s = $this->style('meta', '%s');
|
||||
$f = strip_tags($this->style('', $file));
|
||||
$name = strip_tags($this->style('', $name));
|
||||
if ($fmt && $link = is_string($fmt) ? strtr($fmt, array('%f' => $file, '%l' => $line)) : $fmt->format($file, $line)) {
|
||||
if ($fmt && $link = \is_string($fmt) ? strtr($fmt, array('%f' => $file, '%l' => $line)) : $fmt->format($file, $line)) {
|
||||
$name = sprintf('<a href="%s" title="%s">'.$s.'</a>', strip_tags($this->style('', $link)), $f, $name);
|
||||
} else {
|
||||
$name = sprintf('<abbr title="%s">'.$s.'</abbr>', $f, $name);
|
||||
|
||||
@@ -223,7 +223,7 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($exception instanceof \ErrorException && in_array($exception->getSeverity(), array(E_DEPRECATED, E_USER_DEPRECATED), true)) {
|
||||
if ($exception instanceof \ErrorException && \in_array($exception->getSeverity(), array(E_DEPRECATED, E_USER_DEPRECATED), true)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -98,9 +98,9 @@ class MemoryDataCollector extends DataCollector implements LateDataCollectorInte
|
||||
$memoryLimit = strtolower($memoryLimit);
|
||||
$max = strtolower(ltrim($memoryLimit, '+'));
|
||||
if (0 === strpos($max, '0x')) {
|
||||
$max = intval($max, 16);
|
||||
$max = \intval($max, 16);
|
||||
} elseif (0 === strpos($max, '0')) {
|
||||
$max = intval($max, 8);
|
||||
$max = \intval($max, 8);
|
||||
} else {
|
||||
$max = (int) $max;
|
||||
}
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
|
||||
namespace Symfony\Component\HttpKernel\DataCollector;
|
||||
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\HttpFoundation\Cookie;
|
||||
use Symfony\Component\HttpFoundation\ParameterBag;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
|
||||
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
|
||||
use Symfony\Component\HttpKernel\KernelEvents;
|
||||
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
|
||||
/**
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
@@ -42,7 +42,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter
|
||||
$route = '';
|
||||
foreach ($request->attributes->all() as $key => $value) {
|
||||
if ('_route' === $key) {
|
||||
$route = is_object($value) ? $value->getPath() : $value;
|
||||
$route = \is_object($value) ? $value->getPath() : $value;
|
||||
$attributes[$key] = $route;
|
||||
} else {
|
||||
$attributes[$key] = $value;
|
||||
@@ -124,7 +124,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter
|
||||
}
|
||||
|
||||
foreach ($this->data as $key => $value) {
|
||||
if (!is_array($value)) {
|
||||
if (!\is_array($value)) {
|
||||
continue;
|
||||
}
|
||||
if ('request_headers' === $key || 'response_headers' === $key) {
|
||||
@@ -157,7 +157,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter
|
||||
));
|
||||
}
|
||||
|
||||
$this->data['identifier'] = $this->data['route'] ?: (is_array($this->data['controller']) ? $this->data['controller']['class'].'::'.$this->data['controller']['method'].'()' : $this->data['controller']);
|
||||
$this->data['identifier'] = $this->data['route'] ?: (\is_array($this->data['controller']) ? $this->data['controller']['class'].'::'.$this->data['controller']['method'].'()' : $this->data['controller']);
|
||||
|
||||
if ($response->headers->has('x-previous-debug-token')) {
|
||||
$this->data['forward_token'] = $response->headers->get('x-previous-debug-token');
|
||||
@@ -372,25 +372,25 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter
|
||||
*/
|
||||
protected function parseController($controller)
|
||||
{
|
||||
if (is_string($controller) && false !== strpos($controller, '::')) {
|
||||
if (\is_string($controller) && false !== strpos($controller, '::')) {
|
||||
$controller = explode('::', $controller);
|
||||
}
|
||||
|
||||
if (is_array($controller)) {
|
||||
if (\is_array($controller)) {
|
||||
try {
|
||||
$r = new \ReflectionMethod($controller[0], $controller[1]);
|
||||
|
||||
return array(
|
||||
'class' => is_object($controller[0]) ? get_class($controller[0]) : $controller[0],
|
||||
'class' => \is_object($controller[0]) ? \get_class($controller[0]) : $controller[0],
|
||||
'method' => $controller[1],
|
||||
'file' => $r->getFileName(),
|
||||
'line' => $r->getStartLine(),
|
||||
);
|
||||
} catch (\ReflectionException $e) {
|
||||
if (is_callable($controller)) {
|
||||
if (\is_callable($controller)) {
|
||||
// using __call or __callStatic
|
||||
return array(
|
||||
'class' => is_object($controller[0]) ? get_class($controller[0]) : $controller[0],
|
||||
'class' => \is_object($controller[0]) ? \get_class($controller[0]) : $controller[0],
|
||||
'method' => $controller[1],
|
||||
'file' => 'n/a',
|
||||
'line' => 'n/a',
|
||||
@@ -410,7 +410,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter
|
||||
);
|
||||
}
|
||||
|
||||
if (is_object($controller)) {
|
||||
if (\is_object($controller)) {
|
||||
$r = new \ReflectionClass($controller);
|
||||
|
||||
return array(
|
||||
@@ -421,6 +421,6 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter
|
||||
);
|
||||
}
|
||||
|
||||
return is_string($controller) ? $controller : 'n/a';
|
||||
return \is_string($controller) ? $controller : 'n/a';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
|
||||
namespace Symfony\Component\HttpKernel\DataCollector;
|
||||
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user