Skip to content

Commit

Permalink
Merge e550d0a into 9829034
Browse files Browse the repository at this point in the history
  • Loading branch information
Dropelikeit committed Apr 28, 2019
2 parents 9829034 + e550d0a commit 4bbd0df
Show file tree
Hide file tree
Showing 35 changed files with 1,915 additions and 1,091 deletions.
81 changes: 81 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?php

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

return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'braces' => false,
'array_indentation' => true,
'array_syntax' => [
'syntax' => 'short',
],
'blank_line_after_opening_tag' => true,
'blank_line_before_statement' => true,
'cast_spaces' => true,
'concat_space' => [
'spacing' => 'one',
],
'declare_equal_normalize' => true,
'include' => true,
'function_typehint_space' => true,
'linebreak_after_opening_tag' => true,
'lowercase_cast' => true,
'lowercase_static_reference' => true,
'magic_constant_casing' => true,
'modernize_types_casting' => true,
'native_function_casing' => true,
'new_with_braces' => true,
'no_alternative_syntax' => true,
'no_empty_comment' => true,
'no_empty_statement' => true,
'no_closing_tag' => true,
'no_extra_blank_lines' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_multiline_whitespace_around_double_arrow' => true,
'no_null_property_initialization' => true,
'no_short_bool_cast' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_spaces_around_offset' => true,
'no_superfluous_elseif' => true,
'no_trailing_comma_in_list_call' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_unneeded_control_parentheses' => true,
'no_unneeded_curly_braces' => true,
'no_unneeded_final_method' => true,
'no_unused_imports' => true,
'no_useless_else' => true,
'no_whitespace_before_comma_in_array' => true,
'no_whitespace_in_blank_line' => true,
'normalize_index_brace' => true,
'object_operator_without_whitespace' => true,
'ordered_imports' => true,
'phpdoc_annotation_without_dot' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag' => true,
'phpdoc_no_access' => true,
'return_type_declaration' => true,
'short_scalar_cast' => true,
'simplified_null_return' => true,
'single_blank_line_before_namespace' => true,
'single_quote' => true,
'standardize_not_equals' => true,
'ternary_operator_spaces' => true,
'ternary_to_null_coalescing' => true,
'trailing_comma_in_multiline_array' => true,
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'visibility_required' => true,
'whitespace_after_comma_in_array' => true,
'yoda_style' => false,

/** @risky */
'strict_comparison' => true,
'dir_constant' => true,
'psr4' => true,
])->setFinder($finder);
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ matrix:
fast_finish: true
include:
- php: 7.1
- php: 7.2
allow_failures:
- php: hhvm

Expand Down Expand Up @@ -47,6 +48,7 @@ install:
script:
- phpunit
- phpunit --coverage-clover build/logs/clover.xml
- composer cs-check

after_success:
- travis_retry php php-coveralls.phar -v
Expand Down
14 changes: 9 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
"ext-bcmath": "*"
},
"require-dev": {
"phpunit/phpunit": "5.6.*",
"squizlabs/php_codesniffer": "2.*",
"sebastian/phpcpd": "*",
"phpmd/phpmd": "2.6.*"
"friendsofphp/php-cs-fixer": "^2.14",
"phpunit/phpunit": "8.0.6"
},
"autoload": {
"psr-4": {
Expand All @@ -29,8 +27,14 @@
},
"config": {
"platform": {
"php": "7.1"
"php": "7.3"
},
"sort-packages": true
},
"prefer-stable": true,
"scripts": {
"cs-check": "php-cs-fixer -v --dry-run --using-cache=no fix",
"cs-fix": "php-cs-fixer --using-cache=no fix",
"test": "phpunit --configuration ~/PriceCalculator/phpunit.xml"
}
}

0 comments on commit 4bbd0df

Please sign in to comment.