Skip to content

Commit

Permalink
Removed E_DEPRECATED error explicit nullable types (#132)
Browse files Browse the repository at this point in the history
Co-authored-by: Richard Brinkman <[email protected]>
  • Loading branch information
richardbrinkman and Richard Brinkman authored Jan 22, 2025
1 parent acd361c commit 5c580b4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/Caxy/HtmlDiff/Table/AbstractTableElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ abstract class AbstractTableElement
*
* @param \DOMElement|null $domNode
*/
public function __construct(\DOMElement $domNode = null)
public function __construct(?\DOMElement $domNode = null)
{
$this->domNode = $domNode;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Caxy/HtmlDiff/Table/TableCell.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function getRow()
*
* @return $this
*/
public function setRow(TableRow $row = null)
public function setRow(?TableRow $row = null)
{
$this->row = $row;

Expand Down
6 changes: 3 additions & 3 deletions lib/Caxy/HtmlDiff/Table/TableDiff.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class TableDiff extends AbstractDiff
*
* @return self
*/
public static function create($oldText, $newText, HtmlDiffConfig $config = null)
public static function create($oldText, $newText, ?HtmlDiffConfig $config = null)
{
$diff = new self($oldText, $newText);

Expand Down Expand Up @@ -549,7 +549,7 @@ protected function diffRows($oldRow, $newRow, array &$appliedRowSpans, $forceExp
*
* @return \DOMElement
*/
protected function getNewCellNode(TableCell $oldCell = null, TableCell $newCell = null)
protected function getNewCellNode(?TableCell $oldCell = null, ?TableCell $newCell = null)
{
// If only one cell exists, use it
if (!$oldCell || !$newCell) {
Expand Down Expand Up @@ -654,7 +654,7 @@ protected function parseTableStructure($text)
* @param Table $table
* @param \DOMNode|null $node
*/
protected function parseTable(Table $table, \DOMNode $node = null)
protected function parseTable(Table $table, ?\DOMNode $node = null)
{
if ($node === null) {
$node = $table->getDomNode();
Expand Down
2 changes: 1 addition & 1 deletion lib/Caxy/HtmlDiff/Table/TableRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function getTable()
*
* @return $this
*/
public function setTable(Table $table = null)
public function setTable(?Table $table = null)
{
$this->table = $table;

Expand Down

0 comments on commit 5c580b4

Please sign in to comment.