filebackend: use self:: instead of FileBackend:: for some constant uses
[lhc/web/wiklou.git] / includes / libs / Cookie.php
index a67b919..b7636b1 100644 (file)
@@ -58,11 +58,7 @@ class Cookie {
                        $this->expires = strtotime( $attr['expires'] );
                }
 
-               if ( isset( $attr['path'] ) ) {
-                       $this->path = $attr['path'];
-               } else {
-                       $this->path = '/';
-               }
+               $this->path = $attr['path'] ?? '/';
 
                if ( isset( $attr['domain'] ) ) {
                        if ( self::validateCookieDomain( $attr['domain'] ) ) {
@@ -86,7 +82,7 @@ class Cookie {
         * not a big problem in practice, but there are test cases)
         *
         * @param string $domain The domain to validate
-        * @param string $originDomain (optional) the domain the cookie originates from
+        * @param string|null $originDomain (optional) the domain the cookie originates from
         * @return bool
         */
        public static function validateCookieDomain( $domain, $originDomain = null ) {