<commit_before># Traitor

[![Build Status]](https://travis-ci.org/IcecaveStudios/traitor)
[![Test Coverage]](https://coveralls.io/r/IcecaveStudios/traitor?branch=develop)
[![SemVer]](http://semver.org)

**Traitor** is a PHP library for dynamically generating classes that implement certain interfaces by use of traits. The
primary purpose is for creating test mocks.

* Install via [Composer](http://getcomposer.org) package [icecave/traitor](https://packagist.org/packages/icecave/traitor)
* Read the [API documentation](http://icecavestudios.github.io/traitor/artifacts/documentation/api/)

## Example

The example below creates an instance of an object that implements the `SomeInterface` interface by using the `SomeTrait`
trait. It is passed the values `1`, `2`, and `3` as constructor parameters.

```php
use Icecave\Traitor\Traitor;

$instance = Traitor::create()
    ->implements_(SomeInterface::CLASS)
    ->use_(SomeTrait::CLASS)
    ->instance(1, 2, 3);
```

<!-- references -->
[Build Status]: http://img.shields.io/travis/IcecaveStudios/traitor/develop.svg
[Test Coverage]: http://img.shields.io/coveralls/IcecaveStudios/traitor/develop.svg
[SemVer]: http://img.shields.io/:semver-1.0.0-green.svg<commit_msg>Use flat badges and correct green color [ci skip]<commit_after># Traitor

[![Build Status]](https://travis-ci.org/IcecaveStudios/traitor)
[![Test Coverage]](https://coveralls.io/r/IcecaveStudios/traitor?branch=develop)
[![SemVer]](http://semver.org)

**Traitor** is a PHP library for dynamically generating classes that implement certain interfaces by use of traits. The
primary purpose is for creating test mocks.

* Install via [Composer](http://getcomposer.org) package [icecave/traitor](https://packagist.org/packages/icecave/traitor)
* Read the [API documentation](http://icecavestudios.github.io/traitor/artifacts/documentation/api/)

## Example

The example below creates an instance of an object that implements the `SomeInterface` interface by using the `SomeTrait`
trait. It is passed the values `1`, `2`, and `3` as constructor parameters.

```php
use Icecave\Traitor\Traitor;

$instance = Traitor::create()
    ->implements_(SomeInterface::CLASS)
    ->use_(SomeTrait::CLASS)
    ->instance(1, 2, 3);
```

<!-- references -->
[Build Status]: http://img.shields.io/travis/IcecaveStudios/traitor/develop.svg?style=flat-square
[Test Coverage]: http://img.shields.io/coveralls/IcecaveStudios/traitor/develop.svg?style=flat-square
[SemVer]: http://img.shields.io/:semver-1.0.0-brightgreen.svg?style=flat-square
{'fraction_non_alphanumeric': 0.15011820330969267, 'fraction_numerical': 0.0070921985815602835, 'mean_word_length': 5.3793969849246235, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1231574', 'n_tokens_mistral': 845, 'n_tokens_neox': 821, 'n_words': 191}