diff --git a/src/cssdoc.php b/src/cssdoc.php index 39fc9c8..19d383f 100644 --- a/src/cssdoc.php +++ b/src/cssdoc.php @@ -215,7 +215,7 @@ public function open(string $url, $context = null, ?string &$error = null) : str * @param ?string &$error A reference to any user error that is generated * @return bool Whether the input CSS was parsed */ - public function load(string $css, string $charset = null, ?string &$error = null) : bool { + public function load(string $css, ?string $charset = null, ?string &$error = null) : bool { // detect the charset if ($charset || ($charset = $this->getCharsetFromCss($css)) !== null) { @@ -307,7 +307,7 @@ public function compile(array $options = []) : ?string { * @param array $options An array indicating output options, this is merged with cssdoc::$output * @return string|false The compiled CSS, or false if the file could not be saved */ - public function save(string $file = null, array $options = []) : string|false { + public function save(?string $file = null, array $options = []) : string|false { $css = $this->compile($options); // save file