1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

Fix psalm errors

This commit is contained in:
Aidan Woods
2021-10-11 19:23:44 +01:00
parent 98aab22002
commit ca16d7573d
11 changed files with 16 additions and 19 deletions

View File

@@ -30,16 +30,11 @@ class CommonMarkTestWeak extends CommonMarkTestStrict
{
$textLevelElements = \array_keys(Element::TEXT_LEVEL_ELEMENTS);
\array_walk(
$textLevelElements,
/**
* @param string &$element
* @return void
*/
function (&$element) {
$element = \preg_quote($element, '/');
}
$textLevelElements = \array_map(
function ($e) { return \preg_quote($e, '/'); },
$textLevelElements
);
$this->textLevelElementRegex = '\b(?:' . \implode('|', $textLevelElements) . ')\b';
parent::__construct($name, $data, $dataName);

View File

@@ -75,10 +75,7 @@ class ParsedownTest extends TestCase
foreach ($this->dirs as $dir) {
$Folder = new \DirectoryIterator($dir);
foreach ($Folder as $File) {
/** @var $File DirectoryIterator */
if (! $File->isFile()) {
continue;
}

View File

@@ -32,7 +32,7 @@ final class StateTest extends TestCase
/**
* @return void
* @throws \PHPUnit\Framework\ExpectationFailedException
* @throws \PHPUnit\Framework\Exception
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
*/
public function testStateCloneVisibility()