diff --git a/composer.json b/composer.json index 515ba74..f0ea461 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ }, "require": { "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "@stable", + "phpunit/phpunit": "9.*", "phpmd/phpmd": "@stable", "friendsofphp/php-cs-fixer": "@stable", "phpmetrics/phpmetrics": "@stable", diff --git a/src/MarkdownExtended/API/Kernel.php b/src/MarkdownExtended/API/Kernel.php index faec6de..a02249a 100644 --- a/src/MarkdownExtended/API/Kernel.php +++ b/src/MarkdownExtended/API/Kernel.php @@ -344,7 +344,7 @@ public static function applyConfig($name, array $params, $default = null) */ protected static function _configRecursiveIterator( $type = 'get', - $index, + $index = 0, $value = null, $default = null ) { diff --git a/src/MarkdownExtended/Console/Stream.php b/src/MarkdownExtended/Console/Stream.php index 678306b..b679af4 100644 --- a/src/MarkdownExtended/Console/Stream.php +++ b/src/MarkdownExtended/Console/Stream.php @@ -403,7 +403,10 @@ public function getPipedInput() $data .= fgets($this->stdin); } } - @file_put_contents($this->stdin, ''); + /* if (is_file($this->stdin)) { + file_put_contents($this->stdin, ''); + } + */ } catch (\Exception $e) { $data = null; } diff --git a/src/MarkdownExtended/Util/ContentCollection.php b/src/MarkdownExtended/Util/ContentCollection.php index 33fd0a0..4b9589f 100644 --- a/src/MarkdownExtended/Util/ContentCollection.php +++ b/src/MarkdownExtended/Util/ContentCollection.php @@ -38,7 +38,7 @@ public function __construct(array $data = []) * * @throws \MarkdownExtended\Exception\UnexpectedValueException it the argument does not implement `\MarkdownExtended\API\ContentInterface` */ - public function append($content) + public function append(mixed $content): void { if (!is_object($content) || !Kernel::valid($content, Kernel::TYPE_CONTENT)) { throw new UnexpectedValueException( @@ -61,7 +61,7 @@ public function append($content) * * @throws \MarkdownExtended\Exception\UnexpectedValueException it the argument does not implement `\MarkdownExtended\API\ContentInterface` */ - public function offsetSet($index, $content) + public function offsetSet(mixed $index, mixed $content): void { if (!is_object($content) || !Kernel::valid($content, Kernel::TYPE_CONTENT)) { throw new UnexpectedValueException(