<commit_before># Inject dependencies

* [Synopsis](#synopsis)
* [Example](#example)

## Synopsis

    medio dependency:injection fully_qualified_classname filename

    Shortcuts:

        * d:i

    Arguments:

        * fully_qualified_classname: the full namespace with the classname of the dependency to inject
        * filename: the path to the service's file where the dependency should be injected

## Example

Consider the following class:

```php
<?php
// File: fixture/Gnugat/Medio/Service.php

namespace fixture\Gnugat\Medio;

class Service
{
    public function __construct()
    {
    }
}
```

Medio provides an easy way to inject its first dependency:

    medio dependency:inject 'fixture\Gnugat\Medio\SubDir\Dependency' ./fixture/Gnugat/Medio/Service.php

> Note: the shortcut `d:i` an be used instead of `dependency:inject`.

It will edit the class and leave it as follows:

```php
<?php
// File: fixture/Gnugat/Medio/Service.php

namespace fixture\Gnugat\Medio;

use fixture\Gnugat\Medio\SubDir\Dependency;

class Service
{
    private $dependency;

    public function __construct(Dependency $dependency)
    {
        $this->dependency = $dependency;
    }
}
```<commit_msg>[Dependency][Inject] Updated documentation<commit_after># Inject dependencies

* [Synopsis](#synopsis)
* [Example](#example)

## Synopsis

    medio d:i fully_qualified_classname filename

    Arguments:

        * fully_qualified_classname: the full namespace with the classname of the dependency to inject
        * filename: the path to the service's file where the dependency should be injected

## Example

Consider the following class:

```php
<?php
// File: fixture/Gnugat/Medio/Service.php

namespace fixture\Gnugat\Medio;

class Service
{
    public function __construct()
    {
    }
}
```

Medio provides an easy way to inject its first dependency:

    medio d:i 'fixture\Gnugat\Medio\SubDir\Dependency' ./fixture/Gnugat/Medio/Service.php

It will edit the class and leave it as follows:

```php
<?php
// File: fixture/Gnugat/Medio/Service.php

namespace fixture\Gnugat\Medio;

use fixture\Gnugat\Medio\SubDir\Dependency;

class Service
{
    private $dependency;

    public function __construct(Dependency $dependency)
    {
        $this->dependency = $dependency;
    }
}
```
{'fraction_non_alphanumeric': 0.09886264216972879, 'fraction_numerical': 0.0, 'mean_word_length': 3.7349896480331264, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 6, 'https://': 0, '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': '3921145', 'n_tokens_mistral': 740, 'n_tokens_neox': 693, 'n_words': 202}