diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 06d5dc5..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,26 +0,0 @@ -# PHP CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-php/ for more details -# -version: 2 -jobs: - build: - docker: - - image: circleci/php:7.1-browsers - working_directory: ~/repo - steps: - - checkout - - restore_cache: - keys: - - v1-dependencies-{{ checksum "composer.json" }} - - v1-dependencies- - - run: composer install -n --prefer-dist - - save_cache: - paths: - - ./vendor - key: v1-dependencies-{{ checksum "composer.json" }} - - run: ./vendor/bin/phpunit --log-junit ~/phpunit/junit.xml - - store_test_results: - path: ~/phpunit - - store_artifacts: - path: ~/phpunit diff --git a/.php_cs.dist b/.php_cs.dist new file mode 100644 index 0000000..aed960e --- /dev/null +++ b/.php_cs.dist @@ -0,0 +1,11 @@ +in(__DIR__); +return PhpCsFixer\Config::create() + ->setRules([ + '@PSR2' => true, + 'array_syntax' => ['syntax' => 'short'], + 'ordered_imports' => true, + 'phpdoc_order' => true, + ]) + ->setFinder($finder); \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..88cf36c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +language: php + +php: + - 5.6 + - 7.0 + - 7.1 + - 7.2 + +before_script: + - composer install --dev --prefer-source --no-interaction + +script: + - vendor/bin/php-cs-fixer fix --dry-run + - vendor/bin/phpunit \ No newline at end of file diff --git a/composer.json b/composer.json index bc533c5..b7d3378 100644 --- a/composer.json +++ b/composer.json @@ -18,6 +18,7 @@ "tightenco/collect": "^5.4" }, "require-dev": { + "friendsofphp/php-cs-fixer": "^2.11", "phpunit/phpunit": "^5.7", "symfony/var-dumper": "^3.4" },