From dd930b03fd764199d11102283bd6a033d361edab Mon Sep 17 00:00:00 2001 From: Simon White Date: Sat, 5 Oct 2019 14:21:42 +0100 Subject: [PATCH 1/3] Make package PSR2 compliant --- .travis.yml | 11 +++++++++++ composer.json | 5 ++++- ...eProvider.php => ClearOrdersByServiceProvider.php} | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 .travis.yml rename src/{clearOrdersByServiceProvider.php => ClearOrdersByServiceProvider.php} (86%) diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ee7da2a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,11 @@ +language: php +php: + - "7.1" + - "5.0" + - "5.6" +before_script: + - composer self-update + - composer install --prefer-source + +script: + - ./vendor/bin/phpcs --standard=PSR2 src \ No newline at end of file diff --git a/composer.json b/composer.json index b57ef71..2d345cd 100644 --- a/composer.json +++ b/composer.json @@ -13,6 +13,9 @@ "illuminate/database": "5.*", "illuminate/support": "5.*" }, + "require-dev": { + "squizlabs/php_codesniffer": "^3.5" + }, "autoload": { "psr-4": { "Bader\\ClearOrdersBy\\": "src/" @@ -21,7 +24,7 @@ "extra": { "laravel": { "providers": [ - "Bader\\ClearOrdersBy\\clearOrdersByServiceProvider" + "Bader\\ClearOrdersBy\\ClearOrdersByServiceProvider" ] } } diff --git a/src/clearOrdersByServiceProvider.php b/src/ClearOrdersByServiceProvider.php similarity index 86% rename from src/clearOrdersByServiceProvider.php rename to src/ClearOrdersByServiceProvider.php index f0ab9ab..8b10643 100644 --- a/src/clearOrdersByServiceProvider.php +++ b/src/ClearOrdersByServiceProvider.php @@ -5,7 +5,7 @@ use Illuminate\Database\Query\Builder; use Illuminate\Support\ServiceProvider; -class clearOrdersByServiceProvider extends ServiceProvider +class ClearOrdersByServiceProvider extends ServiceProvider { /** From 6188d97559bba98aae1140964561d1bbde610a5e Mon Sep 17 00:00:00 2001 From: Simon White Date: Sat, 5 Oct 2019 14:23:32 +0100 Subject: [PATCH 2/3] Fix typo in travis build for 7.0 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ee7da2a..9459539 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: php php: - "7.1" - - "5.0" + - "7.0" - "5.6" before_script: - composer self-update From 2d84eb6e65e0257672207177b1b1cf42993bd521 Mon Sep 17 00:00:00 2001 From: Simon White Date: Sat, 5 Oct 2019 14:25:30 +0100 Subject: [PATCH 3/3] Update README.me for the class change --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b5f0fdc..a51e532 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ auth()->user()->notifications() `composer require if4lcon/laravel-clear-orders-by` -Then add this line `Bader\ClearOrdersBy\clearOrdersByServiceProvider::class` to service providers in `config/app.php`. +Then add this line `Bader\ClearOrdersBy\ClearOrdersByServiceProvider::class` to service providers in `config/app.php`. ## License