1
0
mirror of https://github.com/erusev/parsedown.git synced 2025-09-02 19:32:35 +02:00

[PHP 8.4] Fixes for implicit nullability deprecation

Fixes all issues that emit deprecation notices on PHP 8.4 for implicit nullable parameter type declarations.

See:
 - [RFC](https://wiki.php.net/rfc/deprecate-implicitly-nullable-types)
 - [PHP 8.4: Implicitly nullable parameter declarations deprecated](https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated)
This commit is contained in:
Ayesh Karunaratne
2024-03-16 02:44:40 +07:00
parent 1ff0382739
commit 908754bcdd

View File

@@ -571,7 +571,7 @@ class Parsedown
#
# List
protected function blockList($Line, array $CurrentBlock = null)
protected function blockList($Line, ?array $CurrentBlock = null)
{
list($name, $pattern) = $Line['text'][0] <= '-' ? array('ul', '[*+-]') : array('ol', '[0-9]{1,9}+[.\)]');
@@ -808,7 +808,7 @@ class Parsedown
#
# Setext
protected function blockSetextHeader($Line, array $Block = null)
protected function blockSetextHeader($Line, ?array $Block = null)
{
if ( ! isset($Block) or $Block['type'] !== 'Paragraph' or isset($Block['interrupted']))
{
@@ -894,7 +894,7 @@ class Parsedown
#
# Table
protected function blockTable($Line, array $Block = null)
protected function blockTable($Line, ?array $Block = null)
{
if ( ! isset($Block) or $Block['type'] !== 'Paragraph' or isset($Block['interrupted']))
{