From 3df55c1210a5915e85b492e7ebda3dff2e37b851 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 9 Sep 2025 16:16:43 +0200 Subject: [PATCH] Fix reported implicit nullable types --- src/CSSList/Document.php | 2 +- src/Parser.php | 2 +- src/RuleSet/RuleSet.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CSSList/Document.php b/src/CSSList/Document.php index 7d9c6ec0..fc617f62 100644 --- a/src/CSSList/Document.php +++ b/src/CSSList/Document.php @@ -159,7 +159,7 @@ public function createShorthands() * * @return string */ - public function render($oOutputFormat = null) + public function render(?OutputFormat $oOutputFormat = null) { if ($oOutputFormat === null) { $oOutputFormat = new OutputFormat(); diff --git a/src/Parser.php b/src/Parser.php index f60fc086..92f18c31 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -21,7 +21,7 @@ class Parser * @param Settings|null $oParserSettings * @param int $iLineNo the line number (starting from 1, not from 0) */ - public function __construct($sText, $oParserSettings = null, $iLineNo = 1) + public function __construct($sText, ?Settings $oParserSettings = null, $iLineNo = 1) { if ($oParserSettings === null) { $oParserSettings = Settings::create(); diff --git a/src/RuleSet/RuleSet.php b/src/RuleSet/RuleSet.php index 8cbbd34f..1362a544 100644 --- a/src/RuleSet/RuleSet.php +++ b/src/RuleSet/RuleSet.php @@ -102,7 +102,7 @@ public function getLineNo() * * @return void */ - public function addRule(Rule $oRule, $oSibling = null) + public function addRule(Rule $oRule, ?Rule $oSibling = null) { $sRule = $oRule->getRule(); if (!isset($this->aRules[$sRule])) {