type arrays for class and subclass

This commit is contained in:
Tac Tacelosky 2021-11-07 07:46:59 -05:00
parent d6498ec366
commit 7398fd13af
3 changed files with 8 additions and 7 deletions

View file

@ -1248,7 +1248,7 @@ class Markdown implements MarkdownInterface {
* Define the emphasis operators with their regex matches
* @var array
*/
protected $em_relist = array(
protected array $em_relist = array(
'' => '(?:(?<!\*)\*(?!\*)|(?<!_)_(?!_))(?![\.,:;]?\s)',
'*' => '(?<![\s*])\*(?!\*)',
'_' => '(?<![\s_])_(?!_)',
@ -1258,7 +1258,7 @@ class Markdown implements MarkdownInterface {
* Define the strong operators with their regex matches
* @var array
*/
protected $strong_relist = array(
protected array $strong_relist = array(
'' => '(?:(?<!\*)\*\*(?!\*)|(?<!_)__(?!_))(?![\.,:;]?\s)',
'**' => '(?<![\s*])\*\*(?!\*)',
'__' => '(?<![\s_])__(?!_)',
@ -1268,7 +1268,7 @@ class Markdown implements MarkdownInterface {
* Define the emphasis + strong operators with their regex matches
* @var array
*/
protected $em_strong_relist = array(
protected array $em_strong_relist = array(
'' => '(?:(?<!\*)\*\*\*(?!\*)|(?<!_)___(?!_))(?![\.,:;]?\s)',
'***' => '(?<![\s*])\*\*\*(?!\*)',
'___' => '(?<![\s_])___(?!_)',

View file

@ -1549,17 +1549,17 @@ class MarkdownExtra extends \Michelf\Markdown {
* work in the middle of a word.
* @var array
*/
protected $em_relist = array(
protected array $em_relist = array(
'' => '(?:(?<!\*)\*(?!\*)|(?<![a-zA-Z0-9_])_(?!_))(?![\.,:;]?\s)',
'*' => '(?<![\s*])\*(?!\*)',
'_' => '(?<![\s_])_(?![a-zA-Z0-9_])',
);
protected $strong_relist = array(
protected array $strong_relist = array(
'' => '(?:(?<!\*)\*\*(?!\*)|(?<![a-zA-Z0-9_])__(?!_))(?![\.,:;]?\s)',
'**' => '(?<![\s*])\*\*(?!\*)',
'__' => '(?<![\s_])__(?![a-zA-Z0-9_])',
);
protected $em_strong_relist = array(
protected array $em_strong_relist = array(
'' => '(?:(?<!\*)\*\*\*(?!\*)|(?<![a-zA-Z0-9_])___(?!_))(?![\.,:;]?\s)',
'***' => '(?<![\s*])\*\*\*(?!\*)',
'___' => '(?<![\s_])___(?![a-zA-Z0-9_])',

View file

@ -24,6 +24,7 @@
"psr-4": { "Michelf\\": "Michelf/" }
},
"require-dev": {
"phpunit/phpunit": ">= 9.5"
"phpunit/phpunit": ">= 9.5",
"rector/rector": "^0.11.60"
}
}