PHPackages                             tzmfreedom/phpstan-extensions - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. tzmfreedom/phpstan-extensions

ActivePhpstan-extension[Testing &amp; Quality](/categories/testing)

tzmfreedom/phpstan-extensions
=============================

PHPStan extensions

v0.1.7(2y ago)114MITPHP

Since Mar 28Pushed 2y ago1 watchersCompare

[ Source](https://github.com/tzmfreedom/phpstan-extensions)[ Packagist](https://packagist.org/packages/tzmfreedom/phpstan-extensions)[ Docs](https://github.com/tzmfreedom/phpstan-extensions)[ RSS](/packages/tzmfreedom-phpstan-extensions/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (9)Used By (0)

PHPStan Extensions
==================

[](#phpstan-extensions)

VisibleForTestingRule
---------------------

[](#visiblefortestingrule)

PHPStan custom rules to ensure that [VisibleForTesting](https://github.com/tzmfreedom/phpstan-visible-for-testing/blob/main/src/Attributes/VisibleForTesting.php) annotated public methods are called in private/protected scopes outside of the test environment, inspired by @VisibleForTesting annotation on [Flutter](https://api.flutter.dev/flutter/meta/visibleForTesting-constant.html), Java ([Guava](https://github.com/google/guava))

In following code, this extension report error outside of the test environment.

```
