Skip to content

Commit 4c43f3a

Browse files
committed
configured php-cs-fixer, phpstan
1 parent dc8dd65 commit 4c43f3a

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
/composer.lock
22
/vendor
3-
3+
/.php-cs-fixer.cache

.php-cs-fixer.dist.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
6+
$finder = PhpCsFixer\Finder::create()
7+
->ignoreDotFiles(false)
8+
->ignoreVCSIgnored(true)
9+
->in(__DIR__)
10+
;
11+
12+
$config = new PhpCsFixer\Config();
13+
$config
14+
->setRiskyAllowed(true)
15+
->setRules([
16+
'@PSR12' => true,
17+
'array_syntax' => ['syntax' => 'short'],
18+
'declare_strict_types' => true,
19+
])
20+
->setLineEnding("\n")
21+
->setFinder($finder)
22+
;
23+
24+
return $config;

phpstan.neon

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
parameters:
2+
paths:
3+
- src
4+
# - tests
5+
level: max
6+
checkGenericClassInNonGenericObjectType: false
7+

0 commit comments

Comments
 (0)