From 86d5895289567f1a2f025d7da17f4abd24104b5b Mon Sep 17 00:00:00 2001 From: Richardas Kuchinskas Date: Fri, 9 Aug 2024 02:05:03 +0300 Subject: [PATCH] tests fix --- src/tests/golden/testdata/flysystem/golden.txt | 18 ++++++++++++++++++ src/tests/golden/testdata/mustache/golden.txt | 15 +++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/src/tests/golden/testdata/flysystem/golden.txt b/src/tests/golden/testdata/flysystem/golden.txt index 9378e752..90600f08 100644 --- a/src/tests/golden/testdata/flysystem/golden.txt +++ b/src/tests/golden/testdata/flysystem/golden.txt @@ -61,6 +61,12 @@ MAYBE missingPhpdoc: Missing PHPDoc for \League\Flysystem\Adapter\Polyfill\Str MAYBE missingPhpdoc: Missing PHPDoc for \League\Flysystem\Adapter\Polyfill\StreamedWritingTrait::update public method at testdata/flysystem/src/Adapter/Polyfill/StreamedWritingTrait.php:59 abstract public function update($pash, $contents, Config $config); ^^^^^^ +WARNING nullableType: parameter with null default value should be explicitly nullable at testdata/flysystem/src/FileExistsException.php:21 + public function __construct($path, $code = 0, BaseException $previous = null) + ^^^^^^^^^^^^^ +WARNING nullableType: parameter with null default value should be explicitly nullable at testdata/flysystem/src/FileNotFoundException.php:21 + public function __construct($path, $code = 0, BaseException $previous = null) + ^^^^^^^^^^^^^ MAYBE typeHint: Specify the type for the parameter $config in PHPDoc, 'array' type hint too generic at testdata/flysystem/src/Filesystem.php:63 public function write($path, $contents, array $config = []) ^^^^^ @@ -82,12 +88,24 @@ MAYBE typeHint: Specify the type for the parameter $config in PHPDoc, 'array' MAYBE typeHint: Specify the type for the parameter $config in PHPDoc, 'array' type hint too generic at testdata/flysystem/src/Filesystem.php:257 public function createDir($dirname, array $config = []) ^^^^^^^^^ +WARNING nullableType: parameter with null default value should be explicitly nullable at testdata/flysystem/src/Filesystem.php:362 + public function get($path, Handler $handler = null) + ^^^^^^^ +WARNING nullableType: parameter with null default value should be explicitly nullable at testdata/flysystem/src/FilesystemInterface.php:274 + public function get($path, Handler $handler = null); + ^^^^^^^ +WARNING nullableType: parameter with null default value should be explicitly nullable at testdata/flysystem/src/Handler.php:28 + public function __construct(FilesystemInterface $filesystem = null, $path = null) + ^^^^^^^^^^^^^^^^^^^ WARNING unused: Variable $e is unused (use $_ to ignore this inspection or specify --unused-var-regex flag) at testdata/flysystem/src/Handler.php:129 } catch (BadMethodCallException $e) { ^^ WARNING unused: Variable $e is unused (use $_ to ignore this inspection or specify --unused-var-regex flag) at testdata/flysystem/src/MountManager.php:275 } catch (PluginNotFoundException $e) { ^^ +WARNING nullableType: parameter with null default value should be explicitly nullable at testdata/flysystem/src/MountManager.php:642 + public function get($path, Handler $handler = null) + ^^^^^^^ MAYBE deprecatedUntagged: Call to deprecated method {\League\Flysystem\FilesystemInterface}->get() at testdata/flysystem/src/MountManager.php:646 return $this->getFilesystem($prefix)->get($path); ^^^ diff --git a/src/tests/golden/testdata/mustache/golden.txt b/src/tests/golden/testdata/mustache/golden.txt index dfdf00ad..cee434e4 100644 --- a/src/tests/golden/testdata/mustache/golden.txt +++ b/src/tests/golden/testdata/mustache/golden.txt @@ -151,12 +151,27 @@ ERROR undefinedMethod: Call to undefined method {\Mustache_Cache}->setLogger() MAYBE ternarySimplify: Could rewrite as `$this->delimiters ?: '{{ }}'` at testdata/mustache/src/Mustache/Engine.php:628 'delimiters' => $this->delimiters ? $this->delimiters : '{{ }}', ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +WARNING nullableType: parameter with null default value should be explicitly nullable at testdata/mustache/src/Mustache/Engine.php:727 + private function loadSource($source, Mustache_Cache $cache = null) + ^^^^^^^^^^^^^^ +WARNING nullableType: parameter with null default value should be explicitly nullable at testdata/mustache/src/Mustache/Exception/SyntaxException.php:24 + public function __construct($msg, array $token, Exception $previous = null) + ^^^^^^^^^ +WARNING nullableType: parameter with null default value should be explicitly nullable at testdata/mustache/src/Mustache/Exception/UnknownFilterException.php:23 + public function __construct($filterName, Exception $previous = null) + ^^^^^^^^^ MAYBE missingPhpdoc: Missing PHPDoc for \Mustache_Exception_UnknownFilterException::getFilterName public method at testdata/mustache/src/Mustache/Exception/UnknownFilterException.php:34 public function getFilterName() ^^^^^^^^^^^^^ +WARNING nullableType: parameter with null default value should be explicitly nullable at testdata/mustache/src/Mustache/Exception/UnknownHelperException.php:23 + public function __construct($helperName, Exception $previous = null) + ^^^^^^^^^ MAYBE missingPhpdoc: Missing PHPDoc for \Mustache_Exception_UnknownHelperException::getHelperName public method at testdata/mustache/src/Mustache/Exception/UnknownHelperException.php:34 public function getHelperName() ^^^^^^^^^^^^^ +WARNING nullableType: parameter with null default value should be explicitly nullable at testdata/mustache/src/Mustache/Exception/UnknownTemplateException.php:23 + public function __construct($templateName, Exception $previous = null) + ^^^^^^^^^ MAYBE missingPhpdoc: Missing PHPDoc for \Mustache_Exception_UnknownTemplateException::getTemplateName public method at testdata/mustache/src/Mustache/Exception/UnknownTemplateException.php:34 public function getTemplateName() ^^^^^^^^^^^^^^^