diff vendor/symfony/dom-crawler/AbstractUriElement.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children
line wrap: on
line diff
--- a/vendor/symfony/dom-crawler/AbstractUriElement.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/vendor/symfony/dom-crawler/AbstractUriElement.php	Thu Feb 28 13:21:36 2019 +0000
@@ -42,7 +42,7 @@
      */
     public function __construct(\DOMElement $node, $currentUri, $method = 'GET')
     {
-        if (!in_array(strtolower(substr($currentUri, 0, 4)), array('http', 'file'))) {
+        if (!\in_array(strtolower(substr($currentUri, 0, 4)), ['http', 'file'])) {
             throw new \InvalidArgumentException(sprintf('Current URI must be an absolute URL ("%s").', $currentUri));
         }
 
@@ -114,7 +114,7 @@
         }
 
         // relative path
-        $path = parse_url(substr($this->currentUri, strlen($baseUri)), PHP_URL_PATH);
+        $path = parse_url(substr($this->currentUri, \strlen($baseUri)), PHP_URL_PATH);
         $path = $this->canonicalizePath(substr($path, 0, strrpos($path, '/')).'/'.$uri);
 
         return $baseUri.('' === $path || '/' !== $path[0] ? '/' : '').$path;
@@ -144,7 +144,7 @@
             $path .= '/';
         }
 
-        $output = array();
+        $output = [];
 
         foreach (explode('/', $path) as $segment) {
             if ('..' === $segment) {