Skip to content

Commit

Permalink
Nullable types
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Oct 17, 2024
1 parent 2011196 commit aa85dc6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Dom/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ public function loadHTMLFragment($source, $options = [])
* @return string The HTML, or false if an error occurred.
*/
#[\ReturnTypeWillChange]
public function saveHTML(DOMNode $node = null)
public function saveHTML(?DOMNode $node = null)
{
return $this->saveHTMLFragment($node);
}
Expand All @@ -424,7 +424,7 @@ public function saveHTML(DOMNode $node = null)
* @param DOMNode|null $node Optional. Parameter to output a subset of the document.
* @return string The HTML fragment, or false if an error occurred.
*/
public function saveHTMLFragment(DOMNode $node = null)
public function saveHTMLFragment(?DOMNode $node = null)
{
$filtersInReverse = array_reverse($this->filters);

Expand Down
6 changes: 3 additions & 3 deletions src/Optimizer/TransformationEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ final class TransformationEngine
* @param Spec $spec Optional. Validator spec instance to use.
*/
public function __construct(
Configuration $configuration = null,
RemoteGetRequest $remoteRequest = null,
Spec $spec = null
?Configuration $configuration = null,
?RemoteGetRequest $remoteRequest = null,
?Spec $spec = null
) {
$this->configuration = isset($configuration) ? $configuration : new DefaultConfiguration();
$this->remoteRequest = $remoteRequest;
Expand Down

0 comments on commit aa85dc6

Please sign in to comment.