https://github.com/paragonie/stern
Stern lets you built type-safe PHP projects, even if your project's users aren't writing type-safe code
https://github.com/paragonie/stern
Last synced: 8 months ago
JSON representation
Stern lets you built type-safe PHP projects, even if your project's users aren't writing type-safe code
- Host: GitHub
- URL: https://github.com/paragonie/stern
- Owner: paragonie
- License: mit
- Created: 2017-05-02T22:52:17.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-05-12T04:07:39.000Z (over 3 years ago)
- Last Synced: 2025-03-30T23:31:33.706Z (10 months ago)
- Language: PHP
- Size: 10.7 KB
- Stars: 21
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Stern
[](https://github.com/paragonie/stern/actions)
[](https://packagist.org/packages/paragonie/stern)
[](https://packagist.org/packages/paragonie/stern)
[](https://packagist.org/packages/paragonie/stern)
Stern lets you built type-safe PHP projects, even if your project's users aren't writing type-safe code.
**Requires PHP 7+**
## Usage
Using Stern is simply:
1. Make your class use the `SternTrait`.
2. Rename your methods from `whateverName` to `strictWhateverName`.
3. Enjoy strict-typing whether your users like it or not.
## Example
```diff