Skip to content

Commit 0478c8b

Browse files
committed
Initial setup
1 parent be5f3e9 commit 0478c8b

22 files changed

+288
-323
lines changed

.github/FUNDING.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/dependabot-auto-merge.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/fix-php-code-style-issues.yml renamed to .github/workflows/php-cs-fixer.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
name: Fix PHP code style issues
1+
name: Check & fix styling
22

3-
on:
4-
push:
5-
paths:
6-
- '**.php'
3+
on: [push]
74

85
jobs:
9-
php-code-styling:
6+
php-cs-fixer:
107
runs-on: ubuntu-latest
118

129
steps:
@@ -15,8 +12,10 @@ jobs:
1512
with:
1613
ref: ${{ github.head_ref }}
1714

18-
- name: Fix PHP code style issues
19-
uses: aglipanci/[email protected]
15+
- name: Run PHP CS Fixer
16+
uses: docker://oskarstark/php-cs-fixer-ga
17+
with:
18+
args: --config=.php-cs-fixer.dist.php --allow-risky=yes
2019

2120
- name: Commit changes
2221
uses: stefanzweifel/git-auto-commit-action@v4

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ jobs:
3434
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction
3535

3636
- name: Execute tests
37-
run: vendor/bin/pest
37+
run: vendor/bin/phpunit

.github/workflows/update-changelog.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ phpunit.xml
1010
psalm.xml
1111
vendor
1212
.php-cs-fixer.cache
13-

.php-cs-fixer.dist.php

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
3+
$finder = Symfony\Component\Finder\Finder::create()
4+
->in([
5+
__DIR__ . '/src',
6+
__DIR__ . '/tests',
7+
])
8+
->name('*.php')
9+
->ignoreDotFiles(true)
10+
->ignoreVCS(true);
11+
12+
return (new PhpCsFixer\Config())
13+
->setRules([
14+
'@PSR12' => true,
15+
'array_syntax' => ['syntax' => 'short'],
16+
'ordered_imports' => ['sort_algorithm' => 'alpha'],
17+
'no_unused_imports' => true,
18+
'not_operator_with_successor_space' => true,
19+
'trailing_comma_in_multiline' => true,
20+
'phpdoc_scalar' => true,
21+
'unary_operator_spaces' => true,
22+
'binary_operator_spaces' => true,
23+
'blank_line_before_statement' => [
24+
'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'],
25+
],
26+
'phpdoc_single_line_var_spacing' => true,
27+
'phpdoc_var_without_name' => true,
28+
'class_attributes_separation' => [
29+
'elements' => [
30+
'method' => 'one',
31+
],
32+
],
33+
'method_argument_space' => [
34+
'on_multiline' => 'ensure_fully_multiline',
35+
'keep_multiple_spaces_after_comma' => true,
36+
],
37+
'single_trait_insert_per_statement' => true,
38+
'final_class' => true,
39+
'declare_strict_types' => true,
40+
])
41+
->setFinder($finder);

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Changelog
22

3-
All notable changes to `:package_name` will be documented in this file.
3+
All notable changes to `php-sparkline` will be documented in this file.
44

0 commit comments

Comments
 (0)