From de26849f184b37d2c77a36215a9ff8e5d24cf3ef Mon Sep 17 00:00:00 2001 From: Amine Ben hammou Date: Wed, 18 Jan 2017 19:36:03 +0000 Subject: [PATCH] editorconfig added --- .editorconfig | 14 ++++++++++++++ .gitignore | 2 +- .travis.yml | 3 ++- README.md | 1 + src/Argument/ArgumentFormat.php | 2 +- src/Argument/ArgumentFormatLoader.php | 4 ++-- src/Argument/ArgumentParser.php | 2 +- src/Commands/BaseCommand.php | 2 +- src/Commands/ControllerCommand.php | 2 +- src/Commands/ControllerRestActionsCommand.php | 2 +- src/Commands/FactoryCommand.php | 2 +- src/Commands/PivotSeederCommand.php | 2 +- src/Commands/SeederCommand.php | 2 +- src/Commands/TestCommand.php | 2 +- src/CommandsServiceProvider.php | 6 +++--- src/Exceptions/ArgumentFormatException.php | 2 +- src/Exceptions/ArgumentParserException.php | 2 +- src/Exceptions/TemplateException.php | 2 +- src/Template/Template.php | 2 +- src/Template/TemplateLoader.php | 2 +- test.sh | 2 +- 21 files changed, 38 insertions(+), 22 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..5e724ce --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space + +[*.php] +charset = utf-8 +indent_size = 4 + +[*.{json,yml}] +charset = utf-8 +indent_size = 2 diff --git a/.gitignore b/.gitignore index e7ecb03..7319a28 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,4 @@ tests/_output/* lumen-test/app lumen-test/database -lumen-test/tests/tmp \ No newline at end of file +lumen-test/tests/tmp diff --git a/.travis.yml b/.travis.yml index 1d094cc..6080839 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ php: - 5.5 - 5.6 - 7.0 + - 7.1 - hhvm matrix: @@ -14,4 +15,4 @@ sudo: false install: ./install.sh -script: ./test.sh \ No newline at end of file +script: ./test.sh diff --git a/README.md b/README.md index 57d54d2..9529eb6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Lumen generators [![Build Status](https://travis-ci.org/webNeat/lumen-generators.svg?branch=master)](https://travis-ci.org/webNeat/lumen-generators) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/webNeat/lumen-generators/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/webNeat/lumen-generators/?branch=master) [![License](https://poser.pugx.org/laravel/framework/license.svg)](http://opensource.org/licenses/MIT) A collection of generators for [Lumen](http://lumen.laravel.com) and [Laravel 5](http://laravel.com/). diff --git a/src/Argument/ArgumentFormat.php b/src/Argument/ArgumentFormat.php index 55b4f3a..4b2c020 100644 --- a/src/Argument/ArgumentFormat.php +++ b/src/Argument/ArgumentFormat.php @@ -40,4 +40,4 @@ class ArgumentFormat { */ public $format; -} \ No newline at end of file +} diff --git a/src/Argument/ArgumentFormatLoader.php b/src/Argument/ArgumentFormatLoader.php index 77794c2..e20ee69 100644 --- a/src/Argument/ArgumentFormatLoader.php +++ b/src/Argument/ArgumentFormatLoader.php @@ -138,9 +138,9 @@ class ArgumentFormatLoader { $attr = $matches['attr']; $type = empty($matches['type']) ? null : $matches['type']; - $isArray = (@$matches[2][0] === '['); + $isArray = (isset($matches[2][0]) && $matches[2][0] === '['); return [$attr, $type, $isArray]; } -} \ No newline at end of file +} diff --git a/src/Argument/ArgumentParser.php b/src/Argument/ArgumentParser.php index 8dc6770..f2204eb 100644 --- a/src/Argument/ArgumentParser.php +++ b/src/Argument/ArgumentParser.php @@ -112,4 +112,4 @@ class ArgumentParser { return $result; } -} \ No newline at end of file +} diff --git a/src/Commands/BaseCommand.php b/src/Commands/BaseCommand.php index 488f483..c85b406 100644 --- a/src/Commands/BaseCommand.php +++ b/src/Commands/BaseCommand.php @@ -54,4 +54,4 @@ class BaseCommand extends Command { return str_repeat(' ', $n); } -} \ No newline at end of file +} diff --git a/src/Commands/ControllerCommand.php b/src/Commands/ControllerCommand.php index 53e02a0..919bd8f 100644 --- a/src/Commands/ControllerCommand.php +++ b/src/Commands/ControllerCommand.php @@ -40,4 +40,4 @@ class ControllerCommand extends BaseCommand { } } -} \ No newline at end of file +} diff --git a/src/Commands/ControllerRestActionsCommand.php b/src/Commands/ControllerRestActionsCommand.php index 0263b96..61a59e6 100644 --- a/src/Commands/ControllerRestActionsCommand.php +++ b/src/Commands/ControllerRestActionsCommand.php @@ -15,4 +15,4 @@ class ControllerRestActionsCommand extends BaseCommand { $this->save($content, "./app/Http/Controllers/RESTActions.php", "REST actions trait"); } -} \ No newline at end of file +} diff --git a/src/Commands/FactoryCommand.php b/src/Commands/FactoryCommand.php index e5f0663..fe84db0 100644 --- a/src/Commands/FactoryCommand.php +++ b/src/Commands/FactoryCommand.php @@ -62,4 +62,4 @@ class FactoryCommand extends BaseCommand { return $content; } -} \ No newline at end of file +} diff --git a/src/Commands/PivotSeederCommand.php b/src/Commands/PivotSeederCommand.php index 69809c9..cf4c57b 100644 --- a/src/Commands/PivotSeederCommand.php +++ b/src/Commands/PivotSeederCommand.php @@ -55,4 +55,4 @@ class PivotSeederCommand extends BaseCommand { return array_map('str_plural', $resources); } -} \ No newline at end of file +} diff --git a/src/Commands/SeederCommand.php b/src/Commands/SeederCommand.php index daf0818..a4feee0 100644 --- a/src/Commands/SeederCommand.php +++ b/src/Commands/SeederCommand.php @@ -37,4 +37,4 @@ class SeederCommand extends BaseCommand { return $name; } -} \ No newline at end of file +} diff --git a/src/Commands/TestCommand.php b/src/Commands/TestCommand.php index 17c7632..12a4991 100644 --- a/src/Commands/TestCommand.php +++ b/src/Commands/TestCommand.php @@ -1,4 +1,4 @@ registerResourcesCommand(); $this->registerPivotTableCommand(); $this->registerFactoryCommand(); - // $this->registerSeederCommand(); - // $this->registerPivotSeederCommand(); - // $this->registerTestCommand(); + // registerSeederCommand + // registerPivotSeederCommand + // registerTestCommand } protected function registerModelCommand(){ diff --git a/src/Exceptions/ArgumentFormatException.php b/src/Exceptions/ArgumentFormatException.php index 03b845e..ae63345 100644 --- a/src/Exceptions/ArgumentFormatException.php +++ b/src/Exceptions/ArgumentFormatException.php @@ -1,4 +1,4 @@ loaded[$name]); } -} \ No newline at end of file +} diff --git a/test.sh b/test.sh index a9bdea5..b8a7678 100755 --- a/test.sh +++ b/test.sh @@ -1,4 +1,4 @@ # Runing tests for Lumen cd lumen-test wget http://codeception.com/codecept.phar -php codecept.phar run \ No newline at end of file +php codecept.phar run