diff --git a/.gitignore b/.gitignore index 50b321e..251fee4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ vendor composer.lock .phpunit.result.cache +.php_cs.cache diff --git a/.php_cs b/.php_cs new file mode 100644 index 0000000..bd1a168 --- /dev/null +++ b/.php_cs @@ -0,0 +1,21 @@ +notPath('vendor') + ->in(__DIR__) + ->name('*.php') + ->notName('*.blade.php') + ->ignoreDotFiles(true) + ->ignoreVCS(true); + +return PhpCsFixer\Config::create() + ->setRules([ + '@PSR2' => true, + 'array_syntax' => ['syntax' => 'short'], + 'blank_line_after_namespace' => true, + 'blank_line_after_opening_tag' => true, + 'ordered_imports' => ['sortAlgorithm' => 'alpha'], + 'no_unused_imports' => true, + 'not_operator_with_successor_space' => true, + ]) + ->setFinder($finder); diff --git a/composer.json b/composer.json index 0f83dd0..babe108 100644 --- a/composer.json +++ b/composer.json @@ -11,13 +11,13 @@ } ], "require": { - "php": "^7.1", - "illuminate/console": "~5.5.43|~5.6.0|~5.7.0|~5.8.0|^6.0", - "illuminate/support": "~5.5.43|~5.6.0|~5.7.0|~5.8.0|^6.0" + "php": "^7.2.5", + "illuminate/console": "^6.0|^7.0", + "illuminate/support": "^6.0|^7.0" }, "require-dev": { - "phpunit/phpunit": "^7.0|^8.0", - "orchestra/testbench": "~3.5.0|~3.6.0|~3.7.0|~3.8.0|^4.0" + "phpunit/phpunit": "^7.0|^8.0|^9.0", + "orchestra/testbench": "^4.0|^5.0" }, "autoload": { "psr-4": { diff --git a/src/TaskLoader.php b/src/TaskLoader.php index 0453d69..8562b6b 100644 --- a/src/TaskLoader.php +++ b/src/TaskLoader.php @@ -2,11 +2,11 @@ namespace Signifly\SchedulingTasks; -use ReflectionClass; -use Illuminate\Support\Str; -use Symfony\Component\Finder\Finder; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Contracts\Foundation\Application; +use Illuminate\Support\Str; +use ReflectionClass; +use Symfony\Component\Finder\Finder; class TaskLoader { diff --git a/tests/Console/Kernel.php b/tests/Console/Kernel.php index 48792dc..905a372 100644 --- a/tests/Console/Kernel.php +++ b/tests/Console/Kernel.php @@ -3,8 +3,8 @@ namespace Signifly\SchedulingTasks\Test\Console; use Illuminate\Console\Scheduling\Schedule; -use Signifly\SchedulingTasks\Facades\TaskLoader; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; +use Signifly\SchedulingTasks\Facades\TaskLoader; class Kernel extends ConsoleKernel { diff --git a/tests/Console/Tasks/BackupDaily.php b/tests/Console/Tasks/BackupDaily.php index 9fa597d..55a71cd 100644 --- a/tests/Console/Tasks/BackupDaily.php +++ b/tests/Console/Tasks/BackupDaily.php @@ -2,8 +2,8 @@ namespace Signifly\SchedulingTasks\Test\Console\Tasks; -use Signifly\SchedulingTasks\TaskContract; use Illuminate\Console\Scheduling\Schedule; +use Signifly\SchedulingTasks\TaskContract; class BackupDaily implements TaskContract {