This commit is contained in:
@@ -0,0 +1,15 @@
|
|||||||
|
steps:
|
||||||
|
install-deps:
|
||||||
|
image: composer:2
|
||||||
|
commands:
|
||||||
|
# Install dependencies without dev-interaction, ignoring platform reqs if using a generic image
|
||||||
|
- composer install --no-progress --no-interaction --prefer-dist
|
||||||
|
|
||||||
|
phpcs:
|
||||||
|
image: php:8.4
|
||||||
|
depends_on:
|
||||||
|
- install-deps
|
||||||
|
commands:
|
||||||
|
# Run PHPCS using the binary installed in ./vendor/bin/
|
||||||
|
- ./vendor/bin/phpcs --standard=PSR12 src/
|
||||||
|
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<ruleset name="Custom PHPCS Ruleset">
|
||||||
|
<description>PHPCodeSniffer configuration for PHP code analysis.</description>
|
||||||
|
|
||||||
|
<!-- Path to analyze -->
|
||||||
|
<file>src</file>
|
||||||
|
|
||||||
|
<!-- Display progress (-p), show sniff codes on violations (-s), and colorize output -->
|
||||||
|
<arg value="p"/>
|
||||||
|
<arg value="s"/>
|
||||||
|
<arg name="colors"/>
|
||||||
|
|
||||||
|
<!-- Set standard coding standard (PSR-12) -->
|
||||||
|
<rule ref="PSR12"/>
|
||||||
|
|
||||||
|
<!-- Exclude third-party vendor files and node_modules -->
|
||||||
|
<exclude-pattern>*/vendor/*</exclude-pattern>
|
||||||
|
<exclude-pattern>*/node_modules/*</exclude-pattern>
|
||||||
|
|
||||||
|
<!-- Cache results locally to speed up subsequent runs -->
|
||||||
|
<arg name="cache" value=".phpcs.cache"/>
|
||||||
|
</ruleset>
|
||||||
|
|
||||||
Reference in New Issue
Block a user