From d8a93a273c14dc2fec851d5e342e6be85127d3cb Mon Sep 17 00:00:00 2001 From: Niklas Keller Date: Fri, 29 Dec 2017 19:20:59 +0100 Subject: [PATCH] Update meta files --- .php_cs | 15 ------------- .php_cs.dist | 40 +++++++++++++++++++++++++++++++++ .travis.yml | 6 ++--- LICENSE | 2 +- phpunit.xml => phpunit.xml.dist | 0 5 files changed, 44 insertions(+), 19 deletions(-) delete mode 100644 .php_cs create mode 100644 .php_cs.dist rename phpunit.xml => phpunit.xml.dist (100%) diff --git a/.php_cs b/.php_cs deleted file mode 100644 index f084e77..0000000 --- a/.php_cs +++ /dev/null @@ -1,15 +0,0 @@ -level(Symfony\CS\FixerInterface::NONE_LEVEL) - ->fixers([ - "psr2", - "-braces", - "-psr0", - ]) - ->finder( - Symfony\CS\Finder\DefaultFinder::create() - ->in(__DIR__ . "/bin") - ->in(__DIR__ . "/src") - ->in(__DIR__ . "/test") - ); diff --git a/.php_cs.dist b/.php_cs.dist new file mode 100644 index 0000000..2b230fb --- /dev/null +++ b/.php_cs.dist @@ -0,0 +1,40 @@ +setRiskyAllowed(true) + ->setRules([ + "@PSR1" => true, + "@PSR2" => true, + "braces" => [ + "allow_single_line_closure" => true, + "position_after_functions_and_oop_constructs" => "same", + ], + "array_syntax" => ["syntax" => "short"], + "cast_spaces" => true, + "combine_consecutive_unsets" => true, + "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__ . "/src") + ->in(__DIR__ . "/test") + ); diff --git a/.travis.yml b/.travis.yml index 361de33..27bed1f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,9 @@ language: php php: - - 5.5 - - 5.6 - 7.0 + - 7.1 + - 7.2 - nightly cache: @@ -19,7 +19,7 @@ install: script: - find -name "*.php" -not -path "./vendor/*" -print0 | xargs -n 1 -0 php -l - - $(php -r 'if (PHP_MAJOR_VERSION >= 7) echo "phpdbg -qrr"; else echo "php";') vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml + - phpdbg -qrr vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml - php vendor/bin/php-cs-fixer --diff --dry-run -v fix after_script: diff --git a/LICENSE b/LICENSE index 37b0854..05a3edd 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 Niklas Keller +Copyright (c) 2015-2017 Niklas Keller Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/phpunit.xml b/phpunit.xml.dist similarity index 100% rename from phpunit.xml rename to phpunit.xml.dist