Skip to content

Commit

Permalink
Merge pull request #100 from LinioPay/chore/php-fixer-update
Browse files Browse the repository at this point in the history
chore: update php cs fixer
  • Loading branch information
ibrito182 authored Sep 6, 2023
2 parents 20ba467 + 8498d60 commit cb96b08
Show file tree
Hide file tree
Showing 22 changed files with 465 additions and 759 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ vendor/
state/*-*
build/*
phpunit.xml
.php_cs.cache
.php_cs.result.cache
/.phpunit.result.cache
/.php-cs-fixer.cache
31 changes: 31 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

$finder = PhpCsFixer\Finder::create()
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests');

return (new PhpCsFixer\Config())
->setRules([
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_unsets' => true,
'concat_space' => ['spacing' => 'one'],
'return_type_declaration' => ['space_before' => 'one'],
'no_unreachable_default_argument_value' => false,
'yoda_style' => false,
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'increment_style' => ['style' => 'post'],
'phpdoc_align' => ['align' => 'left'],
'phpdoc_no_alias_tag' => false,
'ordered_class_elements' => [
'order' => [
'use_trait', 'constant_public', 'constant_protected', 'constant_private', 'property_public',
'property_private', 'property_protected', 'construct', 'destruct', 'magic', 'phpunit',
'method_public_abstract', 'method_protected_abstract', 'method_public_abstract_static',
'method_protected_abstract_static', 'method_public', 'method_protected', 'method_private',
'method_public_static', 'method_protected_static',
],
],
'global_namespace_import' => ['import_classes' => true, 'import_constants' => true, 'import_functions' => true],
])
->setFinder($finder);
19 changes: 0 additions & 19 deletions .php_cs.dist

This file was deleted.

4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"lstrojny/hmmmath": ">=0.5.0",
"guzzlehttp/guzzle": "^6.5",
"slim/slim": "^3.12",
"friendsofphp/php-cs-fixer": "^2.16",
"friendsofphp/php-cs-fixer": "^3.16",
"sensiolabs/security-checker": "^6.0"
},
"require-dev": {
Expand Down Expand Up @@ -52,7 +52,7 @@
"@auto-scripts"
],
"lint": [
"php-cs-fixer fix --ansi --verbose --show-progress=estimating"
"php-cs-fixer fix --ansi --verbose --show-progress=dots"
],
"lint:check": [
"@lint --dry-run"
Expand Down
Loading

0 comments on commit cb96b08

Please sign in to comment.