Skip to content

Commit 65a0011

Browse files
committed
try to fix enums
1 parent 4975e70 commit 65a0011

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

.github/workflows/test.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
3+
name: "Check Coding Standard"
4+
5+
on:
6+
pull_request:
7+
push:
8+
branches:
9+
- "[0-9]+.[0-9]+.x"
10+
11+
jobs:
12+
static-analysis-coding-standard:
13+
name: "Static Analysis by patchlevel/coding-standard"
14+
15+
runs-on: ${{ matrix.operating-system }}
16+
17+
strategy:
18+
matrix:
19+
dependencies:
20+
- "highest"
21+
php-version:
22+
- "8.1"
23+
operating-system:
24+
- "ubuntu-latest"
25+
26+
steps:
27+
- name: "Checkout"
28+
uses: "actions/checkout@v2"
29+
30+
- name: "Install PHP"
31+
uses: "shivammathur/setup-php@v2"
32+
with:
33+
coverage: "pcov"
34+
php-version: "${{ matrix.php-version }}"
35+
ini-values: memory_limit=-1
36+
extensions: pdo_sqlite
37+
38+
- uses: "ramsey/composer-install@v2"
39+
with:
40+
dependency-versions: ${{ matrix.dependencies }}
41+
42+
- name: "Coding Standard"
43+
run: "vendor/bin/phpcs tests/fixed"

tests/fixed/enum.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
enum Suit: string
4+
{
5+
case Hearts = 'H';
6+
case Diamonds = 'D';
7+
case Clubs = 'C';
8+
case Spades = 'S';
9+
}

0 commit comments

Comments
 (0)