Browse Source

More phpstan related fixes.

mscherer 8 years ago
parent
commit
afb928ce13
2 changed files with 3 additions and 2 deletions
  1. 1 0
      phpstan.neon
  2. 2 2
      src/Http/Response.php

+ 1 - 0
phpstan.neon

@@ -20,6 +20,7 @@ parameters:
         - '#Result of method Cake\\Http\\Response::send\(\) \(void\) is used#'
         - '#Method Cake\\View\\Form\\ContextInterface::val\(\) invoked with 2 parameters, 1 required#'
         - '#Access to an undefined property Exception::\$queryString#'
+        - '#Access to an undefined property PHPUnit\\Framework\\Test::\$fixtureManager#'
         - '#Method Redis::#'
         - '#Call to an undefined method Traversable::getArrayCopy().#'
     earlyTerminatingMethodCalls:

+ 2 - 2
src/Http/Response.php

@@ -1834,7 +1834,7 @@ class Response implements ResponseInterface
      * If called with no arguments returns the last Content-Length set
      *
      * @param int|null $bytes Number of bytes
-     * @return int|null
+     * @return string|null
      * @deprecated 3.4.0 Use withLength() to set length instead.
      */
     public function length($bytes = null)
@@ -1844,7 +1844,7 @@ class Response implements ResponseInterface
         }
 
         if ($this->hasHeader('Content-Length')) {
-            return (int)$this->getHeaderLine('Content-Length');
+            return $this->getHeaderLine('Content-Length');
         }
 
         return null;