From b5efc21b6b0b687af98ec3e910691d678f8d99b9 Mon Sep 17 00:00:00 2001 From: Mohamed Alsharaf Date: Tue, 12 Jan 2016 20:09:46 +1300 Subject: [PATCH] Misc: CS fixes --- app/Console/Commands/Install.php | 71 +- app/Export/Project/Issue/CsvHandler.php | 14 +- app/Export/Project/Issue/XlsHandler.php | 8 +- app/Extensions/Html/Traits/TabTrait.php | 4 +- app/Form/ExportIssues.php | 12 +- app/Form/FilterIssue.php | 38 +- app/Form/FormAbstract.php | 8 +- app/Form/Issue.php | 4 +- app/Form/Login.php | 18 +- app/Form/Project.php | 30 +- app/Form/Settings.php | 8 +- app/Form/Tag.php | 10 +- app/Form/User.php | 22 +- app/Form/UserSetting.php | 4 +- .../Administration/TagsController.php | 12 +- .../Administration/UsersController.php | 8 +- .../Controllers/AdministrationController.php | 18 +- app/Http/Controllers/Controller.php | 3 +- app/Http/Controllers/HomeController.php | 7 +- .../Controllers/Project/IssueController.php | 26 +- app/Http/Controllers/ProjectController.php | 67 +- app/Http/Controllers/ProjectsController.php | 2 +- app/Http/Controllers/UserController.php | 2 +- app/Http/Kernel.php | 8 +- app/Http/Middleware/Permission.php | 4 +- app/Http/Middleware/Project.php | 2 +- app/Model/Setting.php | 1 - app/Model/Traits/Project/CountTrait.php | 1 + .../Project/Issue/Comment/CrudTrait.php | 10 +- .../Traits/Project/Issue/CrudTagTrait.php | 10 +- app/Model/Traits/Project/Issue/CrudTrait.php | 24 +- app/Model/Traits/Project/Note/CrudTrait.php | 4 +- app/Model/Traits/Project/QueryTrait.php | 5 +- app/Model/Traits/Tag/DataMappingTrait.php | 4 +- app/Model/Traits/User/CountTrait.php | 1 + app/Model/Traits/User/CrudTrait.php | 14 +- app/Model/Traits/User/QueryTrait.php | 2 +- app/Providers/ConfigServiceProvider.php | 4 +- app/Providers/RouteServiceProvider.php | 3 + app/Services/SettingsManager.php | 9 +- config/app.php | 90 +- config/cache.php | 28 +- config/database.php | 40 +- config/debugbar.php | 42 +- config/excel.php | 148 +- config/filesystems.php | 14 +- config/former.php | 24 +- config/mail.php | 16 +- config/queue.php | 20 +- config/services.php | 2 +- .../2015_02_23_001316_create_database.php | 48 +- .../2015_02_26_093316_create_issue_tags.php | 28 +- ...08_141433_add_settings_public_projects.php | 6 +- resources/lang/en/pagination.php | 2 +- resources/lang/en/tinyissue.php | 388 +- resources/lang/en/validation.php | 108 +- tests/_support/FunctionalHelper.php | 22 +- tests/_support/FunctionalTester.php | 27 + tests/_support/UnitTester.php | 27 + .../_generated/FunctionalTesterActions.php | 3613 +++++++++++++++++ .../_support/_generated/UnitTesterActions.php | 3406 ++++++++++++++++ tests/functional/AnonymousUserCest.php | 2 - tests/functional/CrudAttachmentCest.php | 22 +- tests/functional/CrudIssueCest.php | 10 +- tests/functional/CrudIssueCommentCest.php | 4 +- tests/functional/CrudProjectCest.php | 4 +- tests/functional/CrudProjectNotesCest.php | 2 +- tests/functional/CrudTagCest.php | 4 +- tests/functional/ExportProjectIssueCest.php | 12 +- tests/functional/FunctionalTester.php | 1 - tests/functional/IssueCest.php | 4 +- tests/functional/OtherFunctionalCest.php | 2 +- tests/functional/PermissionDeveloperCest.php | 6 +- tests/functional/PermissionManagerCest.php | 8 +- tests/functional/PermissionUserCest.php | 4 +- tests/functional/ProjectCest.php | 10 +- tests/functional/PublicProjectsCest.php | 1 - tests/functional/SettingsCest.php | 2 - tests/unit/SettingsManagerTest.php | 1 - tests/unit/UnitTester.php | 1 - tests/unit/_bootstrap.php | 1 + 81 files changed, 7888 insertions(+), 814 deletions(-) create mode 100644 tests/_support/FunctionalTester.php create mode 100644 tests/_support/UnitTester.php create mode 100644 tests/_support/_generated/FunctionalTesterActions.php create mode 100644 tests/_support/_generated/UnitTesterActions.php diff --git a/app/Console/Commands/Install.php b/app/Console/Commands/Install.php index 303d3eeb3..bac454ecb 100644 --- a/app/Console/Commands/Install.php +++ b/app/Console/Commands/Install.php @@ -49,13 +49,13 @@ class Install extends Command * @var array */ protected $modules = [ - 'pdo' => 0, - 'mcrypt' => 0, - 'openssl' => 0, - 'curl' => 0, - 'json' => 0, + 'pdo' => 0, + 'mcrypt' => 0, + 'openssl' => 0, + 'curl' => 0, + 'json' => 0, 'mbstring' => 0, - 'xml' => 0, + 'xml' => 0, ]; /** @@ -72,8 +72,8 @@ class Install extends Command */ protected $dbDrivers = [ 'pdo_sqlite' => 0, - 'pdo_mysql' => 0, - 'pdo_pgsql' => 0, + 'pdo_mysql' => 0, + 'pdo_pgsql' => 0, 'pdo_sqlsrv' => 0, ]; @@ -83,20 +83,20 @@ class Install extends Command * @var array */ protected $data = [ - 'key' => '', - 'timezone' => 'Pacific/Auckland', - 'dbHost' => 'localhost', - 'dbName' => 'tinyissue', - 'dbUser' => 'root', - 'dbPass' => self::EMPTY_VALUE, - 'dbDriver' => 'mysql', - 'dbPrefix' => '', - 'sysEmail' => '', - 'sysName' => '', - 'adminEmail' => '', + 'key' => '', + 'timezone' => 'Pacific/Auckland', + 'dbHost' => 'localhost', + 'dbName' => 'tinyissue', + 'dbUser' => 'root', + 'dbPass' => self::EMPTY_VALUE, + 'dbDriver' => 'mysql', + 'dbPrefix' => '', + 'sysEmail' => '', + 'sysName' => '', + 'adminEmail' => '', 'adminFirstName' => '', - 'adminLastName' => '', - 'adminPass' => '', + 'adminLastName' => '', + 'adminPass' => '', ]; /** @@ -321,13 +321,13 @@ protected function stageOne() $validDbDrivers = $this->getValidDbDrivers(); $this->askQuestions([ 'dbDriver' => ['choice', ['Select a database driver', $validDbDrivers, 0]], - 'dbHost' => 'Enter the database host', - 'dbName' => 'Enter the database name', - 'dbUser' => 'Enter the database username', - 'dbPass' => 'Enter the database password', + 'dbHost' => 'Enter the database host', + 'dbName' => 'Enter the database name', + 'dbUser' => 'Enter the database username', + 'dbPass' => 'Enter the database password', 'dbPrefix' => 'Enter the tables prefix', 'sysEmail' => 'Email address used by the Tiny Issue to send emails from', - 'sysName' => 'Email name used by the Tiny Issue for the email address above', + 'sysName' => 'Email name used by the Tiny Issue for the email address above', 'timezone' => 'The application timezone. Find your timezone from: http://php.net/manual/en/timezones.php)', ]); $this->data['key'] = md5(str_random(40)); @@ -434,20 +434,20 @@ protected function stageTwo() $this->section('Setting up the admin account:'); $this->askQuestions([ - 'adminEmail' => 'Email address', + 'adminEmail' => 'Email address', 'adminFirstName' => 'First Name', - 'adminLastName' => 'Last Name', - 'adminPass' => 'Password', + 'adminLastName' => 'Last Name', + 'adminPass' => 'Password', ]); Model\User::updateOrCreate(['email' => $this->data['adminEmail']], [ - 'email' => $this->data['adminEmail'], + 'email' => $this->data['adminEmail'], 'firstname' => $this->data['adminFirstName'], - 'lastname' => $this->data['adminLastName'], - 'password' => \Hash::make($this->data['adminPass']), - 'deleted' => Model\User::NOT_DELETED_USERS, - 'role_id' => 4, - 'language' => 'en', + 'lastname' => $this->data['adminLastName'], + 'password' => \Hash::make($this->data['adminPass']), + 'deleted' => Model\User::NOT_DELETED_USERS, + 'role_id' => 4, + 'language' => 'en', ]); $this->info('Admin account created successfully.'); @@ -457,6 +457,7 @@ protected function stageTwo() * Returns the actual value of user input * * @param $name + * * @return string */ protected function getInputValue($name) diff --git a/app/Export/Project/Issue/CsvHandler.php b/app/Export/Project/Issue/CsvHandler.php index 28091a25f..eb45c3506 100644 --- a/app/Export/Project/Issue/CsvHandler.php +++ b/app/Export/Project/Issue/CsvHandler.php @@ -28,14 +28,14 @@ class CsvHandler * @var array */ protected $columns = [ - 'tinyissue.id' => 'id', - 'tinyissue.project' => 'project', - 'tinyissue.title' => 'title', - 'tinyissue.time_quote' => 'time_quote', + 'tinyissue.id' => 'id', + 'tinyissue.project' => 'project', + 'tinyissue.title' => 'title', + 'tinyissue.time_quote' => 'time_quote', 'tinyissue.label_created' => 'created_at', - 'tinyissue.updated' => 'updated_at', - 'tinyissue.label_closed' => 'closed_at', - 'tinyissue.status' => 'status', + 'tinyissue.updated' => 'updated_at', + 'tinyissue.label_closed' => 'closed_at', + 'tinyissue.status' => 'status', ]; /** diff --git a/app/Export/Project/Issue/XlsHandler.php b/app/Export/Project/Issue/XlsHandler.php index 0b0284276..938b9c41a 100644 --- a/app/Export/Project/Issue/XlsHandler.php +++ b/app/Export/Project/Issue/XlsHandler.php @@ -43,13 +43,13 @@ class XlsHandler * @var array */ protected $columns = [ - 'id' => '', - 'title' => '', + 'id' => '', + 'title' => '', 'time_quote' => '', 'created_at' => '', 'updated_at' => '', - 'closed_at' => '', - 'status' => '', + 'closed_at' => '', + 'status' => '', ]; /** diff --git a/app/Extensions/Html/Traits/TabTrait.php b/app/Extensions/Html/Traits/TabTrait.php index edbe6077b..8f0d1fc2f 100644 --- a/app/Extensions/Html/Traits/TabTrait.php +++ b/app/Extensions/Html/Traits/TabTrait.php @@ -31,10 +31,10 @@ trait TabTrait public function tab(array $tabs, $active) { $defaultTab = [ - 'title' => '', + 'title' => '', 'prefix' => '', 'active' => false, - 'url' => '', + 'url' => '', ]; $output = '