Elentra API
  • Introduction
  • Developers
    • Getting Started
    • Quickstart Guide
      • Set up Repositories
      • Validate the setup
      • Exploring the API
      • Creating a new Module
      • Setup Routing
      • Introduction to Postman
      • Create a Controller
      • Using Eloquent Models
      • Input Validation
      • API Resource Authorization
  • Elentra API Standards
    • HTTP Methods & Status Codes
    • Routing & Parameters
      • Example Routing Patterns with HTTP Method
        • /courses/{course}/contacts
        • /courses/{course}/contacts?type={contact_type}
        • /courses/{course}/contacts/{contact}
        • /courses/{course}/syllabus
      • Common Mistakes
        • [GET] /admissions/file-review/file/rubric-score/{cycle_id}/{pool_id}/{subpool_id}
        • [DELETE] /notices/1,2,3
        • [GET] /cbe/curriculum/framework/{framework_id}/hierarchy-by-depth
        • [GET] /admissions/file-review/file/rubric-score/delete/{id}
        • [GET] /portfolio/entries/{entry_id}/get-file
        • [POST] /cbe/curriculum/updateframework
  • Automated Testing
    • Getting Started
      • Setting up a testing environment
      • Running Automated Tests
    • Seed Data
      • Folder Structure
      • Creating Seed Data
    • Functional Tests
      • Creating a Functional Test File
      • Testing HTTP Verbs
        • Creating an HTTP Test
        • GET Requests
        • POST / PUT / DELETE Requests
        • GraphQL Requests
      • Asserting API Response
      • Annotations
    • Code Style Linting
Powered by GitBook
On this page
  1. Automated Testing

Code Style Linting

Elentra API uses php-cs-fixer to verify that code styles are enforced.

PreviousAnnotations

Last updated 2 years ago

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:

composer lint:fix

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

composer lint:api:fix

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.

The API linting rules enforce the code style standards used in .

the Laravel Shift project