Merge pull request 'add_ClassAttributeSeparationFixer' (#3) from add_ClassAttributeSeparationFixer into main
All checks were successful
/ ls (push) Successful in 13s

Reviewed-on: #3
This commit is contained in:
lubiana 2024-05-04 18:26:43 +00:00
commit 2793c36fa9
3 changed files with 17 additions and 5 deletions

View file

@ -10,15 +10,16 @@ jobs:
REPO: '${{ github.repository }}' REPO: '${{ github.repository }}'
TOKEN: '${{ secrets.GITHUB_TOKEN }}' TOKEN: '${{ secrets.GITHUB_TOKEN }}'
GIT_SERVER: 'git.php.fail' GIT_SERVER: 'git.php.fail'
COMPOSER_CACHE_DIR: /opt/hostedtoolcache/.composer/cache/files
run: | run: |
git clone --branch $GITHUB_REF_NAME https://${TOKEN}@${GIT_SERVER}/${REPO}.git . git clone --branch $GITHUB_REF_NAME https://${TOKEN}@${GIT_SERVER}/${REPO}.git .
git fetch git fetch
git checkout ${{ github.head_ref }} git checkout ${{ github.head_ref }}
- name: create composer cache dir - name: composer install
env:
COMPOSER_CACHE_DIR: /opt/hostedtoolcache/.composer/cache/files
run: | run: |
mkdir -p /opt/hostedtoolcache/.composer/cache/files mkdir -p ${{ env.COMPOSER_CACHE_DIR }}
- run: composer install composer install
- run: composer lint - run: composer lint
- name: GIT commit and push all changed files - name: GIT commit and push all changed files
env: env:

View file

@ -1,5 +1,6 @@
<?php declare(strict_types=1); <?php declare(strict_types=1);
use PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer;
use PhpCsFixer\Fixer\Import\OrderedImportsFixer; use PhpCsFixer\Fixer\Import\OrderedImportsFixer;
use PhpCsFixer\Fixer\LanguageConstruct\FunctionToConstantFixer; use PhpCsFixer\Fixer\LanguageConstruct\FunctionToConstantFixer;
use PhpCsFixer\Fixer\Operator\NewWithBracesFixer; use PhpCsFixer\Fixer\Operator\NewWithBracesFixer;
@ -77,6 +78,17 @@ return ECSConfig::configure()
] ]
) )
->withConfiguredRule( ->withConfiguredRule(
ClassAttributesSeparationFixer::class,
[
'elements' => [
'const' => 'none',
'method' => 'one',
'property' => 'none',
'trait_import' => 'none',
'case' => 'none',
],
],
)->withConfiguredRule(
DeclareStrictTypesSniff::class, DeclareStrictTypesSniff::class,
[ [
'declareOnFirstLine' => true, 'declareOnFirstLine' => true,

View file

@ -5,6 +5,5 @@ namespace Lubiana\CodeQuality;
final class LubiSetList final class LubiSetList
{ {
public const string RECTOR = __DIR__ . '/../config/rector.php'; public const string RECTOR = __DIR__ . '/../config/rector.php';
public const string ECS = __DIR__ . '/../config/ecs.php'; public const string ECS = __DIR__ . '/../config/ecs.php';
} }