<commit_before># rabbit-hole

This is a RabbitMQ library heavily inspired by Hutch and may be considered a misuse and abuse of PHP.

## Usage

``` php
use Kastilyo\RabbitHole\Subscriber;
use Kastilyo\RabbitHole\Subscring;

class SomeSubscriber implements Subscribing
{
    use Subscriber;

    protected static $amqp_exchange_name = 'some_exchange';
    protected static $amqp_queue_name = 'some_queue';
    protected static $amqp_binding_keys = ['some.binding.key', 'another.binding.key'];

    public function __construct(AMQPConnection $amqp_connection)
    {
        $this->amqp_connection = $amqp_connection;
    }

    public function processMessage(AMQPEnvelope $envelope)
    {
        echo $envelope->getBody(), PHP_EOL;
        static::$amqp_queue->ack($envelope->getDeliveryTag());
    }
}
```

```php
$subscriber = new Kastilyo\RabbitHole\SomeSubscriber($amqp_connection);
$subscriber->consume();
```

## Testing

``` bash
$ ./vendor/bin/kahlan
```

## Credits

- [kastilyo][https://github.com/kastilyo]
- [burntbrowniez][https://github.com/burntbrowniez]

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.<commit_msg>Fixing fake example implementation<commit_after># rabbit-hole

This is a RabbitMQ library heavily inspired by Hutch and may be considered a misuse and abuse of PHP.

## Usage

``` php
use Kastilyo\RabbitHole\Subscriber;
use Kastilyo\RabbitHole\Subscring;

class SomeSubscriber implements Subscribing
{
    use Subscriber;

    protected static $amqp_exchange_name = 'some_exchange';
    protected static $amqp_queue_name = 'some_queue';
    protected static $amqp_binding_keys = ['some.binding.key', 'another.binding.key'];

    public function __construct(AMQPConnection $amqp_connection)
    {
        $this->amqp_connection = $amqp_connection;
    }

    public function processMessage(AMQPEnvelope $envelope)
    {
        echo $envelope->getBody(), PHP_EOL;
        $this->acknowledge($envelope->getDeliveryTag());
    }
}
```

```php
$subscriber = new Kastilyo\RabbitHole\SomeSubscriber($amqp_connection);
$subscriber->consume();
```

## Testing

``` bash
$ ./vendor/bin/kahlan
```

## Credits

- [kastilyo][https://github.com/kastilyo]
- [burntbrowniez][https://github.com/burntbrowniez]

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
{'fraction_non_alphanumeric': 0.12515856236786468, 'fraction_numerical': 0.0, 'mean_word_length': 4.401826484018265, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 4, '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': '551024', 'n_tokens_mistral': 820, 'n_tokens_neox': 763, 'n_words': 168}