Explorar o código

[RequestHandler] fixed coding standards: the use of function is_null() is forbidden

Pascal Borreli %!s(int64=15) %!d(string=hai) anos
pai
achega
8b1c1db860
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/Symfony/Components/RequestHandler/Response.php

+ 2 - 2
src/Symfony/Components/RequestHandler/Response.php

@@ -147,7 +147,7 @@ class Response implements ResponseInterface
    */
   public function setCookie($name, $value, $expire = null, $path = '/', $domain = '', $secure = false, $httpOnly = false)
   {
-    if (!is_null($expire))
+    if (null !== $expire)
     {
       if (is_numeric($expire))
       {
@@ -228,7 +228,7 @@ class Response implements ResponseInterface
   {
     $name = $this->normalizeHeaderName($name);
 
-    if (is_null($value))
+    if (null === $value)
     {
       unset($this->headers[$name]);