diff --git a/src/Debug/Abstraction/AbstractArray.php b/src/Debug/Abstraction/AbstractArray.php index cd623d85..67ce8453 100644 --- a/src/Debug/Abstraction/AbstractArray.php +++ b/src/Debug/Abstraction/AbstractArray.php @@ -41,7 +41,7 @@ public function __construct(Abstracter $abstracter) * * @return array|string */ - public function crate($array, $method = null, $hist = array()) + public function crate(array $array, $method = null, array $hist = array()) { if (\in_array($array, $hist, true)) { return Abstracter::RECURSION; @@ -63,7 +63,7 @@ public function crate($array, $method = null, $hist = array()) * * @return Abstraction */ - public function getAbstraction(&$array, $method = null, $hist = array()) + public function getAbstraction(array &$array, $method = null, array $hist = array()) { return new Abstraction(Abstracter::TYPE_ARRAY, array( 'value' => $this->crate($array, $method, $hist), @@ -77,7 +77,7 @@ public function getAbstraction(&$array, $method = null, $hist = array()) * * @return Abstraction */ - public function getCallableAbstraction($array) + public function getCallableAbstraction(array $array) { $className = \is_object($array[0]) ? \get_class($array[0]) diff --git a/src/Debug/Abstraction/AbstractObject.php b/src/Debug/Abstraction/AbstractObject.php index 1d9ee471..e886a595 100644 --- a/src/Debug/Abstraction/AbstractObject.php +++ b/src/Debug/Abstraction/AbstractObject.php @@ -213,7 +213,7 @@ public function getAbstraction($obj, $method = null, $hist = array()) * * @return array */ - public static function buildObjValues($values = array()) + public static function buildObjValues(array $values = array()) { $cfgFlags = \array_reduce(self::$cfgFlags, static function ($carry, $val) { return $carry | $val; @@ -313,7 +313,7 @@ private function absClean(Abstraction $abs) * * @return void */ - private function addEnumCasePhpDoc($abs) + private function addEnumCasePhpDoc(Abstraction $abs) { if (!($abs['cfgFlags'] & self::PHPDOC_COLLECT)) { return; @@ -480,7 +480,7 @@ private function getCfgFlags() * * @return null|string */ - private function getScopeClass(&$hist) + private function getScopeClass(array &$hist) { for ($i = \count($hist) - 1; $i >= 0; $i--) { if (\is_object($hist[$i])) { @@ -544,7 +544,7 @@ private function isExcluded($obj) * * @return bool */ - private function isObjInList($obj, $list) + private function isObjInList($obj, array $list) { $classname = \get_class($obj); if (\array_intersect(array('*', $classname), $list)) { diff --git a/src/Debug/Abstraction/AbstractObjectConstants.php b/src/Debug/Abstraction/AbstractObjectConstants.php index fa37a230..b329c055 100644 --- a/src/Debug/Abstraction/AbstractObjectConstants.php +++ b/src/Debug/Abstraction/AbstractObjectConstants.php @@ -67,7 +67,7 @@ public function add(Abstraction $abs) while ($reflector) { PHP_VERSION_ID >= 70100 ? $this->addConstantsReflection($reflector) - : $this->addConstants($reflector); + : $this->addConstantsLegacy($reflector); $reflector = $reflector->getParentClass(); } foreach ($this->constants as $name => $info) { @@ -84,7 +84,7 @@ public function add(Abstraction $abs) * * @return void */ - public function addCases($abs) + public function addCases(Abstraction $abs) { $abs['cases'] = array(); if ($abs['isTraverseOnly']) { @@ -113,7 +113,7 @@ public function addCases($abs) * * @return void */ - private function addConstants(ReflectionClass $reflector) + private function addConstantsLegacy(ReflectionClass $reflector) { foreach ($reflector->getConstants() as $name => $value) { if (isset($this->constants[$name])) { diff --git a/src/Debug/Abstraction/AbstractObjectProperties.php b/src/Debug/Abstraction/AbstractObjectProperties.php index 717722c0..72bd4647 100644 --- a/src/Debug/Abstraction/AbstractObjectProperties.php +++ b/src/Debug/Abstraction/AbstractObjectProperties.php @@ -400,30 +400,32 @@ private function addViaPhpDocIter(Abstraction $abs, $inheritedFrom) */ private function addViaRef(Abstraction $abs) { - $refObject = $abs['reflector']; /* We trace our ancestory to learn where properties are inherited from */ - while ($refObject) { - $className = $refObject->getName(); - $properties = $refObject->getProperties(); - while ($properties) { - $refProperty = \array_shift($properties); + $reflector = $abs['reflector']; + $properties = $abs['properties']; + while ($reflector) { + $className = $reflector->getName(); + $refProperties = $reflector->getProperties(); + while ($refProperties) { + $refProperty = \array_shift($refProperties); $name = $refProperty->getName(); - if (isset($abs['properties'][$name])) { + if (isset($properties[$name])) { // already have info... we're in an ancestor - $abs['properties'][$name]['overrides'] = $this->propOverrides( + $properties[$name]['overrides'] = $this->propOverrides( $refProperty, - $abs['properties'][$name], + $properties[$name], $className ); - $abs['properties'][$name]['originallyDeclared'] = $className; + $properties[$name]['originallyDeclared'] = $className; continue; } - $abs['properties'][$name] = $this->buildPropViaRef($abs, $refProperty); + $properties[$name] = $this->buildPropViaRef($abs, $refProperty); } - $refObject = $refObject->getParentClass(); + $reflector = $reflector->getParentClass(); } + $abs['properties'] = $properties; } /** @@ -465,8 +467,8 @@ private function buildPropViaPhpDoc(Abstraction $abs, $phpDocProp, $inheritedFro */ private function buildPropViaRef(Abstraction $abs, ReflectionProperty $refProperty) { - $refProperty->setAccessible(true); // only accessible via reflection $phpDoc = $this->helper->getPhpDocVar($refProperty); // phpDocVar + $refProperty->setAccessible(true); // only accessible via reflection /* getDeclaringClass returns "LAST-declared/overriden" */ diff --git a/src/Debug/Abstraction/AbstractString.php b/src/Debug/Abstraction/AbstractString.php index a9005c5a..5135e246 100644 --- a/src/Debug/Abstraction/AbstractString.php +++ b/src/Debug/Abstraction/AbstractString.php @@ -63,7 +63,9 @@ public function getAbstraction($string, $typeMore = null, $crateVals = array()) $absValues = $this->getAbsValuesSerialized($absValues); break; default: - $absValues['value'] = $this->debug->utf8->strcut($string, 0, $absValues['maxlen']); + if ($absValues['maxlen'] > -1) { + $absValues['value'] = $this->debug->utf8->strcut($string, 0, $absValues['maxlen']); + } } $absValues = $this->absValuesFinish($absValues); return new Abstraction(Abstracter::TYPE_STRING, $absValues); diff --git a/src/Debug/Abstraction/Abstracter.php b/src/Debug/Abstraction/Abstracter.php index db4d4cdd..c891ba2a 100644 --- a/src/Debug/Abstraction/Abstracter.php +++ b/src/Debug/Abstraction/Abstracter.php @@ -423,7 +423,7 @@ private function getTypePhp($val) 'integer' => self::TYPE_INT, 'NULL' => self::TYPE_NULL, 'resource (closed)' => self::TYPE_RESOURCE, - 'unknown type' => self::TYPE_UNKNOWN, // closed resource < php 7.2 + 'unknown type' => self::TYPE_UNKNOWN, // closed resource (php < 7.2) ); if (isset($map[$type])) { $type = $map[$type]; diff --git a/src/Debug/Collector/StatementInfo.php b/src/Debug/Collector/StatementInfo.php index c56d70b8..939c0c52 100644 --- a/src/Debug/Collector/StatementInfo.php +++ b/src/Debug/Collector/StatementInfo.php @@ -303,7 +303,9 @@ private function getGroupLabel() } $label = \preg_replace('/[\r\n\s]+/', ' ', $label); } - return $label; + return \strlen($label) > 100 + ? \substr($label, 0, 100) . '…' + : (string) $label; } /** @@ -367,6 +369,7 @@ private function logQuery($label) if (\preg_replace('/[\r\n\s]+/', ' ', $this->sql) === $label) { return; } + $stringMaxLenWas = $this->debug->setCfg('stringMaxLen', -1); $sqlPretty = $this->debug->prettify($this->sql, 'application/sql'); if ($sqlPretty instanceof Abstraction) { $this->prettified = $sqlPretty['prettified']; @@ -380,6 +383,7 @@ private function logQuery($label) ), )) ); + $this->debug->setCfg('stringMaxLen', $stringMaxLenWas); } /** diff --git a/src/Debug/Dump/Html/ObjectConstants.php b/src/Debug/Dump/Html/ObjectConstants.php index 528f148a..800e82ac 100644 --- a/src/Debug/Dump/Html/ObjectConstants.php +++ b/src/Debug/Dump/Html/ObjectConstants.php @@ -88,16 +88,16 @@ public function dumpCases(Abstraction $abs) public function dumpConstants(Abstraction $abs) { $constants = $abs['constants']; - $cfg = array( + $opts = array( 'attributeOutput' => $abs['cfgFlags'] & AbstractObject::CONST_ATTRIBUTE_OUTPUT, 'constCollect' => $abs['cfgFlags'] & AbstractObject::CONST_COLLECT, 'constOutput' => $abs['cfgFlags'] & AbstractObject::CONST_OUTPUT, 'phpDocOutput' => $abs['cfgFlags'] & AbstractObject::PHPDOC_OUTPUT, ); - if (!$cfg['constOutput']) { + if (!$opts['constOutput']) { return ''; } - if (!$cfg['constCollect']) { + if (!$opts['constCollect']) { return '
constants not collected
' . "\n"; } if (!$constants) { @@ -105,7 +105,7 @@ public function dumpConstants(Abstraction $abs) } $html = '
constants
' . "\n"; foreach ($constants as $name => $info) { - $html .= $this->dumpConstant($name, $info, $cfg); + $html .= $this->dumpConstant($name, $info, $opts) . "\n"; } return $html; } @@ -141,21 +141,21 @@ protected function dumpCase($name, $info, $cfg) } /** - * Dump Constant + * Dump constant as HTML * * @param string $name Constant's name * @param array $info Constant info - * @param array $cfg Constant config vals + * @param array $opts options * * @return string html fragment */ - protected function dumpConstant($name, $info, $cfg) + protected function dumpConstant($name, array $info, array $opts) { $modifiers = \array_keys(\array_filter(array( $info['visibility'] => true, 'final' => $info['isFinal'], ))); - $title = $cfg['phpDocOutput'] + $title = $opts['phpDocOutput'] ? (string) $info['desc'] : ''; return $this->html->buildTag( @@ -165,7 +165,7 @@ protected function dumpConstant($name, $info, $cfg) array('constant'), $modifiers ), - 'data-attributes' => $cfg['attributeOutput'] && $info['attributes'] + 'data-attributes' => $opts['attributeOutput'] && $info['attributes'] ? $info['attributes'] : null, ), @@ -175,6 +175,6 @@ protected function dumpConstant($name, $info, $cfg) . ' ' . $name . '' . ' = ' . $this->valDumper->dump($info['value']) - ) . "\n"; + ); } } diff --git a/src/Debug/Dump/Html/ObjectProperties.php b/src/Debug/Dump/Html/ObjectProperties.php index b749dbc1..77b27106 100644 --- a/src/Debug/Dump/Html/ObjectProperties.php +++ b/src/Debug/Dump/Html/ObjectProperties.php @@ -20,7 +20,7 @@ use bdk\Debug\Utility\Html as HtmlUtil; /** - * Dump object methods as HTML + * Dump object properties as HTML */ class ObjectProperties { @@ -33,7 +33,7 @@ class ObjectProperties * Constructor * * @param HtmlObject $dumpObj Html dumper - * @param HtmlHelper $helper Html dump helpers + * @param Helper $helper Html dump helpers * @param HtmlUtil $html Html methods */ public function __construct(HtmlObject $dumpObj, Helper $helper, HtmlUtil $html) @@ -58,35 +58,35 @@ public function dump(Abstraction $abs) 'phpDocOutput' => $abs['cfgFlags'] & AbstractObject::PHPDOC_OUTPUT, ); $magicMethods = \array_intersect(array('__get', '__set'), \array_keys($abs['methods'])); - $str = $this->dumpPropertiesLabel($abs); - $str .= $this->dumpObject->magicMethodInfo($magicMethods); + $html = '
' . $this->dumpPropertiesLabel($abs) . '
' . "\n"; + $html .= $this->dumpObject->magicMethodInfo($magicMethods); foreach ($abs['properties'] as $name => $info) { - $str .= $this->dumpProperty($name, $info, $opts) . "\n"; + $html .= $this->dumpProperty($name, $info, $opts) . "\n"; } - return $str; + return $html; } /** - * Returns
properties
+ * get property "header" * * @param Abstraction $abs Object Abstraction instance * - * @return string html fragment + * @return string plain text */ protected function dumpPropertiesLabel(Abstraction $abs) { - $label = 'no properties'; - if (\count($abs['properties'])) { - $label = 'properties'; - if ($abs['viaDebugInfo']) { - $label .= ' (via __debugInfo)'; - } + if (\count($abs['properties']) === 0) { + return 'no properties'; + } + $label = 'properties'; + if ($abs['viaDebugInfo']) { + $label .= ' (via __debugInfo)'; } - return '
' . $label . '
' . "\n"; + return $label; } /** - * Dump object property as HTML + * Dump property as HTML * * @param string $name property name * @param array $info property info @@ -94,35 +94,38 @@ protected function dumpPropertiesLabel(Abstraction $abs) * * @return string html fragment */ - protected function dumpProperty($name, $info, $opts) + protected function dumpProperty($name, array $info, array $opts) { $vis = (array) $info['visibility']; $info['isPrivateAncestor'] = \in_array('private', $vis, true) && $info['inheritedFrom']; return $this->html->buildTag( 'dd', array( - 'class' => $this->propertyClasses($info), + 'class' => $this->getCssClasses($info), 'data-attributes' => $opts['attributeOutput'] ? ($info['attributes'] ?: null) : null, 'data-inherited-from' => $info['inheritedFrom'], ), - $this->dumpPropertyInner($name, $info, $opts) + $this->dumpInner($name, $info, $opts) ); } /** * Build property inner html * - * @param string $name property name - * @param array $info property info + * @param string $name Property name + * @param array $info Property info * @param array $opts options (currently just attributeOutput) * * @return string html fragment */ - private function dumpPropertyInner($name, $info, $opts) + protected function dumpInner($name, array $info, array $opts) { $name = \str_replace('debug.', '', $name); + $title = $opts['phpDocOutput'] + ? (string) $info['desc'] + : ''; return $this->dumpModifiers($info) . ($info['isPrivateAncestor'] // wrapped in span for css rule `.private-ancestor > *` @@ -133,9 +136,7 @@ private function dumpPropertyInner($name, $info, $opts) : '') . ' ' . $this->html->buildTag('span', array( 'class' => 't_identifier', - 'title' => $opts['phpDocOutput'] - ? $info['desc'] - : '', + 'title' => $title, ), $name) . ($info['value'] !== Abstracter::UNDEFINED ? ' = ' @@ -144,13 +145,13 @@ private function dumpPropertyInner($name, $info, $opts) } /** - * Dump property modifiers + * Dump "modifiers" * - * @param array $info property info + * @param array $info Abstraction info * * @return string html fragment */ - private function dumpModifiers($info) + protected function dumpModifiers(array $info) { $modifiers = (array) $info['visibility']; $modifiers = \array_merge($modifiers, \array_keys(\array_filter(array( @@ -164,13 +165,13 @@ private function dumpModifiers($info) } /** - * Get a list of css classnames for property markup + * Get list of css classnames * - * @param array $info property info + * @param array $info Abstraction info * * @return string[] */ - protected function propertyClasses($info) + protected function getCssClasses(array $info) { $vis = (array) $info['visibility']; $classes = \array_keys(\array_filter(array( diff --git a/src/Debug/Dump/Html/Value.php b/src/Debug/Dump/Html/Value.php index fd13a054..e988851b 100644 --- a/src/Debug/Dump/Html/Value.php +++ b/src/Debug/Dump/Html/Value.php @@ -200,15 +200,15 @@ public function markupIdentifier($val, $asFunction = false, $tagName = 'span', $ */ protected function dumpArray($array) { - if (empty($array)) { - return 'array' - . '()'; - } $opts = \array_merge(array( 'asFileTree' => false, 'expand' => null, 'showListKeys' => true, ), $this->getDumpOpt()); + if (empty($array)) { + return 'array' + . '()'; + } if ($opts['expand'] !== null) { $this->setDumpOpt('attribs.data-expand', $opts['expand']); } diff --git a/src/Debug/Dump/TextAnsiValue.php b/src/Debug/Dump/TextAnsiValue.php index db3e977d..909ecac0 100644 --- a/src/Debug/Dump/TextAnsiValue.php +++ b/src/Debug/Dump/TextAnsiValue.php @@ -212,15 +212,17 @@ protected function dumpObjectProperties(Abstraction $abs) . "\n"; } foreach ($abs['properties'] as $name => $info) { - $vis = $this->dumpPropVis($info); - $str .= ' ' . $this->cfg['escapeCodes']['muted'] . '(' . $vis . ')' . $this->escapeReset - . ' ' . $this->cfg['escapeCodes']['property'] . $name . $this->escapeReset - . ($info['debugInfoExcluded'] - ? '' - : ' ' - . $this->cfg['escapeCodes']['operator'] . '=' . $this->escapeReset . ' ' - . $this->dump($info['value']) - ) . "\n"; + $vis = $this->cfg['escapeCodes']['muted'] . '(' . $this->dumpPropVis($info) . ')' . $this->escapeReset; + $name = $this->cfg['escapeCodes']['property'] . $name . $this->escapeReset; + $val = $info['debugInfoExcluded'] + ? '' + : \sprintf( + ' %s=%s %s', + $this->cfg['escapeCodes']['operator'], + $this->escapeReset, + $this->dump($info['value']) + ); + $str .= ' ' . $vis . ' ' . $name . $val . "\n"; } $header = $str ? "\e[4mProperties:\e[24m" diff --git a/src/Debug/Dump/TextValue.php b/src/Debug/Dump/TextValue.php index d6d0d808..5a1c5420 100644 --- a/src/Debug/Dump/TextValue.php +++ b/src/Debug/Dump/TextValue.php @@ -182,18 +182,11 @@ protected function dumpObjectProperties(Abstraction $abs) } foreach ($abs['properties'] as $name => $info) { $name = \str_replace('debug.', '', $name); - $vis = (array) $info['visibility']; - foreach ($vis as $i => $v) { - if (\in_array($v, array('magic', 'magic-read', 'magic-write'), true)) { - $vis[$i] = '✨ ' . $v; // "sparkles" there is no magic-wand unicode char - } elseif ($v === 'private' && $info['inheritedFrom']) { - $vis[$i] = '🔒 ' . $v; - } - } - $vis = \implode(' ', $vis); - $str .= $info['debugInfoExcluded'] - ? ' (' . $vis . ' excluded) ' . $name . "\n" - : ' (' . $vis . ') ' . $name . ' = ' . $this->dump($info['value']) . "\n"; + $vis = $this->dumpPropVis($info); + $val = $info['debugInfoExcluded'] + ? '' + : ' = ' . $this->dump($info['value']); + $str .= ' (' . $vis . ') ' . $name . $val . "\n"; } $propHeader = $str ? 'Properties:' diff --git a/src/Debug/InternalEvents.php b/src/Debug/InternalEvents.php index a5333be7..fef6777c 100644 --- a/src/Debug/InternalEvents.php +++ b/src/Debug/InternalEvents.php @@ -229,7 +229,7 @@ public function onPrettify(Event $event) return; } $this->onPrettifyDo($event, $matches[1]); - $event['value'] = $this->debug->abstracter->crateWithVals($event['value'], array( + $event['value'] = $event->getSubject()->abstracter->crateWithVals($event['value'], array( 'addQuotes' => false, 'attribs' => array( 'class' => 'highlight language-' . $event['highlightLang'], diff --git a/src/Debug/Utility/StringUtil.php b/src/Debug/Utility/StringUtil.php index ee47c611..98e02a9c 100644 --- a/src/Debug/Utility/StringUtil.php +++ b/src/Debug/Utility/StringUtil.php @@ -48,6 +48,7 @@ class StringUtil */ public static function compare($valA, $valB, $operator = 'strnatcmp') { + // phpcs:ignore SlevomatCodingStandard.Arrays.DisallowPartiallyKeyed.DisallowedPartiallyKeyed $operators = array( 'strcmp', 'strcasecmp', diff --git a/src/Debug/js/Debug.jquery.js b/src/Debug/js/Debug.jquery.js index c9a9a572..c39d4262 100644 --- a/src/Debug/js/Debug.jquery.js +++ b/src/Debug/js/Debug.jquery.js @@ -501,6 +501,10 @@ $replace.attr(name, this.value); $string.removeAttr(name); }); + if (attrs.style) { + // why is this necessary? + $replace.attr('style', attrs.style.value); + } } if ($string.is('td, th, li')) { $string.html(remove @@ -5909,7 +5913,7 @@ $ref.data('titleOrig', title); if (title === 'Deprecated') { title = tippyContentDeprecated($ref, title); - } else if (title === 'Inherited') { + } else if (['Inherited', 'Private ancestor'].indexOf(title) > -1) { title = tippyContentInherited($ref, title); } else if (title === 'Open in editor') { title = ' ' + title; @@ -5928,13 +5932,16 @@ function tippyContentInherited ($ref, title) { var titleMore = $ref.parent().data('inheritedFrom'); - if (titleMore) { - titleMore = '' + - titleMore.replace(/^(.*\\)(.+)$/, '$1$2') + - ''; - title = 'Inherited from ' + titleMore; + if (typeof titleMore === 'undefined') { + return title } - return title + title = title === 'Inherited' + ? 'Inherited from' + : title + '
defined in'; + titleMore = '' + + titleMore.replace(/^(.*\\)(.+)$/, '$1$2') + + ''; + return title + ' ' + titleMore } function tippyOnHide (instance) { @@ -6214,9 +6221,9 @@ '> .method > .parameter.isPromoted': '', '> .method > .parameter[data-attributes]': '', '> *[data-attributes]': '', + '> .private-ancestor': '', '> .property.debuginfo-value': '', '> .property.debuginfo-excluded': '', - '> .property.private-ancestor': '', '> .property.isPromoted': '', '> .property > .t_modifier_magic': '', '> .property > .t_modifier_magic-read': '', diff --git a/src/Debug/js/Debug.jquery.min.js b/src/Debug/js/Debug.jquery.min.js index 1e2fda28..880ff8b6 100644 --- a/src/Debug/js/Debug.jquery.min.js +++ b/src/Debug/js/Debug.jquery.min.js @@ -1 +1 @@ -!function(g){"use strict";var r,o,s;function l(e){r=e.data("config").get(),e.on("click","[data-toggle=vis]",function(){var e,t,n,a,i,r,o;return e=g(this),t=e.data("vis"),n=e.closest(".t_object"),a=n.find("> .object-inner"),i=a.find("[data-toggle=vis][data-vis="+t+"]"),r=a.find("."+t),o=e.hasClass("toggle-off"),i.html(e.html().replace(o?"show ":"hide ",o?"hide ":"show ")).addClass(o?"toggle-on":"toggle-off").removeClass(o?"toggle-off":"toggle-on"),o?function(e){e.each(function(){var n=g(this),e=n.closest(".object-inner"),a=!0;e.find("> .vis-toggles [data-toggle]").each(function(){var e=g(this),t=e.data("vis");if(!e.is(".toggle-on")&&n.hasClass(t))return a=!1}),a&&n.show()})}(r):r.hide(),c(n,!0),!1}),e.on("click","[data-toggle=interface]",function(){return function(e){var t=g(e),n=t.data("interface"),a=t.closest(".t_object"),i=a.find("> .object-inner > dd[data-implements="+n+"]");t.is(".toggle-off")?(t.addClass("toggle-on").removeClass("toggle-off"),i.show()):(t.addClass("toggle-off").removeClass("toggle-on"),i.hide());c(a)}(this),!1})}function a(e){var i,n=e.find("> .object-inner"),t=e.data("accessible"),a=[];e.is(".enhanced")||(n.find("> .method[data-implements]").hide().length&&(n.find("> .method[data-implements]").each(function(){var e=g(this).data("implements");a.indexOf(e)<0&&a.push(e)}),g.each(a,function(e,t){n.find("> .interface").each(function(){var e=''+t+"";g(this).text()===t&&g(this).html(e)})}),c(e)),n.find("> .private, > .protected").filter(".magic, .magic-read, .magic-write").removeClass("private protected"),"public"===t&&n.find(".private, .protected").hide(),function(e,t){var n=0');n&&l.append(''+s+" protected");a&&l.append(''+s+" private");i&&l.append('show excluded');r&&l.append('hide inherited');if(e.find("> dt.t_modifier_final").length)return e.find("> dt.t_modifier_final").after(l);e.prepend(l)}(n,t),i=n,g.each(r.iconsObject,function(e,t){var n=!0,a=t.match(/^([ap])\s*:(.+)$/);a&&(n="p"===a[1],t=a[2]),n?i.find(e).prepend(t):i.find(e).append(t)}),n.find("> .property.forceShow").show().find("> .t_array").debugEnhance("expand"),e.addClass("enhanced"))}function c(e,t){var n=t?".object-inner > dt":"> .object-inner > dt";e.find(n).each(function(e,t){var n=g(t).nextUntil("dt"),a=n.filter(function(e,t){return"none"!==g(t).css("display")});g(t).toggleClass("text-muted",0 thead");return i.is("table.sortable")&&(i.addClass("table-sort"),t.on("click","th",function(){var e=g(this),t=g(this).closest("tr").children(),n=t.index(e),a="desc"==(e.is(".sort-asc")?"asc":"desc")?"asc":"desc";t.removeClass("sort-asc sort-desc"),e.addClass("sort-"+a),e.find(".sort-arrows").length||(t.find(".sort-arrows").remove(),e.append('')),function(e,t,n){var a,i=e.tBodies[0],r=i.rows,o="function"==typeof Intl.Collator?new Intl.Collator([],{numeric:!0,sensitivity:"base"}):null;for(n="desc"===n?-1:1,r=(r=Array.prototype.slice.call(r,0)).sort(function(s,l,c){var d=/^([+-]?(?:0|[1-9]\d*)(?:\.\d*)?)(?:[eE]([+-]?\d+))?$/;return function(e,t){var n=e.cells[s].textContent.trim(),a=t.cells[s].textContent.trim(),i=n.match(d),r=a.match(d),o=0;return i&&(n=f(n,i)),r&&(a=f(a,r)),i&&r?n .object-inner > .property.debug-value > .t_identifier").filter(function(){return this.innerText.match(/^file$/)}),i=!0===e.data("detectFiles")||0 *:last-child").remove()}else e.find("table thead tr > *:last-child").after("");e.find("table tbody tr").each(function(){var e=g(this),t=e.find("> td"),n=g("",{class:"file-link",href:u(t.eq(0).text(),t.eq(1).text()),html:'',style:"vertical-align: bottom",title:"Open in editor"});a?e.find(".file-link").replaceWith(n):e.hasClass("context")?t.eq(0).attr("colspan",parseInt(t.eq(0).attr("colspan"),10)+1):t.last().after(g("",{class:"text-center",html:n}))})}(e,n):e.is("[data-file]")?function(e,t){if(e.find("> .file-link").remove(),t)return;e.append(g("",{html:'',href:u(e.data("file"),e.data("line")),title:"Open in editor",class:"file-link lpad"})[0].outerHTML)}(e,n):function(e,t,n){var a=e.data("foundFiles")||[];e.is(".m_table")&&(t=e.find("> table > tbody > tr > .t_string"));t=t||[];g.each(t,function(){!function(e,t,n){var a,i=g(e),r=e.attributes,o=g.trim(i.text()),s=function(e,t){var a=[],n=g.trim(e.text());if(e.data("file"))return"boolean"==typeof e.data("file")?[null,n,1]:[null,e.data("file"),e.data("line")||1];if(0===t.indexOf(n))return[null,n,1];if(e.parent(".property.debug-value").find("> .t_identifier").text().match(/^file$/))return a={line:1},e.parent().parent().find("> .property.debug-value").each(function(){var e=g(this).find("> .t_identifier")[0].innerText,t=g(this).find("> *:last-child"),n=g.trim(t[0].innerText);a[e]=n}),[null,n,a.line];return n.match(/^(\/.+\.php)(?: \(line (\d+)\))?$/)||[]}(i,n),l=!0!==t&&i.hasClass("file-link");if(i.closest(".m_trace").length)return p(i.closest(".m_trace"));if(!s.length)return;t?(a=g("",{text:o}),i.removeClass("file-link")):l?(a=i).prop("href",u(s[1],s[2])):a=g("",{class:"file-link",href:u(s[1],s[2]),html:o+' ',title:"Open in editor"});!1===l&&g.each(r,function(){if(void 0!==this){var e=this.name;if(!(-1<["html","href","title"].indexOf(e))){if("class"===e)return a.addClass(this.value),void i.removeClass("t_string");a.attr(e,this.value),i.removeAttr(e)}}});if(i.is("td, th, li"))return i.html(t?o:a);i.replaceWith(a)}(this,n,a)})}(e,t,n))}function u(e,t){var n={file:e,line:t||1};return o.linkFilesTemplate.replace(/%(\w*)\b/g,function(e,t){return Object.prototype.hasOwnProperty.call(n,t)?n[t]:""})}g=g&&Object.prototype.hasOwnProperty.call(g,"default")?g.default:g,Object.keys=Object.keys||function(e){if(e!==Object(e))throw new TypeError("Object.keys called on a non-object");var t,n=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.push(t);return n};var h,m,t,n,b=[],v=!1;function y(e){var t=e.parent(),n=!t.hasClass("m_group")||t.hasClass("expanded");e.hide(),e.children().each(function(){w(g(this))}),n&&e.show().trigger("expanded.debug.group"),function(){if(v)return;v=!0;for(;b.length;)b.shift().debugEnhance("expand");v=!1}(),!1===e.parent().hasClass("m_group")&&e.addClass("enhanced")}function w(e){if(!e.hasClass("enhanced")){if(e.hasClass("m_group"))!function(a){var i=a.find("> .group-header"),e=i.next();if(j(a),j(i),i.attr("data-toggle","group"),i.find(".t_array, .t_object").each(function(){g(this).data("expand",!1),x(a,this)}),g.each(["level-error","level-info","level-warn"],function(e,t){var n;a.hasClass(t)&&(n=i.children("i").eq(0),i.wrapInner(''),i.prepend(n))}),a.hasClass("expanded")||e.find(".m_error, .m_warn").not(".filter-hidden").not("[data-uncollapse=false]").length)return b.push(i);i.debugEnhance("collapse",!0)}(e);else{if(e.hasClass("filter-hidden"))return;(e.is(".m_table, .m_trace")?function(e){p(e),j(e),e.hasClass("m_table")&&e.find("> table > tbody > tr > td").each(function(){x(e,this)});e.find("tbody > tr.expanded").next().trigger("expanded.debug.next"),i(e.find("> table"))}:function(e){e.data("file")&&(e.attr("title")||e.attr("title",e.data("file")+": line "+e.data("line")),p(e));j(e),e.children().each(function(){x(e,this)})})(e)}e.addClass("enhanced"),e.trigger("enhanced.debug")}}function x(e,t){var n=g(t);n.is(".t_array")?D(n):n.is(".t_object")?n.find("> .classname, > .t_const").each(function(){var e=g(this),t=e.next(),n="object"===e.data("toggle");t.is(".t_recursion, .excluded")?e.addClass("empty"):n||0!==t.length&&(e.wrap('').after(' '),t.hide())}):n.is("table")?i(n):n.is(".t_string")?p(e,n):n.is(".string-encoded.tabs-container")&&x(n,n.find("> .tab-pane.active > *"))}function C(){var e=g(this).closest(".show-more-container");e.find(".show-more-wrapper").css("display","block").animate({height:"70px"}),e.find(".show-more-fade").fadeIn(),e.find(".show-more").show(),e.find(".show-less").hide()}function O(){var e=g(this).closest(".show-more-container");e.find(".show-more-wrapper").animate({height:e.find(".t_string").height()},400,"swing",function(){g(this).css("display","inline")}),e.find(".show-more-fade").fadeOut(),e.find(".show-more").hide(),e.find(".show-less").show()}function _(e){var t=g(e.target),n=t.closest("li[class*=m_]");e.stopPropagation(),t.find("> .array-inner > li > :last-child, > .array-inner > li[class]").each(function(){x(n,this)})}function k(e){var t=g(e.target);e.stopPropagation(),t.find("> .group-body").debugEnhance()}function E(e){var t=g(e.target),n=t.closest("li[class*=m_]");e.stopPropagation(),t.is(".enhanced")||(t.find("> .object-inner").find("> .constant > :last-child,> .property > :last-child,> .method .t_string").each(function(){x(n,this)}),a(t))}function T(e){var t=g(e.target);(t.hasClass("t_array")?t.find("> .array-inner").find("> li > .t_string, > li.t_string"):t.hasClass("m_group")?t.find("> .group-body > li > .t_string"):t.hasClass("t_object")?t.find("> .object-inner").find("> dd.constant > .t_string, > dd.property:visible > .t_string, > dd.method > .t_string"):g()).not("[data-type-more=numeric]").each(function(){var e,t,n;35<(e=g(this)).height()-70&&((n=e.wrap('
').parent()).append('
'),(t=n.wrap('
').parent()).append(''),t.append(''))})}function j(e){var t,n=function(e){var t,n,a;if(e.data("icon"))return e.data("icon").match("<")?g(e.data("icon")):g("").addClass(e.data("icon"));if(e.hasClass("m_group"))return t;for(a in n=e.hasClass("group-header")?e.parent():e,s.iconsMethods)if(n.is(a)){t=g(s.iconsMethods[a]);break}return t}(e);!function(e){var t,n,a;for(a in s.iconsMisc)0!==(n=e.find(a)).length&&(t=g(s.iconsMisc[a]),t=(n.find("> i:first-child").hasClass(t.attr("class"))||n.prepend(t),null))}(e),n&&(e.hasClass("m_group")?e=e.find("> .group-header .group-label").eq(0):e.find("> table").length&&((t=e.find("> table > caption")).length||(t=g(""),e.find("> table").prepend(t)),e=t),e.find("> i:first-child").hasClass(n.attr("class"))||e.prepend(n))}function D(n){var e=n.find("> .array-inner");0 .t_array-expand").length||g.trim(e.html()).length<1&&(n.addClass("expanded").find("br").hide(),!1===n.hasClass("max-depth"))||(function(t){var e,n=t.find("> .array-inner");if(t.closest(".array-file-tree").length)return t.find("> .t_keyword, > .t_punct").remove(),n.find("> li > .t_operator, > li > .t_key.t_int").remove(),t.prevAll(".t_key").each(function(){var e=g(this).attr("data-toggle","array");t.prepend(e),t.prepend('')});e=g('array( ··· )'),t.find("> .t_keyword").first().wrap('').after('( ').parent().next().remove(),t.prepend(e)}(n),g.each(s.iconsArray,function(e,t){n.find(e).prepend(t)}),n.debugEnhance(function(e){var t=e.data("expand"),n=e.parentsUntil(".m_group",".t_object, .t_array").length,a=0===n;void 0===t&&0!==n&&(t=e.closest(".t_array[data-expand]").data("expand"));void 0===t&&(t=a);return t||e.hasClass("array-file-tree")}(n)?"expand":"collapse"))}function A(e){var t;(m=(h=e).data("config")).get("drawer")&&(h.addClass("debug-drawer debug-enhanced-ui"),(t=h.find(".debug-menu-bar")).before('
PHP
'),t.find(".float-right").append(''),h.find(".tab-panes").scrollLock(),h.find(".debug-resize-handle").on("mousedown",F),h.find(".debug-pull-tab").on("click",M),h.find(".debug-menu-bar .close").on("click",L),m.get("persistDrawer")&&m.get("openDrawer")&&M())}function M(){h.addClass("debug-drawer-open"),h.debugEnhance(),H(),g("body").css("marginBottom",h.height()+8+"px"),g(window).on("resize",H),m.get("persistDrawer")&&m.set("openDrawer",!0)}function L(){h.removeClass("debug-drawer-open"),g("body").css("marginBottom",""),g(window).off("resize",H),m.get("persistDrawer")&&m.set("openDrawer",!1)}function S(e){H(t+(n-e.pageY),!0)}function F(e){g(e.target).closest(".debug-drawer").is(".debug-drawer-open")&&(t=h.find(".tab-panes").height(),n=e.pageY,g("html").addClass("debug-resizing"),h.parents().on("mousemove",S).on("mouseup",P),e.preventDefault())}function P(){g("html").removeClass("debug-resizing"),h.parents().off("mousemove",S).off("mouseup",P),g("body").css("marginBottom",h.height()+8+"px")}function H(e,t){var n=h.find(".tab-panes"),a=h.find(".debug-menu-bar").outerHeight(),i=window.innerHeight-a-50;e=function(e){var t=h.find(".tab-panes");if(e&&"object"!=typeof e)return e;!(e=parseInt(t[0].style.height,10))&&m.get("persistDrawer")&&(e=m.get("height"));return e||100}(e),e=Math.min(e,i),e=Math.max(e,20),n.css("height",e),t&&m.get("persistDrawer")&&m.set("height",e)}g.fn.scrollLock=function(e){return(e=void 0===e||e)?void g(this).on("DOMMouseScroll mousewheel wheel",function(e){function t(){return e.stopPropagation(),e.preventDefault(),e.returnValue=!1}var n=g(this),a=this.scrollTop,i=this.scrollHeight,r=n.innerHeight(),o=e.originalEvent.wheelDelta,s=0 .tab-panes > .tab-primary > .tab-body").find(".m_alert, .group-body > *:not(.m_groupSummary)").each(function(){i.push({depth:g(this).parentsUntil(".tab_body").length,node:g(this)})}),i.sort(function(e,t){return e.depth .group-body").debugEnhance(),r&&e.hasClass("m_group")&&e.trigger("collapsed.debug.group")}}function z(e){var t=0
'),N.get("drawer")||t.find("input[name=persistDrawer]").closest("label").remove(),I.find(".debug-options-toggle").on("click",ie),g("input[name=debugCookie]").on("change",ae).prop("checked",N.get("debugKey")&&K("debug")===N.get("debugKey")),N.get("debugKey")||g("input[name=debugCookie]").prop("disabled",!0).closest("label").addClass("disabled"),g("input[name=persistDrawer]").on("change",se).prop("checked",N.get("persistDrawer")),I.find("input[name=linkFiles]").on("change",re).prop("checked",N.get("linkFiles")).trigger("change"),I.find("input[name=linkFilesTemplate]").on("change",oe).val(N.get("linkFilesTemplate"))}function te(e){0===I.find(".debug-options").find(e.target).length&&le()}function ne(e){e.keyCode===Z&&le()}function ae(){g(this).is(":checked")?e("debug",N.get("debugKey"),7):e("debug","",-1)}function ie(e){var t=g(this).closest(".debug-bar").find(".debug-options").is(".show");I=g(this).closest(".debug"),t?le():(I.find(".debug-options").addClass("show"),g("body").on("click",te),g("body").on("keyup",ne)),e.stopPropagation()}function re(){var e=g(this).prop("checked"),t=g(this).closest(".debug-options").find("input[name=linkFilesTemplate]").closest(".form-group");e?t.slideDown():t.slideUp(),N.set("linkFiles",e),g("input[name=linkFilesTemplate]").trigger("change")}function oe(){var e=g(this).val();N.set("linkFilesTemplate",e),I.trigger("config.debug.updated","linkFilesTemplate")}function se(){var e=g(this).is(":checked");N.set({persistDrawer:e,openDrawer:e,openSidebar:!0})}function le(){I.find(".debug-options").removeClass("show"),g("body").off("click",te),g("body").off("keyup",ne)}var ce,de,fe,pe=!1,ue={alert:'Alerts',error:'Error',warn:'Warning',info:'Info',other:'Other'},ge='
';function he(e){var t,n,a=e.find("> .tab-panes > .tab-primary");Y=e.data("config")||g("body").data("config"),Q=e,a.length&&a.data("options").sidebar&&xe(Q),Y.get("persistDrawer")&&!Y.get("openSidebar")&&Ce(Q),Q.on("click",".close[data-dismiss=alert]",be),Q.on("click",".sidebar-toggle",ve),Q.on("change",".debug-sidebar input[type=checkbox]",me),pe||(t=we,R.push(t),n=ye,B.push(n),pe=!0)}function me(e){var t=g(this),n=t.closest(".toggle"),a=n.next("ul").find(".toggle"),i=t.is(":checked"),r=g(".m_alert.error-summary.have-fatal");n.toggleClass("active",i),a.toggleClass("active",i),"fatal"===t.val()&&(r.find(".error-fatal").toggleClass("filter-hidden",!i),r.toggleClass("filter-hidden",0===r.children().not(".filter-hidden").length))}function be(){var e=g(this).closest(".debug");setTimeout(function(){e.find(".m_alert").length&&e.find(".debug-sidebar input[data-toggle=method][value=alert]").parent().addClass("disabled")})}function ve(){var e=g(this).closest(".debug");(e.find(".debug-sidebar").is(".show")?Ce:Oe)(e)}function ye(e){var t=e[0].className.match(/\bm_(\S+)\b/),n=t?t[1]:null;return!G.sidebar||("group"===n&&e.find("> .group-body")[0].className.match(/level-(error|info|warn)/)&&(n=e.find("> .group-body")[0].className.match(/level-(error|info|warn)/)[1],e.toggleClass("filter-hidden-body",X.indexOf(n)<0)),-1<["alert","error","warn","info"].indexOf(n)?-1 .tab-primary > .tab-body > .expand-all");e.find(".tab-panes > .tab-primary > .tab-body").before(r),t=e.closest(".debug").find(".m_alert.error-summary"),(n=t.find(".in-console")).prev().remove(),n.remove(),0===t.children().length&&t.remove(),i=(a=e).find(".debug-sidebar .php-errors ul"),g.each(["fatal","error","warning","deprecated","notice","strict"],function(e,t){var n="fatal"===t?a.find(".m_alert.error-summary.have-fatal").length:a.find(".error-"+t).filter(".m_error,.m_warn").length;0!==n&&i.append(g("
  • ").append(g('