Skip to content

Commit

Permalink
Add code style
Browse files Browse the repository at this point in the history
  • Loading branch information
olvlvl committed Aug 9, 2024
1 parent bc4c8a9 commit ad63991
Show file tree
Hide file tree
Showing 140 changed files with 10,412 additions and 10,427 deletions.
4 changes: 1 addition & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_style = space
indent_size = 4

[{*.json, *.yml, *.yaml, *.neon}]
indent_style = space
indent_size = 2

[*.md]
indent_style = space
max_line_length = 100
21 changes: 21 additions & 0 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: code-style

on:
- push
- pull_request

jobs:
phpcs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: "8.1"
ini-values: memory_limit=-1
tools: phpcs, cs2pr
- name: Run PHP Code Sniffer
run: phpcs -q --report=checkstyle | cs2pr
4 changes: 2 additions & 2 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
ini-values: memory_limit=-1
tools: composer:v2
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/.composer/cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- "8.2"
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
Expand All @@ -38,7 +38,7 @@ jobs:
tools: composer:v2
extensions: redis
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/.composer/cache
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ test-container-82:

.PHONY: lint
lint:
@XDEBUG_MODE=off phpcs -s
@XDEBUG_MODE=off vendor/bin/phpstan --memory-limit=-1

#
Expand Down
Loading

0 comments on commit ad63991

Please sign in to comment.