-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(code-quality-pack): Code quality pack editorconfig line max leng…
…th (#35) * chore: init code-quality-pack 2.3 version from 2.2 * feat(code-quality-pack): set max_line_length in .editorconfig * feat(code-quality-pack): respect PSR * feat(code-quality-pack): add return * feat(code-quality-pack): add return
- Loading branch information
1 parent
d135ab8
commit 9ee8241
Showing
6 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,7 @@ indent_size = 2 | |
|
||
[Makefile] | ||
indent_style = tab | ||
|
||
[*.md] | ||
max_line_length = 80 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.{js,json,vue,css,less,scss}] | ||
indent_size = 2 | ||
|
||
[Makefile] | ||
indent_style = tab | ||
|
||
[*.md] | ||
max_line_length = 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->in(__DIR__.'/src') | ||
->in(__DIR__.'/migrations') | ||
->in(__DIR__.'/tests') | ||
; | ||
|
||
return (new PhpCsFixer\Config()) | ||
->setRules([ | ||
'@Symfony' => true, | ||
'@DoctrineAnnotation' => true, | ||
'no_unused_imports' => true, | ||
'array_syntax' => [ | ||
'syntax' => 'short', | ||
], | ||
'ordered_imports' => [ | ||
'sort_algorithm' => 'alpha', | ||
], | ||
'multiline_whitespace_before_semicolons' => [ | ||
'strategy' => 'new_line_for_chained_calls', | ||
], | ||
'phpdoc_separation' => [ | ||
'groups' => [['ORM\\*'], ['Assert\\*']], | ||
] | ||
]) | ||
->setFinder($finder) | ||
->setCacheFile('.php-cs-fixer.cache') // forward compatibility with 3.x line | ||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"copy-from-recipe": { | ||
".editorconfig": ".editorconfig", | ||
".php-cs-fixer.dist.php": ".php-cs-fixer.dist.php", | ||
"phpstan.neon.dist": "phpstan.neon.dist", | ||
"tests/object-manager.php": "tests/object-manager.php" | ||
}, | ||
"gitignore": [ | ||
"phpstan.neon", | ||
".php-cs-fixer.cache" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Config Phpstan | ||
|
||
parameters: | ||
level: 5 | ||
paths: | ||
- src | ||
- migrations | ||
|
||
tmpDir: var/phpstan | ||
|
||
doctrine: | ||
objectManagerLoader: tests/object-manager.php | ||
|
||
symfony: | ||
containerXmlPath: var/cache/dev/App_KernelDevDebugContainer.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
use App\Kernel; | ||
|
||
require __DIR__.'/../config/bootstrap.php'; | ||
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); | ||
$kernel->boot(); | ||
|
||
return $kernel->getContainer()->get('doctrine')->getManager(); |