6.13.5. Run linting outside GitLab Runner

6.13.5.1. Running them on your local computer

ensure you have run composer install locally:

composer install

Run the following command:

./vendor/bin/phpcs --standard=PSR12 \
    includes/ \
    public/*.php \
    tests/api/ \
    tests/runner_generate_db.php

6.13.5.2. Running them inside docker

Clone, configure and run the ApiOpenStudio docker dev repository.

SSH into the php container:

docker exec -it apiopenstudio-php /bin/bash

Navigate to the API docroot and run phpcs linting:

cd api
./vendor/bin/phpcs --standard=PSR12 \
    includes/ \
    public/*.php \
    tests/api/ \
    tests/runner_generate_db.php