Skip to content

Commit 5c580b4

Browse files
richardbrinkmanRichard Brinkman
and
Richard Brinkman
authored
Removed E_DEPRECATED error explicit nullable types (#132)
Co-authored-by: Richard Brinkman <r.brinkman@gmail.com>
1 parent acd361c commit 5c580b4

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

lib/Caxy/HtmlDiff/Table/AbstractTableElement.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ abstract class AbstractTableElement
1717
*
1818
* @param \DOMElement|null $domNode
1919
*/
20-
public function __construct(\DOMElement $domNode = null)
20+
public function __construct(?\DOMElement $domNode = null)
2121
{
2222
$this->domNode = $domNode;
2323
}

lib/Caxy/HtmlDiff/Table/TableCell.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function getRow()
2525
*
2626
* @return $this
2727
*/
28-
public function setRow(TableRow $row = null)
28+
public function setRow(?TableRow $row = null)
2929
{
3030
$this->row = $row;
3131

lib/Caxy/HtmlDiff/Table/TableDiff.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class TableDiff extends AbstractDiff
5454
*
5555
* @return self
5656
*/
57-
public static function create($oldText, $newText, HtmlDiffConfig $config = null)
57+
public static function create($oldText, $newText, ?HtmlDiffConfig $config = null)
5858
{
5959
$diff = new self($oldText, $newText);
6060

@@ -549,7 +549,7 @@ protected function diffRows($oldRow, $newRow, array &$appliedRowSpans, $forceExp
549549
*
550550
* @return \DOMElement
551551
*/
552-
protected function getNewCellNode(TableCell $oldCell = null, TableCell $newCell = null)
552+
protected function getNewCellNode(?TableCell $oldCell = null, ?TableCell $newCell = null)
553553
{
554554
// If only one cell exists, use it
555555
if (!$oldCell || !$newCell) {
@@ -654,7 +654,7 @@ protected function parseTableStructure($text)
654654
* @param Table $table
655655
* @param \DOMNode|null $node
656656
*/
657-
protected function parseTable(Table $table, \DOMNode $node = null)
657+
protected function parseTable(Table $table, ?\DOMNode $node = null)
658658
{
659659
if ($node === null) {
660660
$node = $table->getDomNode();

lib/Caxy/HtmlDiff/Table/TableRow.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function getTable()
3030
*
3131
* @return $this
3232
*/
33-
public function setTable(Table $table = null)
33+
public function setTable(?Table $table = null)
3434
{
3535
$this->table = $table;
3636

0 commit comments

Comments
 (0)