An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# Stern

[![Build Status](https://github.com/paragonie/stern/actions/workflows/ci.yml/badge.svg)](https://github.com/paragonie/stern/actions)
[![Latest Stable Version](https://poser.pugx.org/paragonie/stern/v/stable)](https://packagist.org/packages/paragonie/stern)
[![Latest Unstable Version](https://poser.pugx.org/paragonie/stern/v/unstable)](https://packagist.org/packages/paragonie/stern)
[![License](https://poser.pugx.org/paragonie/stern/license)](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