diff vendor/symfony/var-dumper/Caster/LinkStub.php @ 12:7a779792577d

Update Drupal core to v8.4.5 (via Composer)
author Chris Cannam
date Fri, 23 Feb 2018 15:52:07 +0000
parents 4c8ae668cc8c
children 129ea1e6d783
line wrap: on
line diff
--- a/vendor/symfony/var-dumper/Caster/LinkStub.php	Fri Feb 23 15:51:18 2018 +0000
+++ b/vendor/symfony/var-dumper/Caster/LinkStub.php	Fri Feb 23 15:52:07 2018 +0000
@@ -18,6 +18,8 @@
  */
 class LinkStub extends ConstStub
 {
+    public $inVendor = false;
+
     private static $vendorRoots;
     private static $composerRoots;
 
@@ -50,10 +52,10 @@
         if ($label !== $this->attr['file'] = realpath($href) ?: $href) {
             return;
         }
-        if ($composerRoot = $this->getComposerRoot($href, $inVendor)) {
+        if ($composerRoot = $this->getComposerRoot($href, $this->inVendor)) {
             $this->attr['ellipsis'] = strlen($href) - strlen($composerRoot) + 1;
             $this->attr['ellipsis-type'] = 'path';
-            $this->attr['ellipsis-tail'] = 1 + ($inVendor ? 2 + strlen(implode(array_slice(explode(DIRECTORY_SEPARATOR, substr($href, 1 - $this->attr['ellipsis'])), 0, 2))) : 0);
+            $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';