Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / routing / Matcher / Dumper / StaticPrefixCollection.php
index 73658086189a07fe2fcc8b2a593e6ed27ecdd210..d1cd68ee529f699d16bfd9421e48f43b81b61dbc 100644 (file)
@@ -69,7 +69,7 @@ class StaticPrefixCollection
             // This is needed because otherwise routes that come afterwards have higher precedence
             // than a possible regular expression, which goes against the input order sorting.
             $this->items[] = array($prefix, $route);
-            $this->matchStart = count($this->items);
+            $this->matchStart = \count($this->items);
 
             return;
         }
@@ -106,7 +106,7 @@ class StaticPrefixCollection
      * @param string                       $prefix
      * @param mixed                        $route
      *
-     * @return null|StaticPrefixCollection
+     * @return StaticPrefixCollection|null
      */
     private function groupWithItem($item, $prefix, $route)
     {
@@ -152,9 +152,9 @@ class StaticPrefixCollection
      */
     private function detectCommonPrefix($prefix, $anotherPrefix)
     {
-        $baseLength = strlen($this->prefix);
+        $baseLength = \strlen($this->prefix);
         $commonLength = $baseLength;
-        $end = min(strlen($prefix), strlen($anotherPrefix));
+        $end = min(\strlen($prefix), \strlen($anotherPrefix));
 
         for ($i = $baseLength; $i <= $end; ++$i) {
             if (substr($prefix, 0, $i) !== substr($anotherPrefix, 0, $i)) {
@@ -166,7 +166,7 @@ class StaticPrefixCollection
 
         $commonPrefix = rtrim(substr($prefix, 0, $commonLength), '/');
 
-        if (strlen($commonPrefix) > $baseLength) {
+        if (\strlen($commonPrefix) > $baseLength) {
             return $commonPrefix;
         }
 
@@ -201,7 +201,7 @@ class StaticPrefixCollection
 
     private function shouldBeInlined()
     {
-        if (count($this->items) >= 3) {
+        if (\count($this->items) >= 3) {
             return false;
         }
 
@@ -212,7 +212,7 @@ class StaticPrefixCollection
         }
 
         foreach ($this->items as $item) {
-            if (is_array($item) && $item[0] === $this->prefix) {
+            if (\is_array($item) && $item[0] === $this->prefix) {
                 return false;
             }
         }