> For the complete documentation index, see [llms.txt](https://docs.elentra.org/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elentra.org/api/automated-testing/code-style-linting.md).

# Code Style Linting

The Elentra API repository adheres to a set of linting rules that ensures the code styles are the same across the repository. Upon a git push to a pull request, a GitHub action is run to check if the changes adhere to the lint rules.

To ensure that your code changes adhere to our code style standards, run the following composer script in your local API directory (e.g. `elentra-1x-api`) to fix the linting issues:

```bash
composer lint:fix
```

In addition, you can run the following composer script in your local ME directory (e.g. `elentra-1x-me`)

```bash
composer lint:api:fix
```

{% hint style="warning" %}
This command will run `php-cs-fixer` to modify the code locally to meet the code style standards. You still will need to commit the changes generated by `php-cs-fixer`.
{% endhint %}

{% hint style="info" %}
The API linting rules enforce the code style standards used in [the Laravel Shift project](https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200).
{% endhint %}
