diff vendor/symfony/validator/Constraints/Regex.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 af1871eacc83
line wrap: on
line diff
--- a/vendor/symfony/validator/Constraints/Regex.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/vendor/symfony/validator/Constraints/Regex.php	Thu Feb 28 13:21:36 2019 +0000
@@ -23,9 +23,9 @@
 {
     const REGEX_FAILED_ERROR = 'de1e3db3-5ed4-4941-aae4-59f3667cc3a3';
 
-    protected static $errorNames = array(
+    protected static $errorNames = [
         self::REGEX_FAILED_ERROR => 'REGEX_FAILED_ERROR',
-    );
+    ];
 
     public $message = 'This value is not valid.';
     public $pattern;
@@ -45,7 +45,7 @@
      */
     public function getRequiredOptions()
     {
-        return array('pattern');
+        return ['pattern'];
     }
 
     /**
@@ -70,7 +70,7 @@
         }
 
         // Quit if delimiters not at very beginning/end (e.g. when options are passed)
-        if ($this->pattern[0] !== $this->pattern[strlen($this->pattern) - 1]) {
+        if ($this->pattern[0] !== $this->pattern[\strlen($this->pattern) - 1]) {
             return;
         }
 
@@ -95,7 +95,7 @@
         $pattern = '^' === $pattern[0] ? substr($pattern, 1) : '.*'.$pattern;
 
         // Trim trailing $, otherwise append .*
-        $pattern = '$' === $pattern[strlen($pattern) - 1] ? substr($pattern, 0, -1) : $pattern.'.*';
+        $pattern = '$' === $pattern[\strlen($pattern) - 1] ? substr($pattern, 0, -1) : $pattern.'.*';
 
         return $pattern;
     }