<commit_before><!-- header start -->
[![Latest Stable Version](https://poser.pugx.org/cupoftea/chain/version.svg)](https://packagist.org/packages/cupoftea/chain) [![Total Downloads](https://poser.pugx.org/cupoftea/chain/d/total.svg)](https://packagist.org/packages/cupoftea/chain)
[![Latest Unstable Version](https://poser.pugx.org/cupoftea/chain/v/unstable.svg)](https://packagist.org/packages/cupoftea/chain)
[![StyleCI](https://styleci.io/repos/38836274/shield)](https://styleci.io/repos/38836274) [![License](https://poser.pugx.org/cupoftea/chain/license.svg)](https://packagist.org/packages/cupoftea/chain)

# Chain
## Call a chain of methods on an object.
<!-- header end -->

Chain provides an easy way to chain a set of methods on an object.

Chain provides a set of methods to suit your chaining needs. From requiring you class to be an instance of an earlier specified class to getting back the results from each called method, Chain's got it all. For more info, check the Documentation or browse through the full API.

 - [Documentation](http://chain.cupoftea.io/docs/)
 - [API Reference](http://chain.cupoftea.io/docs/api/)

## Quickstart

```bash
$ composer require cupoftea/chain ^1.2
```

```php
$chain = new Chain();
$chain->requires(MyInterface::class)
    ->on(MyClass::class))<commit_msg>Use flat shield for StyleCI<commit_after><!-- header start -->
[![Latest Stable Version](https://poser.pugx.org/cupoftea/chain/version.svg)](https://packagist.org/packages/cupoftea/chain) [![Total Downloads](https://poser.pugx.org/cupoftea/chain/d/total.svg)](https://packagist.org/packages/cupoftea/chain)
[![Latest Unstable Version](https://poser.pugx.org/cupoftea/chain/v/unstable.svg)](https://packagist.org/packages/cupoftea/chain)
[![StyleCI](https://styleci.io/repos/38836274/shield?style=flat)](https://styleci.io/repos/38836274) [![License](https://poser.pugx.org/cupoftea/chain/license.svg)](https://packagist.org/packages/cupoftea/chain)

# Chain
## Call a chain of methods on an object.
<!-- header end -->

Chain provides an easy way to chain a set of methods on an object.

Chain provides a set of methods to suit your chaining needs. From requiring you class to be an instance of an earlier specified class to getting back the results from each called method, Chain's got it all. For more info, check the Documentation or browse through the full API.

 - [Documentation](http://chain.cupoftea.io/docs/)
 - [API Reference](http://chain.cupoftea.io/docs/api/)

## Quickstart

```bash
$ composer require cupoftea/chain ^1.2
```

```php
$chain = new Chain();
$chain->requires(MyInterface::class)
    ->on(MyClass::class))
{'fraction_non_alphanumeric': 0.16066691928760896, 'fraction_numerical': 0.013641530882910194, 'mean_word_length': 4.776805251641138, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 20, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3151606', 'n_tokens_mistral': 910, 'n_tokens_neox': 855, 'n_words': 207}