• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

j0k3r / php-readability / 27813522719

19 Jun 2026 08:00AM UTC coverage: 84.485% (-0.1%) from 84.605%
27813522719

push

github

jtojnar
JSLikeHTMLElement: Add types to methods

PHP-CS-Fixer 3.95.0 added `void_return` rule to `@Symfony:risky` ruleset.

https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases/tag/v3.95.0
https://cs.symfony.com/doc/rules/function_notation/void_return.html

`void` type declaration is available since PHP 7.1:
https://www.php.net/manual/en/language.types.void.php

Magic methods can have type annotations but they must be compatible with the default ones
(not enforced prior to PHP 8.0):
https://php.watch/versions/8.0/magic-method-signatures

Let’s just type all the methods.

This could technically be a BC break if someone is extending
the `JSLikeHTMLElement` class, overriding the methods that previously
did not have return type hint without adding it, and calling
`registerNodeClass` on the public `dom` property but I think it is
pretty unlikely – at least there seem to be no public instances on GitHub.

1 of 2 new or added lines in 1 file covered. (50.0%)

599 of 709 relevant lines covered (84.49%)

21.75 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

62.16
/src/JSLikeHTMLElement.php


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc