diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cae9f51..8a67f6e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ Please also have a look at our ### Changed +- Use more native type declarations and strict mode + (#641, #772, #774, #778, #804) - Mark parsing-internal classes and methods as `@internal` (#674) - Block installations on unsupported higher PHP versions (#691) - Improve performance of `Value::parseValue` with many delimiters by refactoring diff --git a/src/CSSList/CSSBlockList.php b/src/CSSList/CSSBlockList.php index c1cc05c2..1be8fe3a 100644 --- a/src/CSSList/CSSBlockList.php +++ b/src/CSSList/CSSBlockList.php @@ -30,10 +30,8 @@ public function __construct($iLineNo = 0) /** * @param array $aResult - * - * @return void */ - protected function allDeclarationBlocks(array &$aResult) + protected function allDeclarationBlocks(array &$aResult): void { foreach ($this->aContents as $mContent) { if ($mContent instanceof DeclarationBlock) { @@ -46,10 +44,8 @@ protected function allDeclarationBlocks(array &$aResult) /** * @param array $aResult - * - * @return void */ - protected function allRuleSets(array &$aResult) + protected function allRuleSets(array &$aResult): void { foreach ($this->aContents as $mContent) { if ($mContent instanceof RuleSet) { @@ -65,11 +61,13 @@ protected function allRuleSets(array &$aResult) * @param array $aResult * @param string|null $sSearchString * @param bool $bSearchInFunctionArguments - * - * @return void */ - protected function allValues($oElement, array &$aResult, $sSearchString = null, $bSearchInFunctionArguments = false) - { + protected function allValues( + $oElement, + array &$aResult, + $sSearchString = null, + $bSearchInFunctionArguments = false + ): void { if ($oElement instanceof CSSBlockList) { foreach ($oElement->getContents() as $oContent) { $this->allValues($oContent, $aResult, $sSearchString, $bSearchInFunctionArguments); @@ -95,10 +93,8 @@ protected function allValues($oElement, array &$aResult, $sSearchString = null, /** * @param array $aResult * @param string|null $sSpecificitySearch - * - * @return void */ - protected function allSelectors(array &$aResult, $sSpecificitySearch = null) + protected function allSelectors(array &$aResult, $sSpecificitySearch = null): void { /** @var array $aDeclarationBlocks */ $aDeclarationBlocks = []; diff --git a/src/Comment/Commentable.php b/src/Comment/Commentable.php index e07d9774..0cb3df24 100644 --- a/src/Comment/Commentable.php +++ b/src/Comment/Commentable.php @@ -8,10 +8,8 @@ interface Commentable { /** * @param array $comments - * - * @return void */ - public function addComments(array $comments); + public function addComments(array $comments): void; /** * @return array @@ -20,8 +18,6 @@ public function getComments(); /** * @param array $comments - * - * @return void */ - public function setComments(array $comments); + public function setComments(array $comments): void; } diff --git a/src/Property/Charset.php b/src/Property/Charset.php index 4352850f..a36e55a2 100644 --- a/src/Property/Charset.php +++ b/src/Property/Charset.php @@ -54,8 +54,6 @@ public function getLineNo() /** * @param string|CSSString $oCharset - * - * @return void */ public function setCharset($sCharset): void { @@ -96,8 +94,6 @@ public function atRuleArgs() /** * @param array $comments - * - * @return void */ public function addComments(array $comments): void { @@ -114,8 +110,6 @@ public function getComments() /** * @param array $comments - * - * @return void */ public function setComments(array $comments): void { diff --git a/src/Property/Selector.php b/src/Property/Selector.php index 9a70d6c3..28e63ec2 100644 --- a/src/Property/Selector.php +++ b/src/Property/Selector.php @@ -106,8 +106,6 @@ public function getSelector() /** * @param string $sSelector - * - * @return void */ public function setSelector($sSelector): void { diff --git a/src/Rule/Rule.php b/src/Rule/Rule.php index 137a64e7..d598a366 100644 --- a/src/Rule/Rule.php +++ b/src/Rule/Rule.php @@ -228,8 +228,6 @@ public function addIeHack($iModifier): void /** * @param array $aModifiers - * - * @return void */ public function setIeHack(array $aModifiers): void {