Closed jtojnar closed 2 years ago
Merging #4 (21fdb9f) into master (31661f6) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #4 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 114 114
===========================================
Files 4 4
Lines 296 296
===========================================
Hits 296 296
Impacted Files | Coverage Δ | |
---|---|---|
src/AbstractJsonEncoder.php | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 31661f6...21fdb9f. Read the comment docs.
Thanks, I merged this via #6, since I needed to rebase it.
With, PHP 8.1 lack of a return type hint for a method of a child class, whose parent has return type hint is considered mismatch.
https://php.watch/versions/8.1/internal-method-return-types#no-return-type
Since standard classes and interfaces started adding typehings, errors like the following are produced:
void
type is only available since PHP 7.1 andmixed
type requires PHP 8.0:https://www.php.net/manual/en/language.types.declarations.php#language.types.declarations.void https://www.php.net/manual/en/language.types.declarations.php#language.types.declarations.mixed
To preserve compatibility with PHP < 8.0, we need to add the attribute.