Skip to content

Commit

Permalink
Add linter and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pbek committed Oct 19, 2022
1 parent 3021afb commit 5427abe
Show file tree
Hide file tree
Showing 16 changed files with 3,782 additions and 450 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ docker/nextcloud/certificates/*
docker/owncloud/certificates/*
*.gz
*.db*
*.cache
vendor
25 changes: 25 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('var')
;

$config = new PhpCsFixer\Config();
$config->setRules([
'@Symfony' => true,
'@PHP70Migration' => true,
'@PHP71Migration' => true,
'@PHP73Migration' => true,
'@DoctrineAnnotation' => true,
'doctrine_annotation_array_assignment' => ['operator' => '='],
'yoda_style' => false,
'strict_comparison' => true,
'strict_param' => true,
'declare_strict_types' => true,
'method_argument_space' => ['on_multiline' => 'ignore'],
])
->setRiskyAllowed(true)
->setFinder($finder);

return $config;
22 changes: 22 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('var')
;

return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'@PHP70Migration' => true,
'@PHP71Migration' => true,
'@PHP73Migration' => true,
'array_syntax' => ['syntax' => 'short'],
'yoda_style' => false,
'strict_comparison' => true,
'strict_param' => true,
'declare_strict_types' => true,
])
->setRiskyAllowed(true)
->setFinder($finder)
;
Loading

0 comments on commit 5427abe

Please sign in to comment.