';
$var[$marker] = TRUE;
- foreach ($var as $k => & $v) {
+ foreach ($var as $k => &$v) {
if ($k !== $marker) {
$k = preg_match('#^\w{1,50}\z#', $k) ? $k : '"' . Helpers::escapeHtml(self::encodeString($k, $options[self::TRUNCATE])) . '"';
$out .= '
' . str_repeat('| ', $level) . ''
@@ -230,7 +230,7 @@ private static function dumpArray(& $var, $options, $level)
}
- private static function dumpObject(& $var, $options, $level)
+ private static function dumpObject(&$var, $options, $level)
{
$fields = self::exportObject($var, $options[self::OBJECT_EXPORTERS]);
$editor = NULL;
@@ -258,7 +258,7 @@ private static function dumpObject(& $var, $options, $level)
$out = '
'
. $out . "\n
';
$list[] = $var;
- foreach ($fields as $k => & $v) {
+ foreach ($fields as $k => &$v) {
$vis = '';
if (isset($k[0]) && $k[0] === "\x00") {
$vis = ' ' . ($k[1] === '*' ? 'protected' : 'private') . '';
@@ -278,7 +278,7 @@ private static function dumpObject(& $var, $options, $level)
}
- private static function dumpResource(& $var, $options, $level)
+ private static function dumpResource(&$var, $options, $level)
{
$type = get_resource_type($var);
$out = '' . Helpers::escapeHtml($type) . ' resource '
@@ -298,7 +298,7 @@ private static function dumpResource(& $var, $options, $level)
/**
* @return mixed
*/
- private static function toJson(& $var, $options, $level = 0)
+ private static function toJson(&$var, $options, $level = 0)
{
if (is_bool($var) || is_null($var) || is_int($var)) {
return $var;
@@ -321,7 +321,7 @@ private static function toJson(& $var, $options, $level = 0)
}
$res = [];
$var[$marker] = TRUE;
- foreach ($var as $k => & $v) {
+ foreach ($var as $k => &$v) {
if ($k !== $marker) {
$k = preg_match('#^\w{1,50}\z#', $k) ? $k : '"' . self::encodeString($k, $options[self::TRUNCATE]) . '"';
$res[] = [$k, self::toJson($v, $options, $level + 1)];
diff --git a/src/Tracy/FireLogger.php b/src/Tracy/FireLogger.php
index 840a74c6e..8b3c73cd6 100644
--- a/src/Tracy/FireLogger.php
+++ b/src/Tracy/FireLogger.php
@@ -114,7 +114,7 @@ public function log($message, $priority = self::DEBUG)
* @param int current recursion level
* @return string
*/
- private function jsonDump(& $var, $level = 0)
+ private function jsonDump(&$var, $level = 0)
{
if (is_bool($var) || is_null($var) || is_int($var) || is_float($var)) {
return $var;
@@ -133,7 +133,7 @@ private function jsonDump(& $var, $level = 0)
} elseif ($level < $this->maxDepth || !$this->maxDepth) {
$var[$marker] = TRUE;
$res = [];
- foreach ($var as $k => & $v) {
+ foreach ($var as $k => &$v) {
if ($k !== $marker) {
$res[$this->jsonDump($k)] = $this->jsonDump($v, $level + 1);
}
@@ -154,7 +154,7 @@ private function jsonDump(& $var, $level = 0)
} elseif ($level < $this->maxDepth || !$this->maxDepth) {
$list[] = $var;
$res = ["\x00" => '(object) ' . Helpers::getClass($var)];
- foreach ($arr as $k => & $v) {
+ foreach ($arr as $k => &$v) {
if (isset($k[0]) && $k[0] === "\x00") {
$k = substr($k, strrpos($k, "\x00") + 1);
}
diff --git a/src/Tracy/Helpers.php b/src/Tracy/Helpers.php
index 546e64111..2cd00032b 100644
--- a/src/Tracy/Helpers.php
+++ b/src/Tracy/Helpers.php
@@ -56,7 +56,7 @@ public static function editorUri($file, $line = NULL)
public static function formatHtml($mask)
{
$args = func_get_args();
- return preg_replace_callback('#%#', function () use (& $args, & $count) {
+ return preg_replace_callback('#%#', function () use (&$args, &$count) {
return Helpers::escapeHtml($args[++$count]);
}, $mask);
}
@@ -68,7 +68,7 @@ public static function escapeHtml($s)
}
- public static function findTrace(array $trace, $method, & $index = NULL)
+ public static function findTrace(array $trace, $method, &$index = NULL)
{
$m = explode('::', $method);
foreach ($trace as $i => $item) {
diff --git a/tests/Tracy/Debugger.E_COMPILE_ERROR.console.phpt b/tests/Tracy/Debugger.E_COMPILE_ERROR.console.phpt
index a62a04dec..726bfb869 100644
--- a/tests/Tracy/Debugger.E_COMPILE_ERROR.console.phpt
+++ b/tests/Tracy/Debugger.E_COMPILE_ERROR.console.phpt
@@ -22,7 +22,7 @@ Debugger::enable();
$onFatalErrorCalled = FALSE;
-register_shutdown_function(function () use (& $onFatalErrorCalled) {
+register_shutdown_function(function () use (&$onFatalErrorCalled) {
Assert::true($onFatalErrorCalled);
Assert::match(extension_loaded('xdebug') ? "
Fatal error: Cannot re-assign \$this in %a%
@@ -45,7 +45,7 @@ Unable to log error: Directory is not specified.
});
-Debugger::$onFatalError[] = function () use (& $onFatalErrorCalled) {
+Debugger::$onFatalError[] = function () use (&$onFatalErrorCalled) {
$onFatalErrorCalled = TRUE;
};
diff --git a/tests/Tracy/Debugger.E_ERROR.console.phpt b/tests/Tracy/Debugger.E_ERROR.console.phpt
index efca70197..fb11899c1 100644
--- a/tests/Tracy/Debugger.E_ERROR.console.phpt
+++ b/tests/Tracy/Debugger.E_ERROR.console.phpt
@@ -22,7 +22,7 @@ Debugger::enable();
$onFatalErrorCalled = FALSE;
-register_shutdown_function(function () use (& $onFatalErrorCalled) {
+register_shutdown_function(function () use (&$onFatalErrorCalled) {
Assert::true($onFatalErrorCalled);
Assert::match(PHP_MAJOR_VERSION > 5 ?
"Error: Call to undefined function missing_function() in %a%
@@ -53,7 +53,7 @@ Unable to log error: Directory is not specified.
});
-Debugger::$onFatalError[] = function () use (& $onFatalErrorCalled) {
+Debugger::$onFatalError[] = function () use (&$onFatalErrorCalled) {
$onFatalErrorCalled = TRUE;
};
diff --git a/tests/Tracy/Debugger.E_ERROR.html.phpt b/tests/Tracy/Debugger.E_ERROR.html.phpt
index 8cbea24ef..c7702eb5c 100644
--- a/tests/Tracy/Debugger.E_ERROR.html.phpt
+++ b/tests/Tracy/Debugger.E_ERROR.html.phpt
@@ -27,7 +27,7 @@ Debugger::enable();
$onFatalErrorCalled = FALSE;
-register_shutdown_function(function () use (& $onFatalErrorCalled) {
+register_shutdown_function(function () use (&$onFatalErrorCalled) {
Assert::true($onFatalErrorCalled);
$output = ob_get_clean();
Assert::same(1, substr_count($output, '