| @@ -32,9 +32,9 @@ | ||
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * @param resource|string $body |
| 35 | 35 | */ |
| 36 | - public function __construct($body, string $filename = null, string $contentType = null, string $encoding = null) | |
| 36 | + public function __construct($body, ?string $filename = null, ?string $contentType = null, ?string $encoding = null) | |
| 37 | 37 | { |
| 38 | 38 | unset($this->_parent); |
| 39 | 39 | |
| 40 | 40 | if (null === $contentType) { |
| @@ -50,9 +50,9 @@ | ||
| 50 | 50 | } |
| 51 | 51 | $this->setDisposition('attachment'); |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | - public static function fromPath(string $path, string $name = null, string $contentType = null): self | |
| 54 | + public static function fromPath(string $path, ?string $name = null, ?string $contentType = null): self | |
| 55 | 55 | { |
| 56 | 56 | if (null === $contentType) { |
| 57 | 57 | $ext = strtolower(substr($path, strrpos($path, '.') + 1)); |
| 58 | 58 | if (null === self::$mimeTypes) { |