mirror of
https://github.com/danog/amp.git
synced 2024-11-26 12:04:42 +01:00
Use shared style repo
This commit is contained in:
parent
4e3251cba9
commit
19bcf9b33d
49
.php_cs.dist
49
.php_cs.dist
@ -1,40 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return PhpCsFixer\Config::create()
|
$config = new Amp\CodeStyle\Config();
|
||||||
->setRiskyAllowed(true)
|
$config->getFinder()
|
||||||
->setRules([
|
->in(__DIR__ . '/examples')
|
||||||
"@PSR1" => true,
|
->in(__DIR__ . '/lib')
|
||||||
"@PSR2" => true,
|
->in(__DIR__ . '/test');
|
||||||
"braces" => [
|
|
||||||
"allow_single_line_closure" => true,
|
$cacheDir = getenv('TRAVIS') ? getenv('HOME') . '/.php-cs-fixer' : __DIR__;
|
||||||
],
|
|
||||||
"array_syntax" => ["syntax" => "short"],
|
$config->setCacheFile($cacheDir . '/.php_cs.cache');
|
||||||
"cast_spaces" => true,
|
|
||||||
"combine_consecutive_unsets" => true,
|
return $config;
|
||||||
"function_to_constant" => true,
|
|
||||||
"native_function_invocation" => true,
|
|
||||||
"no_multiline_whitespace_before_semicolons" => true,
|
|
||||||
"no_unused_imports" => true,
|
|
||||||
"no_useless_else" => true,
|
|
||||||
"no_useless_return" => true,
|
|
||||||
"no_whitespace_before_comma_in_array" => true,
|
|
||||||
"no_whitespace_in_blank_line" => true,
|
|
||||||
"non_printable_character" => true,
|
|
||||||
"normalize_index_brace" => true,
|
|
||||||
"ordered_imports" => true,
|
|
||||||
"php_unit_construct" => true,
|
|
||||||
"php_unit_dedicate_assert" => true,
|
|
||||||
"php_unit_fqcn_annotation" => true,
|
|
||||||
"phpdoc_summary" => true,
|
|
||||||
"phpdoc_types" => true,
|
|
||||||
"psr4" => true,
|
|
||||||
"return_type_declaration" => ["space_before" => "none"],
|
|
||||||
"short_scalar_cast" => true,
|
|
||||||
"single_blank_line_before_namespace" => true,
|
|
||||||
])
|
|
||||||
->setFinder(
|
|
||||||
PhpCsFixer\Finder::create()
|
|
||||||
->in(__DIR__ . "/examples")
|
|
||||||
->in(__DIR__ . "/lib")
|
|
||||||
->in(__DIR__ . "/test")
|
|
||||||
);
|
|
||||||
|
@ -54,4 +54,6 @@ after_script:
|
|||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.composer/cache/files
|
- $HOME/.composer/cache
|
||||||
|
- $HOME/.php-cs-fixer
|
||||||
|
- $HOME/.local
|
||||||
|
@ -37,8 +37,8 @@
|
|||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"amphp/phpunit-util": "^1",
|
"amphp/phpunit-util": "^1",
|
||||||
|
"amphp/php-cs-fixer-config": "dev-master",
|
||||||
"react/promise": "^2",
|
"react/promise": "^2",
|
||||||
"friendsofphp/php-cs-fixer": "^2.3",
|
|
||||||
"phpunit/phpunit": "^6.0.9",
|
"phpunit/phpunit": "^6.0.9",
|
||||||
"phpstan/phpstan": "^0.8.5"
|
"phpstan/phpstan": "^0.8.5"
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user