Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/DiDom/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public function preserveWhiteSpace(bool $value = true): self
* @throws InvalidArgumentException if parameter 4 is not an integer or null
* @throws RuntimeException if the document type is invalid (not Document::TYPE_HTML or Document::TYPE_XML)
*/
public function load(string $string, bool $isFile = false, string $type = Document::TYPE_HTML, int $options = null): void
public function load(string $string, bool $isFile = false, string $type = Document::TYPE_HTML, ?int $options = null): void
{
if ( ! in_array(strtolower($type), [Document::TYPE_HTML, Document::TYPE_XML], true)) {
throw new RuntimeException(sprintf('Document type must be "xml" or "html", %s given.', $type));
Expand Down
2 changes: 1 addition & 1 deletion src/DiDom/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public function attr(string $name, ?string $value = null)
*
* @return array|null
*/
public function attributes(array $names = null): ?array
public function attributes(?array $names = null): ?array
{
if ( ! $this->node instanceof DOMElement) {
return null;
Expand Down