This repository was archived by the owner on May 23, 2024. It is now read-only.
Improve tests, asserions, CI setting and etc#312
Open
peter279k wants to merge 1 commit intoerunion:masterfrom
Open
Improve tests, asserions, CI setting and etc#312peter279k wants to merge 1 commit intoerunion:masterfrom
peter279k wants to merge 1 commit intoerunion:masterfrom
Conversation
Fix Psalm analysis error
peter279k
commented
Nov 21, 2020
| * @param bool|string $data | ||
| * @param string $type | ||
| * @return bool|string | ||
| * @return bool|int|float|string |
Author
There was a problem hiding this comment.
To fix following Psalm error, using the @return bool|int|float|string annotation:
ERROR: InvalidReturnType - src/Compiler/Specification.php:30:16 - The declared return type 'bool|float|string' for Mill\Compiler\Specification::convertSampleDataToCompatibleDataType is incorrect, got 'scalar' (see https://psalm.dev/011)
* @return bool|float|string
peter279k
commented
Nov 21, 2020
| * @param null|Version $version | ||
| */ | ||
| public function __construct( | ||
| final public function __construct( |
Author
There was a problem hiding this comment.
To fix following Psalm error:
ERROR: UnsafeInstantiation - tests/Parser/Annotations/AnnotationTest.php:32:18 - Cannot safely instantiate class Mill\Parser\Annotation with "new $class_name" as its constructor might change in child classes (see https://psalm.dev/229)
(new $annotation($this->getApplication(), $content, __CLASS__, __METHOD__))->process();
Author
There was a problem hiding this comment.
BTW, it can also use the @psalm-consistent-constructor annotation for the abstract Annotation class.
And it's up to the repository owner.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changed log
pull_requesttrigger to let upcoming PR can do GitHub Action work automatically.AnnotationTestclass namespace.assertCountto assert expected count is same as result.php-7.2version to update cached dependencies: