# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.elentra.org/api/automated-testing/code-style-linting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
