Skip to content

Commit

Permalink
Update code style
Browse files Browse the repository at this point in the history
  • Loading branch information
ilario-pierbattista committed Nov 27, 2021
1 parent ee29992 commit d733e18
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 32 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ composer.lock
build/

.php_cs.dist
.php-cs-fixer.dist.php
29 changes: 29 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php declare(strict_types=1);

$additionalRules = [
'class_attributes_separation' => false,
'declare_strict_types' => true,
'indentation_type' => true,
'phpdoc_to_comment' => false,
'phpdoc_trim_consecutive_blank_line_separation' => true,
'phpdoc_align' => true,
'nullable_type_declaration_for_default_null_value' => true,
'lambda_not_used_import' => true,
'phpdoc_add_missing_param_annotation' => true,
];
$rulesProvider = new Facile\CodingStandards\Rules\CompositeRulesProvider([
new Facile\CodingStandards\Rules\DefaultRulesProvider(),
new Facile\CodingStandards\Rules\ArrayRulesProvider($additionalRules),
]);

$finder = PhpCsFixer\Finder::create();
$autoloadPathProvider = new Facile\CodingStandards\AutoloadPathProvider();
$finder->in($autoloadPathProvider->getPaths());

$config = new PhpCsFixer\Config();
$config->setRules($rulesProvider->getRules());
$config->setRiskyAllowed(true);
$config->setUsingCache(false);
$config->setFinder($finder);

return $config;
29 changes: 0 additions & 29 deletions .php_cs

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ usage:
@echo "select target"

setup:
docker-compose run php composer install
docker-compose run php composer install --no-interaction

sh:
docker-compose up -d
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
"giorgiosironi/eris": "^0.12.0",
"phpunit/php-code-coverage": "^7.0",
"phpat/phpat": "^0.7.5",
"facile-it/facile-coding-standard": "^0.4.1",
"facile-it/facile-coding-standard": "^0.5.1",
"icomefromthenet/reverse-regex": "^0.1.0",
"vimeo/psalm": "4.8.1"
"vimeo/psalm": "4.8.1",
"friendsofphp/php-cs-fixer": "^3.3"
},
"license": "MIT",
"authors": [
Expand Down

0 comments on commit d733e18

Please sign in to comment.