diff vendor/symfony/http-foundation/IpUtils.php @ 4:a9cd425dd02b

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:11:55 +0000
parents c75dbcec494b
children
line wrap: on
line diff
--- a/vendor/symfony/http-foundation/IpUtils.php	Thu Feb 28 11:14:44 2019 +0000
+++ b/vendor/symfony/http-foundation/IpUtils.php	Thu Feb 28 13:11:55 2019 +0000
@@ -18,7 +18,7 @@
  */
 class IpUtils
 {
-    private static $checkedIps = array();
+    private static $checkedIps = [];
 
     /**
      * This class should not be instantiated.
@@ -37,8 +37,8 @@
      */
     public static function checkIp($requestIp, $ips)
     {
-        if (!is_array($ips)) {
-            $ips = array($ips);
+        if (!\is_array($ips)) {
+            $ips = [$ips];
         }
 
         $method = substr_count($requestIp, ':') > 1 ? 'checkIp6' : 'checkIp4';
@@ -116,7 +116,7 @@
             return self::$checkedIps[$cacheKey];
         }
 
-        if (!((extension_loaded('sockets') && defined('AF_INET6')) || @inet_pton('::1'))) {
+        if (!((\extension_loaded('sockets') && \defined('AF_INET6')) || @inet_pton('::1'))) {
             throw new \RuntimeException('Unable to check Ipv6. Check that PHP was not compiled with option "disable-ipv6".');
         }