From cc17b679f151e51493937485a5f9bd85d9cc1802 Mon Sep 17 00:00:00 2001 From: Quezler Date: Mon, 24 Apr 2017 13:38:19 +0200 Subject: [PATCH] Code dusting (#2826) Code cleaning according to PSR-2 w/ exemptions (mostly dust). --- config/broadcasting.php | 2 +- config/cache.php | 2 +- config/mail.php | 2 +- config/queue.php | 2 +- config/services.php | 2 +- config/testing/cms.php | 8 +++--- modules/backend/ServiceProvider.php | 2 +- modules/backend/behaviors/FormController.php | 14 +++++----- .../behaviors/ImportExportController.php | 6 ++-- modules/backend/behaviors/ListController.php | 2 +- .../backend/behaviors/RelationController.php | 12 ++++---- .../backend/behaviors/ReorderController.php | 2 +- .../TranscodeFilter.php | 2 +- modules/backend/classes/AuthManager.php | 6 ++-- modules/backend/controllers/Files.php | 2 +- modules/backend/controllers/Index.php | 2 +- ...1_000008_Db_Backend_Add_Superuser_Flag.php | 2 +- modules/backend/facades/Backend.php | 2 +- modules/backend/facades/BackendAuth.php | 4 +-- modules/backend/facades/BackendMenu.php | 4 +-- modules/backend/formwidgets/FileUpload.php | 5 ++-- .../backend/formwidgets/PermissionEditor.php | 2 +- modules/backend/formwidgets/RecordFinder.php | 6 ++-- modules/backend/formwidgets/RichEditor.php | 4 +-- modules/backend/lang/be/lang.php | 2 +- modules/backend/lang/de/lang.php | 2 +- modules/backend/lang/el/lang.php | 14 +++++----- modules/backend/lang/es/lang.php | 4 +-- modules/backend/lang/it/lang.php | 4 +-- modules/backend/lang/zh-cn/lang.php | 1 - modules/backend/lang/zh-tw/lang.php | 2 +- modules/backend/models/EditorSetting.php | 4 +-- modules/backend/models/ImportModel.php | 4 +-- modules/backend/models/Preference.php | 2 +- modules/backend/traits/FormModelSaver.php | 2 +- .../backend/traits/InspectableContainer.php | 2 +- modules/backend/traits/WidgetMaker.php | 2 +- modules/backend/widgets/Filter.php | 2 +- modules/backend/widgets/Lists.php | 6 ++-- modules/backend/widgets/ReportContainer.php | 2 +- modules/backend/widgets/Table.php | 4 +-- .../widgets/table/ClientMemoryDataSource.php | 2 +- .../backend/widgets/table/DataSourceBase.php | 4 +-- .../widgets/table/ServerEventDataSource.php | 2 +- modules/cms/ServiceProvider.php | 4 +-- modules/cms/classes/CmsCompoundObject.php | 4 +-- modules/cms/classes/CmsObjectCollection.php | 6 ++-- modules/cms/classes/CodeParser.php | 2 +- modules/cms/classes/ComponentBase.php | 4 +-- modules/cms/classes/Controller.php | 2 +- modules/cms/classes/LayoutCode.php | 2 +- modules/cms/classes/MediaLibrary.php | 9 +++--- modules/cms/classes/MediaViewHelper.php | 2 +- modules/cms/classes/Page.php | 4 +-- modules/cms/classes/Router.php | 6 ++-- modules/cms/classes/Theme.php | 4 +-- modules/cms/components/Resources.php | 6 ++-- modules/cms/controllers/Media.php | 2 +- modules/cms/facades/Cms.php | 2 +- modules/cms/formwidgets/MediaFinder.php | 2 +- modules/cms/helpers/Cms.php | 2 +- modules/cms/lang/el/lang.php | 2 +- modules/cms/lang/es/lang.php | 26 ++++++++--------- modules/cms/lang/zh-tw/lang.php | 2 +- modules/cms/models/ThemeExport.php | 2 +- modules/cms/models/ThemeImport.php | 2 +- modules/cms/models/ThemeLog.php | 4 +-- modules/cms/widgets/MediaManager.php | 4 +-- modules/cms/widgets/TemplateList.php | 6 ++-- modules/system/ServiceProvider.php | 14 +++++----- modules/system/classes/CombineAssets.php | 4 +-- modules/system/classes/ComposerManager.php | 2 +- modules/system/classes/MarkupManager.php | 4 +-- modules/system/classes/PluginBase.php | 2 +- modules/system/classes/SettingsManager.php | 4 +-- modules/system/console/OctoberEnv.php | 4 +-- modules/system/console/OctoberUtil.php | 4 +-- modules/system/helpers/View.php | 2 +- modules/system/lang/bg/client.php | 2 +- modules/system/lang/cs/client.php | 3 -- modules/system/lang/el/client.php | 6 ++-- modules/system/lang/el/lang.php | 2 +- modules/system/lang/es/validation.php | 2 +- modules/system/lang/pl/lang.php | 28 +++++++++---------- modules/system/lang/ro/client.php | 3 -- modules/system/lang/sv/client.php | 3 -- modules/system/lang/zh-tw/lang.php | 2 +- modules/system/traits/AssetMaker.php | 2 +- modules/system/traits/ConfigMaker.php | 2 +- modules/system/traits/PropertyContainer.php | 2 +- .../plugins/database/tester/Plugin.php | 2 +- .../database/tester/models/Category.php | 2 +- .../plugins/database/tester/models/Phone.php | 2 +- .../plugins/database/tester/models/User.php | 2 +- .../tester/updates/create_authors_table.php | 2 +- .../updates/create_categories_table.php | 4 +-- .../tester/updates/create_event_log_table.php | 2 +- .../tester/updates/create_meta_table.php | 2 +- .../tester/updates/create_phones_table.php | 2 +- .../tester/updates/create_posts_table.php | 2 +- .../tester/updates/create_roles_table.php | 4 +-- .../tester/updates/create_users_table.php | 2 +- .../plugins/october/noupdates/Plugin.php | 2 +- .../plugins/october/sample/Plugin.php | 2 +- .../plugins/october/tester/Plugin.php | 2 +- .../october/tester/components/Archive.php | 4 +-- .../tester/components/ContentBlock.php | 2 +- .../october/tester/components/MainMenu.php | 2 +- .../october/tester/components/Post.php | 2 +- .../october/tester/formwidgets/Preview.php | 2 +- .../plugins/testvendor/test/Plugin.php | 2 +- .../testvendor/test/formwidgets/Sample.php | 2 +- tests/functional/cms/TemplateTest.php | 2 +- .../backend/classes/WidgetManagerTest.php | 2 +- tests/unit/backend/models/ImportModelTest.php | 2 +- tests/unit/backend/traits/WidgetMakerTest.php | 2 +- .../cms/classes/CmsCompoundObjectTest.php | 2 +- tests/unit/cms/classes/CmsExceptionTest.php | 2 +- tests/unit/cms/classes/CmsObjectQueryTest.php | 2 +- tests/unit/cms/classes/CmsObjectTest.php | 2 +- tests/unit/cms/classes/ContentTest.php | 2 +- tests/unit/cms/classes/RouterTest.php | 4 +-- tests/unit/cms/classes/ThemeTest.php | 2 +- .../plugins/database/DeferredBindingTest.php | 2 +- .../plugins/database/HasManyModelTest.php | 2 +- .../plugins/database/NestedTreeModelTest.php | 4 +-- .../database/RevisionableModelTest.php | 2 +- .../plugins/database/SimpleTreeModelTest.php | 4 +-- .../plugins/database/SoftDeleteModelTest.php | 2 +- .../unit/system/classes/CombineAssetsTest.php | 2 +- tests/unit/system/classes/CoreLangTest.php | 2 +- .../unit/system/classes/MarkupManagerTest.php | 4 +-- .../unit/system/classes/PluginManagerTest.php | 2 +- .../system/classes/VersionManagerTest.php | 2 +- 134 files changed, 231 insertions(+), 243 deletions(-) diff --git a/config/broadcasting.php b/config/broadcasting.php index 02cf625a5..ed373cb29 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -49,4 +49,4 @@ return [ ], -]; \ No newline at end of file +]; diff --git a/config/cache.php b/config/cache.php index 65939e071..c9a8054ac 100644 --- a/config/cache.php +++ b/config/cache.php @@ -76,4 +76,4 @@ return [ 'prefix' => 'october', -]; \ No newline at end of file +]; diff --git a/config/mail.php b/config/mail.php index 97ff44325..f983b6938 100644 --- a/config/mail.php +++ b/config/mail.php @@ -121,4 +121,4 @@ return [ 'pretend' => false, -]; \ No newline at end of file +]; diff --git a/config/queue.php b/config/queue.php index cf7500ab2..de27ab7f1 100644 --- a/config/queue.php +++ b/config/queue.php @@ -89,4 +89,4 @@ return [ 'database' => 'mysql', 'table' => 'failed_jobs', ], -]; \ No newline at end of file +]; diff --git a/config/services.php b/config/services.php index eed891e5f..5a2795a17 100644 --- a/config/services.php +++ b/config/services.php @@ -34,4 +34,4 @@ return [ 'secret' => '', ], -]; \ No newline at end of file +]; diff --git a/config/testing/cms.php b/config/testing/cms.php index dfea912c7..d29bbc3c3 100644 --- a/config/testing/cms.php +++ b/config/testing/cms.php @@ -18,8 +18,8 @@ return [ | Time to live for parsed CMS objects. |-------------------------------------------------------------------------- | - | Specifies the number of minutes the CMS object cache lives. After the interval - | is expired item are re-cached. Note that items are re-cached automatically when + | Specifies the number of minutes the CMS object cache lives. After the interval + | is expired item are re-cached. Note that items are re-cached automatically when | the corresponding template file is modified. | */ @@ -32,7 +32,7 @@ return [ |-------------------------------------------------------------------------- | | If the caching is enabled, the page URL map is saved in the cache. If a page - | URL was changed on the disk, the old URL value could be still saved in the cache. + | URL was changed on the disk, the old URL value could be still saved in the cache. | To update the cache the back-end Clear Cache feature should be used. It is recommended | to disable the caching during the development, and enable it in the production mode. | @@ -59,7 +59,7 @@ return [ |-------------------------------------------------------------------------- | | If the caching is enabled, combined assets are cached. If a asset file - | is changed on the disk, the old file contents could be still saved in the cache. + | is changed on the disk, the old file contents could be still saved in the cache. | To update the cache the back-end Clear Cache feature should be used. It is recommended | to disable the caching during the development, and enable it in the production mode. | diff --git a/modules/backend/ServiceProvider.php b/modules/backend/ServiceProvider.php index a08fee508..3a11f83bb 100644 --- a/modules/backend/ServiceProvider.php +++ b/modules/backend/ServiceProvider.php @@ -64,7 +64,7 @@ class ServiceProvider extends ModuleServiceProvider */ protected function registerAssetBundles() { - CombineAssets::registerCallback(function($combiner) { + CombineAssets::registerCallback(function ($combiner) { $combiner->registerBundle('~/modules/backend/assets/less/october.less'); $combiner->registerBundle('~/modules/backend/assets/js/october.js'); $combiner->registerBundle('~/modules/backend/widgets/table/assets/js/build.js'); diff --git a/modules/backend/behaviors/FormController.php b/modules/backend/behaviors/FormController.php index f49657f6a..1e1061f18 100644 --- a/modules/backend/behaviors/FormController.php +++ b/modules/backend/behaviors/FormController.php @@ -246,7 +246,7 @@ class FormController extends ControllerBehavior $this->controller->formBeforeCreate($model); $modelsToSave = $this->prepareModelsToSave($model, $this->formWidget->getSaveData()); - Db::transaction(function() use ($modelsToSave) { + Db::transaction(function () use ($modelsToSave) { foreach ($modelsToSave as $modelToSave) { $modelToSave->save(null, $this->formWidget->getSessionKey()); } @@ -313,7 +313,7 @@ class FormController extends ControllerBehavior $this->controller->formBeforeUpdate($model); $modelsToSave = $this->prepareModelsToSave($model, $this->formWidget->getSaveData()); - Db::transaction(function() use ($modelsToSave) { + Db::transaction(function () use ($modelsToSave) { foreach ($modelsToSave as $modelToSave) { $modelToSave->save(null, $this->formWidget->getSessionKey()); } @@ -466,7 +466,7 @@ class FormController extends ControllerBehavior } if (post('refresh', false)) { - return Redirect::refresh(); + return Redirect::refresh(); } if (post('redirect', true)) { @@ -481,7 +481,7 @@ class FormController extends ControllerBehavior } /** - * Internal method that returns a redirect URL from the config based on + * Internal method that returns a redirect URL from the config based on * supplied context. Otherwise the default redirect is used. * * @param string $context Redirect context, eg: create, update, delete. @@ -553,7 +553,7 @@ class FormController extends ControllerBehavior } /** - * View helper to check if a form tab has fields in the + * View helper to check if a form tab has fields in the * non-tabbed section (outside fields). * * formHasOutsideFields()): ?> @@ -581,7 +581,7 @@ class FormController extends ControllerBehavior } /** - * View helper to check if a form tab has fields in the + * View helper to check if a form tab has fields in the * primary tab section. * * formHasPrimaryTabs()): ?> @@ -609,7 +609,7 @@ class FormController extends ControllerBehavior } /** - * View helper to check if a form tab has fields in the + * View helper to check if a form tab has fields in the * secondary tab section. * * formHasSecondaryTabs()): ?> diff --git a/modules/backend/behaviors/ImportExportController.php b/modules/backend/behaviors/ImportExportController.php index 4e71574ff..3cba09ca1 100644 --- a/modules/backend/behaviors/ImportExportController.php +++ b/modules/backend/behaviors/ImportExportController.php @@ -318,7 +318,7 @@ class ImportExportController extends ControllerBehavior $firstRow = $reader->fetchOne(0); if (!post('first_row_titles')) { - array_walk($firstRow, function(&$value, $key) { + array_walk($firstRow, function (&$value, $key) { $value = 'Column #'.($key + 1); }); } @@ -345,7 +345,7 @@ class ImportExportController extends ControllerBehavior $widget = $this->makeWidget('Backend\Widgets\Form', $widgetConfig); - $widget->bindEvent('form.beforeRefresh', function($holder) { + $widget->bindEvent('form.beforeRefresh', function ($holder) { $holder->data = []; }); @@ -503,7 +503,7 @@ class ImportExportController extends ControllerBehavior $widget = $this->makeWidget('Backend\Widgets\Form', $widgetConfig); - $widget->bindEvent('form.beforeRefresh', function($holder) { + $widget->bindEvent('form.beforeRefresh', function ($holder) { $holder->data = []; }); diff --git a/modules/backend/behaviors/ListController.php b/modules/backend/behaviors/ListController.php index a070972a8..91baff00c 100644 --- a/modules/backend/behaviors/ListController.php +++ b/modules/backend/behaviors/ListController.php @@ -244,7 +244,7 @@ class ListController extends ControllerBehavior /* * Extend the query of the list of options */ - $filterWidget->bindEvent('filter.extendQuery', function($query, $scope) { + $filterWidget->bindEvent('filter.extendQuery', function ($query, $scope) { $this->controller->listFilterExtendQuery($query, $scope); }); diff --git a/modules/backend/behaviors/RelationController.php b/modules/backend/behaviors/RelationController.php index 8cab3e699..ab93d9289 100644 --- a/modules/backend/behaviors/RelationController.php +++ b/modules/backend/behaviors/RelationController.php @@ -650,17 +650,17 @@ class RelationController extends ControllerBehavior * Apply defined constraints */ if ($sqlConditions = $this->getConfig('view[conditions]')) { - $widget->bindEvent('list.extendQueryBefore', function($query) use ($sqlConditions) { + $widget->bindEvent('list.extendQueryBefore', function ($query) use ($sqlConditions) { $query->whereRaw($sqlConditions); }); } elseif ($scopeMethod = $this->getConfig('view[scope]')) { - $widget->bindEvent('list.extendQueryBefore', function($query) use ($scopeMethod) { + $widget->bindEvent('list.extendQueryBefore', function ($query) use ($scopeMethod) { $query->$scopeMethod($this->model); }); } else { - $widget->bindEvent('list.extendQueryBefore', function($query) { + $widget->bindEvent('list.extendQueryBefore', function ($query) { $this->relationObject->addDefinedConstraintsToQuery($query); }); } @@ -780,17 +780,17 @@ class RelationController extends ControllerBehavior * Apply defined constraints */ if ($sqlConditions = $this->getConfig('manage[conditions]')) { - $widget->bindEvent('list.extendQueryBefore', function($query) use ($sqlConditions) { + $widget->bindEvent('list.extendQueryBefore', function ($query) use ($sqlConditions) { $query->whereRaw($sqlConditions); }); } elseif ($scopeMethod = $this->getConfig('manage[scope]')) { - $widget->bindEvent('list.extendQueryBefore', function($query) use ($scopeMethod) { + $widget->bindEvent('list.extendQueryBefore', function ($query) use ($scopeMethod) { $query->$scopeMethod($this->model); }); } else { - $widget->bindEvent('list.extendQueryBefore', function($query) { + $widget->bindEvent('list.extendQueryBefore', function ($query) { $this->relationObject->addDefinedConstraintsToQuery($query); }); } diff --git a/modules/backend/behaviors/ReorderController.php b/modules/backend/behaviors/ReorderController.php index 46f9c7c58..6acad5e54 100644 --- a/modules/backend/behaviors/ReorderController.php +++ b/modules/backend/behaviors/ReorderController.php @@ -96,7 +96,7 @@ class ReorderController extends ControllerBehavior { $this->addJs('js/october.reorder.js', 'core'); - $this->controller->pageTitle = $this->controller->pageTitle + $this->controller->pageTitle = $this->controller->pageTitle ?: Lang::get($this->getConfig('title', 'backend::lang.reorder.default_title')); $this->validateModel(); diff --git a/modules/backend/behaviors/importexportcontroller/TranscodeFilter.php b/modules/backend/behaviors/importexportcontroller/TranscodeFilter.php index e1d75e89e..d684c912b 100644 --- a/modules/backend/behaviors/importexportcontroller/TranscodeFilter.php +++ b/modules/backend/behaviors/importexportcontroller/TranscodeFilter.php @@ -50,7 +50,7 @@ class TranscodeFilter extends php_user_filter } $this->encodingTo = mb_internal_encoding(); - if (isset( $matches[3] )) { + if (isset($matches[3])) { $this->encodingTo = $matches[3]; } diff --git a/modules/backend/classes/AuthManager.php b/modules/backend/classes/AuthManager.php index 6d36df9de..d9f8cf89d 100644 --- a/modules/backend/classes/AuthManager.php +++ b/modules/backend/classes/AuthManager.php @@ -68,8 +68,8 @@ class AuthManager extends RainAuthManager /** * Registers the back-end permission items. - * The argument is an array of the permissions. The array keys represent the - * permission codes, specific for the plugin/module. Each element in the + * The argument is an array of the permissions. The array keys represent the + * permission codes, specific for the plugin/module. Each element in the * array should be an associative array with the following keys: * - label - specifies the menu label localization string key, required. * - order - a position of the item in the menu, optional. @@ -92,7 +92,7 @@ class AuthManager extends RainAuthManager /** * Returns a list of the registered permissions items. - * @return array + * @return array */ public function listPermissions() { diff --git a/modules/backend/controllers/Files.php b/modules/backend/controllers/Files.php index b2c54f86a..80c952fe3 100644 --- a/modules/backend/controllers/Files.php +++ b/modules/backend/controllers/Files.php @@ -42,7 +42,7 @@ class Files extends Controller echo $this->findFileObject($code)->outputThumb( $width, $height, - compact('mode','extension') + compact('mode', 'extension') ); exit; } diff --git a/modules/backend/controllers/Index.php b/modules/backend/controllers/Index.php index c04b9f5fa..8536f1e84 100644 --- a/modules/backend/controllers/Index.php +++ b/modules/backend/controllers/Index.php @@ -71,7 +71,7 @@ class Index extends Controller protected function checkPermissionRedirect() { if (!$this->user->hasAccess('backend.access_dashboard')) { - $true = function(){ return true; }; + $true = function () { return true; }; if ($first = array_first(BackendMenu::listMainMenuItems(), $true)) { return Redirect::intended($first->url); } diff --git a/modules/backend/database/migrations/2015_10_01_000008_Db_Backend_Add_Superuser_Flag.php b/modules/backend/database/migrations/2015_10_01_000008_Db_Backend_Add_Superuser_Flag.php index 596d32080..2bc388b19 100644 --- a/modules/backend/database/migrations/2015_10_01_000008_Db_Backend_Add_Superuser_Flag.php +++ b/modules/backend/database/migrations/2015_10_01_000008_Db_Backend_Add_Superuser_Flag.php @@ -12,7 +12,7 @@ class DbBackendAddSuperuserFlag extends Migration $table->boolean('is_superuser')->default(false); }); - AdminModel::all()->each(function($user) { + AdminModel::all()->each(function ($user) { if ($user->hasPermission('superuser')) { $user->is_superuser = true; $user->save(); diff --git a/modules/backend/facades/Backend.php b/modules/backend/facades/Backend.php index 8f9966e35..4ca59f641 100644 --- a/modules/backend/facades/Backend.php +++ b/modules/backend/facades/Backend.php @@ -6,7 +6,7 @@ class Backend extends Facade { /** * Get the registered name of the component. - * + * * @see \Backend\Helpers\Backend * @return string */ diff --git a/modules/backend/facades/BackendAuth.php b/modules/backend/facades/BackendAuth.php index 2d676fd8b..99dde86f3 100644 --- a/modules/backend/facades/BackendAuth.php +++ b/modules/backend/facades/BackendAuth.php @@ -6,10 +6,10 @@ class BackendAuth extends Facade { /** * Get the registered name of the component. - * + * * Resolves to: * - Backend\Classes\AuthManager - * + * * @return string */ protected static function getFacadeAccessor() diff --git a/modules/backend/facades/BackendMenu.php b/modules/backend/facades/BackendMenu.php index 8ec2a431a..eb93dff9a 100644 --- a/modules/backend/facades/BackendMenu.php +++ b/modules/backend/facades/BackendMenu.php @@ -6,10 +6,10 @@ class BackendMenu extends Facade { /** * Get the registered name of the component. - * + * * Resolves to: * - Backend\Classes\NavigationManager - * + * * @return string */ protected static function getFacadeAccessor() diff --git a/modules/backend/formwidgets/FileUpload.php b/modules/backend/formwidgets/FileUpload.php index 3344a59c2..1e16dd382 100644 --- a/modules/backend/formwidgets/FileUpload.php +++ b/modules/backend/formwidgets/FileUpload.php @@ -13,7 +13,6 @@ use ApplicationException; use ValidationException; use Exception; - /** * File upload field * Renders a form file uploader field. @@ -146,7 +145,7 @@ class FileUpload extends FormWidgetBase /* * Decorate each file with thumb and custom download path */ - $list->each(function($file) { + $list->each(function ($file) { $this->decorateFileAttributes($file); }); @@ -246,7 +245,7 @@ class FileUpload extends FormWidgetBase $types = explode(',', $types); } - $types = array_map(function($value) use ($includeDot) { + $types = array_map(function ($value) use ($includeDot) { $value = trim($value); if (substr($value, 0, 1) == '.') { diff --git a/modules/backend/formwidgets/PermissionEditor.php b/modules/backend/formwidgets/PermissionEditor.php index 32692c6da..ebaa1692c 100644 --- a/modules/backend/formwidgets/PermissionEditor.php +++ b/modules/backend/formwidgets/PermissionEditor.php @@ -75,4 +75,4 @@ class PermissionEditor extends FormWidgetBase { return strlen($this->mode) ? $this->mode : 'radio'; } -} \ No newline at end of file +} diff --git a/modules/backend/formwidgets/RecordFinder.php b/modules/backend/formwidgets/RecordFinder.php index 6e7019002..49d1a58bc 100644 --- a/modules/backend/formwidgets/RecordFinder.php +++ b/modules/backend/formwidgets/RecordFinder.php @@ -279,17 +279,17 @@ class RecordFinder extends FormWidgetBase ]); if ($sqlConditions = $this->conditions) { - $widget->bindEvent('list.extendQueryBefore', function($query) use ($sqlConditions) { + $widget->bindEvent('list.extendQueryBefore', function ($query) use ($sqlConditions) { $query->whereRaw($sqlConditions); }); } elseif ($scopeMethod = $this->scope) { - $widget->bindEvent('list.extendQueryBefore', function($query) use ($scopeMethod) { + $widget->bindEvent('list.extendQueryBefore', function ($query) use ($scopeMethod) { $query->$scopeMethod($this->model); }); } else { - $widget->bindEvent('list.extendQueryBefore', function($query) { + $widget->bindEvent('list.extendQueryBefore', function ($query) { $this->getRelationObject()->addDefinedConstraintsToQuery($query); }); } diff --git a/modules/backend/formwidgets/RichEditor.php b/modules/backend/formwidgets/RichEditor.php index 733866ec9..c8af07eab 100644 --- a/modules/backend/formwidgets/RichEditor.php +++ b/modules/backend/formwidgets/RichEditor.php @@ -106,7 +106,7 @@ class RichEditor extends FormWidgetBase $buttons = $this->toolbarButtons; if (is_string($buttons)) { - $buttons = array_map(function($button) { + $buttons = array_map(function ($button) { return strlen($button) ? $button : '|'; }, explode('|', $buttons)); } @@ -210,7 +210,7 @@ class RichEditor extends FormWidgetBase $links[] = ['name' => Lang::get('backend::lang.pagelist.select_page'), 'url' => false]; - $iterator = function($links, $level = 0) use (&$iterator) { + $iterator = function ($links, $level = 0) use (&$iterator) { $result = []; foreach ($links as $linkUrl => $link) { diff --git a/modules/backend/lang/be/lang.php b/modules/backend/lang/be/lang.php index fa823da6d..53e4d8a4c 100644 --- a/modules/backend/lang/be/lang.php +++ b/modules/backend/lang/be/lang.php @@ -467,4 +467,4 @@ return [ 'encoding_not_supported_error' => "Не атрымалася вызначыць кадзіроўку файла. Калі ласка, выберыце правільны фармат самастойна", 'encoding_format' => "Кадзіроўка файла" ] -]; \ No newline at end of file +]; diff --git a/modules/backend/lang/de/lang.php b/modules/backend/lang/de/lang.php index 1b3fa7a5b..ddc42eac3 100644 --- a/modules/backend/lang/de/lang.php +++ b/modules/backend/lang/de/lang.php @@ -95,7 +95,7 @@ return [ 'view_access_logs' => 'Zugriffsprotokoll betrachten', 'nice_message' => 'Wir wünschen einen schönen Tag!', ] - ], + ], 'user' => [ 'name' => 'Administrator', 'menu_label' => 'Administratoren', diff --git a/modules/backend/lang/el/lang.php b/modules/backend/lang/el/lang.php index 037bb6262..c02a0e09d 100644 --- a/modules/backend/lang/el/lang.php +++ b/modules/backend/lang/el/lang.php @@ -24,9 +24,9 @@ return [ ], 'no_database' => [ 'label' => 'Δεν βρέθηκε η βάση δεδομένων', - 'help' => "Η βάση δεδομένων είναι απαραίτητη για να έχετε πρόσβαση στο back-end. Ελέγξτε εάν η βάση δεδομένων είναι ρυθμισμένη και συνδεδεμένη πριν προσπαθήσετε ξανά.", + 'help' => "Η βάση δεδομένων είναι απαραίτητη για να έχετε πρόσβαση στο back-end. Ελέγξτε εάν η βάση δεδομένων είναι ρυθμισμένη και συνδεδεμένη πριν προσπαθήσετε ξανά.", 'cms_link' => 'Επιστροφή στην αρχική', - ], + ], ], 'partial' => [ 'not_found_name' => "Το μερικό ':name' δεν βρέθηκε.", @@ -55,7 +55,7 @@ return [ 'ok' => 'Εντάξει', ], 'dashboard' => [ - 'menu_label' => 'Κέντρο Ελένχου', + 'menu_label' => 'Κέντρο Ελένχου', 'widget_label' => 'Widget', 'widget_width' => 'Πλάτος', 'full_width' => 'πλήρες πλάτος', @@ -99,7 +99,7 @@ return [ 'last_sign_in' => 'Η τελευταία σύνδεση σας ήταν', 'view_access_logs' => 'Προβολή του αρχείου καταγραφής προσβάσεων', 'nice_message' => 'Να έχετε μια υπέροχη ημέρα!', - ] + ] ], 'user' => [ 'name' => 'Διαχειριστής', @@ -175,8 +175,8 @@ return [ 'delete_selected_confirm' => 'Να διαγραφούν οι επιλεγμένες εγγραφές;', 'delete_selected_success' => 'Διαγραφή επιλεγμένων εγγραφών.', 'column_switch_true' => 'Ναι', - 'column_switch_false' => 'Όχι' - ], + 'column_switch_false' => 'Όχι' + ], 'fileupload' => [ 'attachment' => 'Επισύναψη', 'help' => 'Προσθέστε τίτλο και περιγραφή για αυτήν την επισύναψη.', @@ -284,7 +284,7 @@ return [ 'reorder' => [ 'default_title' => 'Αναδιάταξη εγγραφών', 'no_records' => 'Δεν υπάρχουν διαθέσιμες εγγραφές για ταξινόμηση.', - ], + ], 'model' => [ 'name' => 'Μοντέλο', 'not_found' => "Η κλάση ':class' του μοντέλου με ID :id δεν μπόρεσε να βρεθεί", diff --git a/modules/backend/lang/es/lang.php b/modules/backend/lang/es/lang.php index 83b739c09..385f69316 100644 --- a/modules/backend/lang/es/lang.php +++ b/modules/backend/lang/es/lang.php @@ -244,7 +244,7 @@ return [ 'find_record' => 'Buscar Registro' ], 'relation' => [ - 'missing_config' => "Relación de comportamiento no tiene ninguna configuración para ':config'.", + 'missing_config' => "Relación de comportamiento no tiene ninguna configuración para ':config'.", 'missing_definition' => "Relación de comportamiento no contiene una definición para ':field'.", 'missing_model' => 'Relación de comportamiento utilizado en :class no tiene un modelo definido.', 'invalid_action_single' => 'Esta acción no se puede realizar en una relación singular.', @@ -279,7 +279,7 @@ return [ 'reorder' => [ 'default_title' => 'Reordenar registros', 'no_records' => 'No existen registros disponibles para ordenar.' - ], + ], 'model' => [ 'name' => 'Modelo', 'not_found' => "Modelo ':class' con el ID :id no se pudo encontrar", diff --git a/modules/backend/lang/it/lang.php b/modules/backend/lang/it/lang.php index e25e745b9..26b3c800e 100644 --- a/modules/backend/lang/it/lang.php +++ b/modules/backend/lang/it/lang.php @@ -86,7 +86,7 @@ return [ 'request_log' => 'Log richieste', 'app_birthday' => 'Online dal', ], - 'welcome' => [ + 'welcome' => [ 'widget_title_default' => 'Benvenuto', 'welcome_back_name' => 'Bentornato su :app, :name.', 'welcome_to_name' => 'Benvenuto su :app, :name.', @@ -238,7 +238,7 @@ return [ 'delete_row' => 'Elimina riga', 'concurrency_file_changed_title' => 'Il file è stato cambiato', 'concurrency_file_changed_description' => "Il file che stavi modificando è stato cambiato da un altro utente. Puoi ricaricare il file e perdere le tue modifiche oppure sovrascrivere il file sul disco.", - 'return_to_list' => 'Ritorna all\'elenco' + 'return_to_list' => 'Ritorna all\'elenco' ], 'recordfinder' => [ 'find_record' => 'Trova record' diff --git a/modules/backend/lang/zh-cn/lang.php b/modules/backend/lang/zh-cn/lang.php index 28fc83eea..f46213025 100644 --- a/modules/backend/lang/zh-cn/lang.php +++ b/modules/backend/lang/zh-cn/lang.php @@ -329,4 +329,3 @@ return [ 'all' => '全部' ] ]; - diff --git a/modules/backend/lang/zh-tw/lang.php b/modules/backend/lang/zh-tw/lang.php index 65dad939d..e475b1486 100644 --- a/modules/backend/lang/zh-tw/lang.php +++ b/modules/backend/lang/zh-tw/lang.php @@ -299,4 +299,4 @@ return [ 'filter' => [ 'all' => '全部' ] -]; \ No newline at end of file +]; diff --git a/modules/backend/models/EditorSetting.php b/modules/backend/models/EditorSetting.php index c32fe8196..d635d34e7 100644 --- a/modules/backend/models/EditorSetting.php +++ b/modules/backend/models/EditorSetting.php @@ -88,7 +88,7 @@ class EditorSetting extends Model { $count = 0; - return array_build($arr, function($key, $value) use (&$count) { + return array_build($arr, function ($key, $value) use (&$count) { return [$count++, ['class_label' => $value, 'class_name' => $key]]; }); } @@ -106,7 +106,7 @@ class EditorSetting extends Model $defaultValue = $instance->getDefaultValue($key); if (is_array($value)) { - $value = array_build($value, function($key, $value) { + $value = array_build($value, function ($key, $value) { return [array_get($value, 'class_name'), array_get($value, 'class_label')]; }); } diff --git a/modules/backend/models/ImportModel.php b/modules/backend/models/ImportModel.php index 8420b0328..98c619b8d 100644 --- a/modules/backend/models/ImportModel.php +++ b/modules/backend/models/ImportModel.php @@ -109,7 +109,7 @@ abstract class ImportModel extends Model $reader = CsvReader::createFromPath($filePath, 'r'); // Filter out empty rows - $reader->addFilter(function(array $row) { + $reader->addFilter(function (array $row) { return count($row) > 1 || reset($row) !== null; }); @@ -233,7 +233,7 @@ abstract class ImportModel extends Model 'Windows-1252' ]; - $translated = array_map(function($option){ + $translated = array_map(function ($option) { return Lang::get('backend::lang.import_export.encodings.'.Str::slug($option, '_')); }, $options); diff --git a/modules/backend/models/Preference.php b/modules/backend/models/Preference.php index a2ca9c72b..cc4fb8042 100644 --- a/modules/backend/models/Preference.php +++ b/modules/backend/models/Preference.php @@ -191,7 +191,7 @@ class Preference extends Model } // Sort the array by offset, identifier ascending - usort($tempTimezones, function($a, $b) { + usort($tempTimezones, function ($a, $b) { return $a['offset'] === $b['offset'] ? strcmp($a['identifier'], $b['identifier']) : $a['offset'] - $b['offset']; diff --git a/modules/backend/traits/FormModelSaver.php b/modules/backend/traits/FormModelSaver.php index 17f42e9a5..2df87ab7c 100644 --- a/modules/backend/traits/FormModelSaver.php +++ b/modules/backend/traits/FormModelSaver.php @@ -100,7 +100,7 @@ trait FormModelSaver $model->addPurgeable($attributesToPurge); } else { - $model->bindEventOnce('model.saveInternal', function() use ($model, $attributesToPurge) { + $model->bindEventOnce('model.saveInternal', function () use ($model, $attributesToPurge) { foreach ($attributesToPurge as $attribute) { unset($model->attributes[$attribute]); } diff --git a/modules/backend/traits/InspectableContainer.php b/modules/backend/traits/InspectableContainer.php index 831f7a358..b36e7f79f 100644 --- a/modules/backend/traits/InspectableContainer.php +++ b/modules/backend/traits/InspectableContainer.php @@ -69,4 +69,4 @@ trait InspectableContainer 'options' => $optionsArray ]; } -} \ No newline at end of file +} diff --git a/modules/backend/traits/WidgetMaker.php b/modules/backend/traits/WidgetMaker.php index 6337637e5..5547f7b83 100644 --- a/modules/backend/traits/WidgetMaker.php +++ b/modules/backend/traits/WidgetMaker.php @@ -7,7 +7,7 @@ use SystemException; /** * Config Maker Trait * - * Adds widget based methods to a controller class, or a class that contains a + * Adds widget based methods to a controller class, or a class that contains a * $controller property referencing a controller. * * @package october\backend diff --git a/modules/backend/widgets/Filter.php b/modules/backend/widgets/Filter.php index 91d82347c..37f5fe72a 100644 --- a/modules/backend/widgets/Filter.php +++ b/modules/backend/widgets/Filter.php @@ -365,7 +365,7 @@ class Filter extends WidgetBase { $filteredOptions = []; - $optionMatchesSearch = function($words, $option) { + $optionMatchesSearch = function ($words, $option) { foreach ($words as $word) { $word = trim($word); if (!strlen($word)) { diff --git a/modules/backend/widgets/Lists.php b/modules/backend/widgets/Lists.php index ef3fb38b8..31f6d7c61 100644 --- a/modules/backend/widgets/Lists.php +++ b/modules/backend/widgets/Lists.php @@ -1173,7 +1173,7 @@ class Lists extends WidgetBase if ($scopeMethod = $this->searchScope) { $searchMethod = $boolean == 'and' ? 'where' : 'orWhere'; - $query->$searchMethod(function($q) use ($term, $columns, $scopeMethod) { + $query->$searchMethod(function ($q) use ($term, $columns, $scopeMethod) { $q->$scopeMethod($term, $columns); }); } @@ -1260,7 +1260,7 @@ class Lists extends WidgetBase */ if ($this->sortColumn === null || !$this->isSortable($this->sortColumn)) { $columns = $this->visibleColumns ?: $this->getVisibleColumns(); - $columns = array_filter($columns, function($column){ return $column->sortable; }); + $columns = array_filter($columns, function ($column) { return $column->sortable; }); $this->sortColumn = key($columns); $this->sortDirection = 'desc'; } @@ -1291,7 +1291,7 @@ class Lists extends WidgetBase } $columns = $this->getColumns(); - $sortable = array_filter($columns, function($column){ + $sortable = array_filter($columns, function ($column) { return $column->sortable; }); diff --git a/modules/backend/widgets/ReportContainer.php b/modules/backend/widgets/ReportContainer.php index 453517029..6abb44506 100644 --- a/modules/backend/widgets/ReportContainer.php +++ b/modules/backend/widgets/ReportContainer.php @@ -98,7 +98,7 @@ class ReportContainer extends WidgetBase } /** - * Ensure report widgets are registered so they can also be bound to + * Ensure report widgets are registered so they can also be bound to * the controller this allows their AJAX features to operate. * @return void */ diff --git a/modules/backend/widgets/Table.php b/modules/backend/widgets/Table.php index 1470bc4ec..f3732e04c 100644 --- a/modules/backend/widgets/Table.php +++ b/modules/backend/widgets/Table.php @@ -10,7 +10,7 @@ use SystemException; * Table Widget. * * Represents an editable tabular control. - * + * * @package october\backend * @author Alexey Bobkov, Samuel Georges */ @@ -156,7 +156,7 @@ class Table extends WidgetBase /** * Converts the columns associative array to a regular array and translates column headers and drop-down options. * Working with regular arrays is much faster in JavaScript. - * References: + * References: * - http://www.smashingmagazine.com/2012/11/05/writing-fast-memory-efficient-javascript/ * - http://jsperf.com/performance-of-array-vs-object/3 */ diff --git a/modules/backend/widgets/table/ClientMemoryDataSource.php b/modules/backend/widgets/table/ClientMemoryDataSource.php index cb1436fba..790ca625d 100644 --- a/modules/backend/widgets/table/ClientMemoryDataSource.php +++ b/modules/backend/widgets/table/ClientMemoryDataSource.php @@ -59,4 +59,4 @@ class ClientMemoryDataSource extends DataSourceBase { return $this->data; } -} \ No newline at end of file +} diff --git a/modules/backend/widgets/table/DataSourceBase.php b/modules/backend/widgets/table/DataSourceBase.php index 80bfccab7..32182c93f 100644 --- a/modules/backend/widgets/table/DataSourceBase.php +++ b/modules/backend/widgets/table/DataSourceBase.php @@ -6,7 +6,7 @@ abstract class DataSourceBase { /** - * @var string Specifies a name of record's key column + * @var string Specifies a name of record's key column */ protected $keyColumn; @@ -75,4 +75,4 @@ abstract class DataSourceBase return $result; } -} \ No newline at end of file +} diff --git a/modules/backend/widgets/table/ServerEventDataSource.php b/modules/backend/widgets/table/ServerEventDataSource.php index 91862cbd5..c7601465c 100644 --- a/modules/backend/widgets/table/ServerEventDataSource.php +++ b/modules/backend/widgets/table/ServerEventDataSource.php @@ -80,4 +80,4 @@ class ServerEventDataSource extends DataSourceBase public function getAllRecords() { } -} \ No newline at end of file +} diff --git a/modules/cms/ServiceProvider.php b/modules/cms/ServiceProvider.php index 646e5b3f7..680f5a238 100644 --- a/modules/cms/ServiceProvider.php +++ b/modules/cms/ServiceProvider.php @@ -73,7 +73,7 @@ class ServiceProvider extends ModuleServiceProvider */ protected function registerThemeLogging() { - CmsObject::extend(function($model) { + CmsObject::extend(function ($model) { ThemeLog::bindEventsToModel($model); }); } @@ -86,7 +86,7 @@ class ServiceProvider extends ModuleServiceProvider /* * Register asset bundles */ - CombineAssets::registerCallback(function($combiner) { + CombineAssets::registerCallback(function ($combiner) { $combiner->registerBundle('~/modules/cms/widgets/mediamanager/assets/js/mediamanager-browser.js'); $combiner->registerBundle('~/modules/cms/widgets/mediamanager/assets/less/mediamanager.less'); }); diff --git a/modules/cms/classes/CmsCompoundObject.php b/modules/cms/classes/CmsCompoundObject.php index c146b8435..c10b960ba 100644 --- a/modules/cms/classes/CmsCompoundObject.php +++ b/modules/cms/classes/CmsCompoundObject.php @@ -207,7 +207,7 @@ class CmsCompoundObject extends CmsObject /** * Returns a component by its name. - * This method is used only in the back-end and for internal system needs when + * This method is used only in the back-end and for internal system needs when * the standard way to access components is not an option. * @param string $componentName Specifies the component name. * @return \Cms\Classes\ComponentBase Returns the component instance or null. @@ -347,7 +347,7 @@ class CmsCompoundObject extends CmsObject /** * Returns the configured view bag component. - * This method is used only in the back-end and for internal system needs when + * This method is used only in the back-end and for internal system needs when * the standard way to access components is not an option. * @return \Cms\Components\ViewBag Returns the view bag component instance. */ diff --git a/modules/cms/classes/CmsObjectCollection.php b/modules/cms/classes/CmsObjectCollection.php index 690462591..57fcb7b56 100644 --- a/modules/cms/classes/CmsObjectCollection.php +++ b/modules/cms/classes/CmsObjectCollection.php @@ -19,7 +19,7 @@ class CmsObjectCollection extends CollectionBase */ public function withComponent($components, $callback = null) { - return $this->filter(function($object) use ($components, $callback) { + return $this->filter(function ($object) use ($components, $callback) { $hasComponent = false; @@ -47,7 +47,7 @@ class CmsObjectCollection extends CollectionBase */ public function where($property, $value, $strict = true) { - return $this->filter(function($object) use ($property, $value, $strict) { + return $this->filter(function ($object) use ($property, $value, $strict) { if (!array_key_exists($property, $object->settings)) { return false; @@ -69,7 +69,7 @@ class CmsObjectCollection extends CollectionBase */ public function whereComponent($components, $property, $value, $strict = false) { - return $this->filter(function($object) use ($components, $property, $value, $strict) { + return $this->filter(function ($object) use ($components, $property, $value, $strict) { $hasComponent = false; diff --git a/modules/cms/classes/CodeParser.php b/modules/cms/classes/CodeParser.php index db4ffd47e..651fc51fa 100644 --- a/modules/cms/classes/CodeParser.php +++ b/modules/cms/classes/CodeParser.php @@ -27,7 +27,7 @@ class CodeParser /** * @var mixed The internal cache, keeps parsed object information during a request. */ - static protected $cache = []; + protected static $cache = []; /** * @var string Key for the parsed PHP file information cache. diff --git a/modules/cms/classes/ComponentBase.php b/modules/cms/classes/ComponentBase.php index 9814207d2..8ccdcd949 100644 --- a/modules/cms/classes/ComponentBase.php +++ b/modules/cms/classes/ComponentBase.php @@ -41,7 +41,7 @@ abstract class ComponentBase extends Extendable public $isHidden = false; /** - * @var string Icon of the plugin that defines the component. + * @var string Icon of the plugin that defines the component. * This field is used by the CMS internally. */ public $pluginIcon; @@ -121,7 +121,7 @@ abstract class ComponentBase extends Extendable } /** - * Executed when this component is bound to a page or layout, part of + * Executed when this component is bound to a page or layout, part of * the page life cycle. */ public function onRun() diff --git a/modules/cms/classes/Controller.php b/modules/cms/classes/Controller.php index b2421d1c2..5bc8ebac1 100644 --- a/modules/cms/classes/Controller.php +++ b/modules/cms/classes/Controller.php @@ -868,7 +868,7 @@ class Controller foreach ($partial->settings['components'] as $component => $properties) { // Do not inject the viewBag component to the environment. // Not sure if they're needed there by the requirements, - // but there were problems with array-typed properties used by Static Pages + // but there were problems with array-typed properties used by Static Pages // snippets and setComponentPropertiesFromParams(). --ab if ($component == 'viewBag') { continue; diff --git a/modules/cms/classes/LayoutCode.php b/modules/cms/classes/LayoutCode.php index 18c737d58..c6a4d4bbe 100644 --- a/modules/cms/classes/LayoutCode.php +++ b/modules/cms/classes/LayoutCode.php @@ -9,7 +9,7 @@ class LayoutCode extends CodeBase { /** - * This event is triggered after the layout components are executed, + * This event is triggered after the layout components are executed, * but before the page's onStart event. */ public function onBeforePageStart() diff --git a/modules/cms/classes/MediaLibrary.php b/modules/cms/classes/MediaLibrary.php index dd1bfb977..c4dbf73eb 100644 --- a/modules/cms/classes/MediaLibrary.php +++ b/modules/cms/classes/MediaLibrary.php @@ -152,14 +152,13 @@ class MediaLibrary $words = explode(' ', Str::lower($searchTerm)); $result = []; - $findInFolder = function($folder) use (&$findInFolder, $words, &$result, $sortBy, $filter) { + $findInFolder = function ($folder) use (&$findInFolder, $words, &$result, $sortBy, $filter) { $folderContents = $this->listFolderContents($folder, $sortBy, $filter); foreach ($folderContents as $item) { if ($item->type == MediaLibraryItem::TYPE_FOLDER) $findInFolder($item->path); - else - if ($this->pathMatchesSearch($item->path, $words)) + elseif ($this->pathMatchesSearch($item->path, $words)) $result[] = $item; } }; @@ -320,7 +319,7 @@ class MediaLibrary { $disk = $this->getStorageDisk(); - $copyDirectory = function($srcPath, $destPath) use (&$copyDirectory, $disk) { + $copyDirectory = function ($srcPath, $destPath) use (&$copyDirectory, $disk) { $srcPath = self::validatePath($srcPath); $fullSrcPath = $this->getMediaPath($srcPath); @@ -621,7 +620,7 @@ class MediaLibrary $files = []; $folders = []; - usort($itemList, function($a, $b) use ($sortBy) { + usort($itemList, function ($a, $b) use ($sortBy) { switch ($sortBy) { case self::SORT_BY_TITLE: return strcasecmp($a->path, $b->path); case self::SORT_BY_SIZE: diff --git a/modules/cms/classes/MediaViewHelper.php b/modules/cms/classes/MediaViewHelper.php index 28ae43ecb..b24d42bbb 100644 --- a/modules/cms/classes/MediaViewHelper.php +++ b/modules/cms/classes/MediaViewHelper.php @@ -103,4 +103,4 @@ class MediaViewHelper } } -} \ No newline at end of file +} diff --git a/modules/cms/classes/Page.php b/modules/cms/classes/Page.php index b25c550f0..f3fb1879f 100644 --- a/modules/cms/classes/Page.php +++ b/modules/cms/classes/Page.php @@ -175,9 +175,9 @@ class Page extends CmsCompoundObject * - url - the menu item URL. Not required for menu item types that return all available records. * The URL should be returned relative to the website root and include the subdirectory, if any. * Use the URL::to() helper to generate the URLs. - * - isActive - determines whether the menu item is active. Not required for menu item types that + * - isActive - determines whether the menu item is active. Not required for menu item types that * return all available records. - * - items - an array of arrays with the same keys (url, isActive, items) + the title key. + * - items - an array of arrays with the same keys (url, isActive, items) + the title key. * The items array should be added only if the $item's $nesting property value is TRUE. * @param \RainLab\Pages\Classes\MenuItem $item Specifies the menu item. * @param string $url Specifies the current page URL, normalized, in lower case diff --git a/modules/cms/classes/Router.php b/modules/cms/classes/Router.php index ee826d460..f971db9e3 100644 --- a/modules/cms/classes/Router.php +++ b/modules/cms/classes/Router.php @@ -21,11 +21,11 @@ use October\Rain\Router\Helper as RouterHelper; *
/blog/:post_id?/comments - although the :post_id parameter is marked as optional,
  * it will be processed as required.
* Optional parameters can have default values which are used as fallback values in case if the real - * parameter value is not presented in the URL. Default values cannot contain the pipe symbols and question marks. + * parameter value is not presented in the URL. Default values cannot contain the pipe symbols and question marks. * Specify the default value after the question mark: *
/blog/category/:category_id?10 - The category_id parameter would be 10 for this URL: /blog/category
* You can also add regular expression validation to parameters. To add a validation expression - * add the pipe symbol after the parameter name (or the question mark) and specify the expression. + * add the pipe symbol after the parameter name (or the question mark) and specify the expression. * The forward slash symbol is not allowed in the expressions. Examples: *
/blog/:post_id|^[0-9]+$/comments - this will match /blog/post/10/comments
  * /blog/:post_id|^[0-9]+$ - this will match /blog/post/3
@@ -209,7 +209,7 @@ class Router
     /**
      * Loads the URL map - a list of page file names and corresponding URL patterns.
      * The URL map can is cached. The clearUrlMap() method resets the cache. By default
-     * the map is updated every time when a page is saved in the back-end, or 
+     * the map is updated every time when a page is saved in the back-end, or
      * when the interval defined with the cms.urlCacheTtl expires.
      * @return boolean Returns true if the URL map was loaded from the cache. Otherwise returns false.
      */
diff --git a/modules/cms/classes/Theme.php b/modules/cms/classes/Theme.php
index 8eba82044..1833d3730 100644
--- a/modules/cms/classes/Theme.php
+++ b/modules/cms/classes/Theme.php
@@ -152,7 +152,7 @@ class Theme
         if (App::hasDatabase()) {
             try {
                 try {
-                    $dbResult = Cache::remember(self::ACTIVE_KEY, 1440, function() {
+                    $dbResult = Cache::remember(self::ACTIVE_KEY, 1440, function () {
                         return Parameter::applyKey(self::ACTIVE_KEY)->pluck('value');
                     });
                 }
@@ -216,7 +216,7 @@ class Theme
 
     /**
      * Sets the active theme.
-     * The active theme code is stored in the database and overrides the configuration cms.activeTheme parameter. 
+     * The active theme code is stored in the database and overrides the configuration cms.activeTheme parameter.
      * @param string $code Specifies the  active theme code.
      */
     public static function setActiveTheme($code)
diff --git a/modules/cms/components/Resources.php b/modules/cms/components/Resources.php
index 18bfb0822..4aba8d953 100644
--- a/modules/cms/components/Resources.php
+++ b/modules/cms/components/Resources.php
@@ -11,17 +11,17 @@ use System\Classes\CombineAssets;
 class Resources extends ComponentBase
 {
     /**
-     * @var string The default JavaScript directory 
+     * @var string The default JavaScript directory
      */
     public $jsDir = 'js';
 
     /**
-     * @var string The default CSS directory 
+     * @var string The default CSS directory
      */
     public $cssDir = 'css';
 
     /**
-     * @var string The default LESS directory 
+     * @var string The default LESS directory
      */
     public $lessDir = 'less';
 
diff --git a/modules/cms/controllers/Media.php b/modules/cms/controllers/Media.php
index c84046f23..b157e75a1 100644
--- a/modules/cms/controllers/Media.php
+++ b/modules/cms/controllers/Media.php
@@ -32,4 +32,4 @@ class Media extends Controller
     {
         $this->bodyClass = 'compact-container';
     }
-}
\ No newline at end of file
+}
diff --git a/modules/cms/facades/Cms.php b/modules/cms/facades/Cms.php
index 21ac2b16e..81931d80b 100644
--- a/modules/cms/facades/Cms.php
+++ b/modules/cms/facades/Cms.php
@@ -6,7 +6,7 @@ class Cms extends Facade
 {
     /**
      * Get the registered name of the component.
-     * 
+     *
      * @see \Cms\Helpers\Cms
      * @return string
      */
diff --git a/modules/cms/formwidgets/MediaFinder.php b/modules/cms/formwidgets/MediaFinder.php
index 4f30f5afa..343c71958 100644
--- a/modules/cms/formwidgets/MediaFinder.php
+++ b/modules/cms/formwidgets/MediaFinder.php
@@ -14,7 +14,7 @@ use Backend\Classes\FormWidgetBase;
  *        label: Some image
  *        type: media
  *        prompt: Click the %s button to find a user
- * 
+ *
  * @package october\cms
  * @author Alexey Bobkov, Samuel Georges
  */
diff --git a/modules/cms/helpers/Cms.php b/modules/cms/helpers/Cms.php
index 22a162d8c..566ce4c53 100644
--- a/modules/cms/helpers/Cms.php
+++ b/modules/cms/helpers/Cms.php
@@ -36,4 +36,4 @@ class Cms
             return Url::to($path);
         }
     }
-}
\ No newline at end of file
+}
diff --git a/modules/cms/lang/el/lang.php b/modules/cms/lang/el/lang.php
index 4d670e7bf..23178dc58 100644
--- a/modules/cms/lang/el/lang.php
+++ b/modules/cms/lang/el/lang.php
@@ -161,7 +161,7 @@ return [
         'new_title' => 'Νέος τίτλος σελίδας',
         'url' => 'URL',
         'filename' => 'Όνομα Αρχείου',
-        'layout' => 'Διάταξη', 
+        'layout' => 'Διάταξη',
         'description' => 'Περιγραφή',
         'preview' => 'Προεπισκόπηση',
         'meta' => 'Meta',
diff --git a/modules/cms/lang/es/lang.php b/modules/cms/lang/es/lang.php
index 63551e1f9..db00d42f1 100644
--- a/modules/cms/lang/es/lang.php
+++ b/modules/cms/lang/es/lang.php
@@ -10,15 +10,15 @@ return [
         'invalid_file_extension' => 'Extensión de archivo inválida: :invalid. Las extensiones permitidas son: :allowed.',
         'error_deleting' => 'Error borrando el archivo template ":name". Por favor, revisa los permisos de escritura.',
         'delete_success' => 'Los templates fueron borrados satisfactoriamente: :count.',
-	'file_name_required' => 'Falta el nombre del campo del archivo.',
-	'safe_mode_enabled' => 'Modo seguro esta actualmente activado.'
+    'file_name_required' => 'Falta el nombre del campo del archivo.',
+    'safe_mode_enabled' => 'Modo seguro esta actualmente activado.'
     ],
     'dashboard' => [
         'active_theme' => [
             'widget_title_default' => 'Sitio Web',
             'online' => 'en línea',
             'maintenance' => 'en mantenimiento',
-	    'manage_themes' => 'Gestionar plantilla'
+        'manage_themes' => 'Gestionar plantilla'
         ]
     ],
     'theme' => [
@@ -34,7 +34,7 @@ return [
         ],
         'settings_menu' => 'Tema para el Front-end',
         'settings_menu_description' => 'Previsualiza la lista de temas instalados y selecciona un tema activo.',
-        'default_tab' => 'Propiedades',		
+        'default_tab' => 'Propiedades',
         'name_label' => 'Nombre',
         'name_create_placeholder' => 'Nombre del nuevo tema',
         'author_label' => 'Autor',
@@ -48,10 +48,10 @@ return [
         'dir_name_label' => 'Nombre del directorio',
         'dir_name_create_label' => 'El directorio de destino del tema',
         'theme_label' => 'Tema',
-        'theme_title' => 'Temas',		
+        'theme_title' => 'Temas',
         'activate_button' => 'Activar',
         'active_button' => 'Activar',
-        'customize_theme' => 'Personalizar Tema',		
+        'customize_theme' => 'Personalizar Tema',
         'customize_button' => 'Personalizar',
         'duplicate_button' => 'Duplicar',
         'duplicate_title' => 'Duplicar tema',
@@ -87,7 +87,7 @@ return [
         'dir_name_invalid' => 'El nombre sólo puede contener dígitos, letras latinas y los siguientes símbolos: _-',
         'dir_name_taken' => 'Este directorio ya existe.',
         'find_more_themes' => 'Buscar nuevos temas',
-        'saving' => 'Salvando tema...',		
+        'saving' => 'Salvando tema...',
         'return' => 'Volver a la lista de temas'
     ],
     'maintenance' => [
@@ -180,7 +180,7 @@ return [
     ],
     'asset' => [
         'menu_label' => 'Assets',
-        'unsaved_label' => 'Asset(s) sin salvar',		
+        'unsaved_label' => 'Asset(s) sin salvar',
         'drop_down_add_title' => 'Añadir...',
         'drop_down_operation_title'    => 'Acción...',
         'upload_files' => 'Subir archivo(s)',
@@ -245,11 +245,11 @@ return [
         'manage_layouts' => 'Gestionar diseños',
         'manage_partials' => 'Gestionar parciales',
         'manage_themes' => 'Gestionar plantilla',
-        'manage_media' => 'Gestionar media'		
+        'manage_media' => 'Gestionar media'
     ],
     'mediafinder' => [
         'default_prompt' => 'Haga clic en el botón de %s para buscar un elemento multimedia'
-    ],	
+    ],
     'media' => [
         'invalid_path' => "Ruta de archivo especificada no válida: ':path'.",
         'menu_label' => 'Media',
@@ -258,7 +258,7 @@ return [
         'delete' => 'Eliminar',
         'add_folder' => 'Nueva carpeta',
         'search' => 'Buscar',
-        'display' => 'Mostrar',		
+        'display' => 'Mostrar',
         'filter_everything' => 'Todo',
         'filter_images' => 'Imágenes',
         'filter_video' => 'Vídeos',
@@ -278,8 +278,8 @@ return [
         'multiple_selected' => 'Se han selecciondo varios elementos.',
         'uploading_file_num' => 'Subiendo :number archivo(s)...',
         'uploading_complete' => 'Subida completada',
-        'uploading_error' => 'Error al subir',		
-	'type_blocked' => 'El tipo de archivo usado a sido bloqueado por motivos de seguridad.',
+        'uploading_error' => 'Error al subir',
+    'type_blocked' => 'El tipo de archivo usado a sido bloqueado por motivos de seguridad.',
         'order_by' => 'Ordenar por',
         'folder' => 'Carpeta',
         'no_files_found' => 'No se han encontrado archivos.',
diff --git a/modules/cms/lang/zh-tw/lang.php b/modules/cms/lang/zh-tw/lang.php
index 47cfedae7..e59cb2e27 100644
--- a/modules/cms/lang/zh-tw/lang.php
+++ b/modules/cms/lang/zh-tw/lang.php
@@ -299,4 +299,4 @@ return [
         'image_size' => '圖片大小:',
         'selected_size' => '選中:'
     ]
-];
\ No newline at end of file
+];
diff --git a/modules/cms/models/ThemeExport.php b/modules/cms/models/ThemeExport.php
index bd6fa5c79..f128ffb7f 100644
--- a/modules/cms/models/ThemeExport.php
+++ b/modules/cms/models/ThemeExport.php
@@ -138,4 +138,4 @@ class ThemeExport extends Model
         return $result;
     }
 
-}
\ No newline at end of file
+}
diff --git a/modules/cms/models/ThemeImport.php b/modules/cms/models/ThemeImport.php
index 59e78fe04..d9f19ecfc 100644
--- a/modules/cms/models/ThemeImport.php
+++ b/modules/cms/models/ThemeImport.php
@@ -181,4 +181,4 @@ class ThemeImport extends Model
         return true;
     }
 
-}
\ No newline at end of file
+}
diff --git a/modules/cms/models/ThemeLog.php b/modules/cms/models/ThemeLog.php
index 014080e47..05f817e85 100644
--- a/modules/cms/models/ThemeLog.php
+++ b/modules/cms/models/ThemeLog.php
@@ -39,11 +39,11 @@ class ThemeLog extends Model
      */
     public static function bindEventsToModel(HalcyonModel $template)
     {
-        $template->bindEvent('model.beforeDelete', function() use ($template) {
+        $template->bindEvent('model.beforeDelete', function () use ($template) {
             self::add($template, self::TYPE_DELETE);
         });
 
-        $template->bindEvent('model.beforeSave', function() use ($template) {
+        $template->bindEvent('model.beforeSave', function () use ($template) {
             self::add($template, $template->exists ? self::TYPE_UPDATE : self::TYPE_CREATE);
         });
     }
diff --git a/modules/cms/widgets/MediaManager.php b/modules/cms/widgets/MediaManager.php
index be0630f8c..2bbbdee07 100644
--- a/modules/cms/widgets/MediaManager.php
+++ b/modules/cms/widgets/MediaManager.php
@@ -247,7 +247,7 @@ class MediaManager extends WidgetBase
                  */
                 $filesToDelete[] = $path;
             }
-            else if ($type === MediaLibraryItem::TYPE_FOLDER) {
+            elseif ($type === MediaLibraryItem::TYPE_FOLDER) {
                 /*
                  * Delete single folder
                  */
@@ -943,7 +943,7 @@ class MediaManager extends WidgetBase
                 'isError' => false,
                 'imageUrl' => $this->getThumbnailImageUrl($thumbnailPath)
             ]);
-        } 
+        }
         catch (Exception $ex) {
             if ($tempFilePath) {
                 File::delete($tempFilePath);
diff --git a/modules/cms/widgets/TemplateList.php b/modules/cms/widgets/TemplateList.php
index 593db8146..52fd243a5 100644
--- a/modules/cms/widgets/TemplateList.php
+++ b/modules/cms/widgets/TemplateList.php
@@ -72,7 +72,7 @@ class TemplateList extends WidgetBase
     public $ignoreDirectories = [];
 
     /**
-     * @var boolean Defines sorting properties. 
+     * @var boolean Defines sorting properties.
      * The sorting feature is disabled if there are no sorting properties defined.
      */
     public $sortingProperties = [];
@@ -233,7 +233,7 @@ class TemplateList extends WidgetBase
             }
         }
 
-        // Sort folders by name regardless of the 
+        // Sort folders by name regardless of the
         // selected sorting options.
         ksort($foundGroups);
 
@@ -261,7 +261,7 @@ class TemplateList extends WidgetBase
 
         $ignoreCache = [];
 
-        $items = array_filter($items, function($item) use (&$ignoreCache) {
+        $items = array_filter($items, function ($item) use (&$ignoreCache) {
             $fileName = $item->getBaseFileName();
             $dirName = dirname($fileName);
 
diff --git a/modules/system/ServiceProvider.php b/modules/system/ServiceProvider.php
index aaf2ca014..83a50ff98 100644
--- a/modules/system/ServiceProvider.php
+++ b/modules/system/ServiceProvider.php
@@ -198,7 +198,7 @@ class ServiceProvider extends ModuleServiceProvider
         /*
          * Allow plugins to use the scheduler
          */
-        Event::listen('console.schedule', function($schedule) {
+        Event::listen('console.schedule', function ($schedule) {
             $plugins = PluginManager::instance()->getPlugins();
             foreach ($plugins as $plugin) {
                 if (method_exists($plugin, 'registerSchedule')) {
@@ -210,7 +210,7 @@ class ServiceProvider extends ModuleServiceProvider
         /*
          * Add CMS based cache clearing to native command
          */
-        Event::listen('cache:cleared', function() {
+        Event::listen('cache:cleared', function () {
             \System\Helpers\Cache::clearInternal();
         });
 
@@ -241,7 +241,7 @@ class ServiceProvider extends ModuleServiceProvider
      */
     protected function registerErrorHandler()
     {
-        Event::listen('exception.beforeRender', function ($exception, $httpCode, $request){
+        Event::listen('exception.beforeRender', function ($exception, $httpCode, $request) {
             $handler = new ErrorHandler;
             return $handler->handleException($exception);
         });
@@ -377,7 +377,7 @@ class ServiceProvider extends ModuleServiceProvider
      */
     protected function registerBackendSettings()
     {
-        Event::listen('system.settings.extendItems', function($manager) {
+        Event::listen('system.settings.extendItems', function ($manager) {
             \System\Models\LogSetting::filterSettingItems($manager);
         });
 
@@ -460,7 +460,7 @@ class ServiceProvider extends ModuleServiceProvider
         /*
          * Register asset bundles
          */
-        CombineAssets::registerCallback(function($combiner) {
+        CombineAssets::registerCallback(function ($combiner) {
             $combiner->registerBundle('~/modules/system/assets/less/styles.less');
             $combiner->registerBundle('~/modules/system/assets/ui/storm.less');
             $combiner->registerBundle('~/modules/system/assets/ui/storm.js');
@@ -476,12 +476,12 @@ class ServiceProvider extends ModuleServiceProvider
          * Allowed file extensions, as opposed to mime types.
          * - extensions: png,jpg,txt
          */
-        Validator::extend('extensions', function($attribute, $value, $parameters) {
+        Validator::extend('extensions', function ($attribute, $value, $parameters) {
             $extension = strtolower($value->getClientOriginalExtension());
             return in_array($extension, $parameters);
         });
 
-        Validator::replacer('extensions', function($message, $attribute, $rule, $parameters) {
+        Validator::replacer('extensions', function ($message, $attribute, $rule, $parameters) {
             return strtr($message, [':values' => implode(', ', $parameters)]);
         });
     }
diff --git a/modules/system/classes/CombineAssets.php b/modules/system/classes/CombineAssets.php
index 5d7ad25c7..7d6ef36be 100644
--- a/modules/system/classes/CombineAssets.php
+++ b/modules/system/classes/CombineAssets.php
@@ -457,7 +457,7 @@ class CombineAssets
     {
         $key = '';
 
-        $assetFiles = array_map(function($file) {
+        $assetFiles = array_map(function ($file) {
             return File::symbolizePath($file, null) ?: $this->localPath . $file;
         }, $assets);
 
@@ -524,7 +524,7 @@ class CombineAssets
     /**
      * Registers a callback function that defines bundles.
      * The callback function should register bundles by calling the manager's
-     * `registerBundle` method. Thi instance is passed to the callback 
+     * `registerBundle` method. Thi instance is passed to the callback
      * function as an argument. Usage:
      *
      *     CombineAssets::registerCallback(function($combiner){
diff --git a/modules/system/classes/ComposerManager.php b/modules/system/classes/ComposerManager.php
index 8d14297f0..350e2f128 100644
--- a/modules/system/classes/ComposerManager.php
+++ b/modules/system/classes/ComposerManager.php
@@ -121,4 +121,4 @@ class ComposerManager
 
         return $path;
     }
-}
\ No newline at end of file
+}
diff --git a/modules/system/classes/MarkupManager.php b/modules/system/classes/MarkupManager.php
index 4bea02d2c..6d63463f9 100644
--- a/modules/system/classes/MarkupManager.php
+++ b/modules/system/classes/MarkupManager.php
@@ -97,7 +97,7 @@ class MarkupManager
 
     /**
      * Registers the CMS Twig extension items.
-     * The argument is an array of the extension definitions. The array keys represent the 
+     * The argument is an array of the extension definitions. The array keys represent the
      * function/filter name, specific for the plugin/module. Each element in the
      * array should be an associative array.
      * @param string $type The extension type: filters, functions, tokens
@@ -291,7 +291,7 @@ class MarkupManager
     }
 
     /**
-     * Tests if a callable type contains a wildcard, also acts as a 
+     * Tests if a callable type contains a wildcard, also acts as a
      * utility to replace the wildcard with a string.
      * @param  callable  $callable
      * @param  string|bool $replaceWith
diff --git a/modules/system/classes/PluginBase.php b/modules/system/classes/PluginBase.php
index 10f80fb24..8dbac748d 100644
--- a/modules/system/classes/PluginBase.php
+++ b/modules/system/classes/PluginBase.php
@@ -107,7 +107,7 @@ class PluginBase extends ServiceProviderBase
             $navigation = $configuration['navigation'];
 
             if (is_array($navigation)) {
-                array_walk_recursive($navigation, function(&$item, $key){
+                array_walk_recursive($navigation, function (&$item, $key) {
                     if ($key === 'url') {
                         $item = Backend::url($item);
                     }
diff --git a/modules/system/classes/SettingsManager.php b/modules/system/classes/SettingsManager.php
index 207024c37..b3741aca4 100644
--- a/modules/system/classes/SettingsManager.php
+++ b/modules/system/classes/SettingsManager.php
@@ -207,8 +207,8 @@ class SettingsManager
 
     /**
      * Registers the back-end setting items.
-     * The argument is an array of the settings items. The array keys represent the 
-     * setting item codes, specific for the plugin/module. Each element in the 
+     * The argument is an array of the settings items. The array keys represent the
+     * setting item codes, specific for the plugin/module. Each element in the
      * array should be an associative array with the following keys:
      * - label - specifies the settings label localization string key, required.
      * - icon - an icon name from the Font Awesome icon collection, required.
diff --git a/modules/system/console/OctoberEnv.php b/modules/system/console/OctoberEnv.php
index 960e85a25..1eff2d6a5 100644
--- a/modules/system/console/OctoberEnv.php
+++ b/modules/system/console/OctoberEnv.php
@@ -194,7 +194,7 @@ class OctoberEnv extends Command
      */
     private function saveEnvSettings($key, $value)
     {
-        if ( ! $this->envKeyExists($key)) {
+        if (! $this->envKeyExists($key)) {
             $line = sprintf("%s=%s\n", $key, $this->stripQuotes($value));
 
             if ($this->config == 'database' && $key != 'DB_CONNECTION') {
@@ -394,4 +394,4 @@ class OctoberEnv extends Command
         ];
     }
 
-}
\ No newline at end of file
+}
diff --git a/modules/system/console/OctoberUtil.php b/modules/system/console/OctoberUtil.php
index 74c05669b..e0c6bfc1d 100644
--- a/modules/system/console/OctoberUtil.php
+++ b/modules/system/console/OctoberUtil.php
@@ -59,9 +59,9 @@ class OctoberUtil extends Command
         $method = 'util'.studly_case($command);
 
         $methods = preg_grep('/^util/', get_class_methods(get_called_class()));
-        $list = array_map(function($item){
+        $list = array_map(function ($item) {
             return "october:".snake_case($item, " ");
-        },$methods);
+        }, $methods);
 
         if (!$this->argument('name')) {
             $message = 'There are no commands defined in the "util" namespace.';
diff --git a/modules/system/helpers/View.php b/modules/system/helpers/View.php
index d2bbfc5f6..ba946bf13 100644
--- a/modules/system/helpers/View.php
+++ b/modules/system/helpers/View.php
@@ -21,7 +21,7 @@ class View
             return static::$globalVarCache;
         }
 
-        $vars = array_filter(ViewFacade::getShared(), function($var) {
+        $vars = array_filter(ViewFacade::getShared(), function ($var) {
             return is_scalar($var) || is_array($var);
         });
 
diff --git a/modules/system/lang/bg/client.php b/modules/system/lang/bg/client.php
index 274d8575a..8dd7413e2 100644
--- a/modules/system/lang/bg/client.php
+++ b/modules/system/lang/bg/client.php
@@ -45,4 +45,4 @@ return [
         'confirm_button_text' => 'Потвърди',
         'cancel_button_text' => 'Откажи',
     ],
-];
\ No newline at end of file
+];
diff --git a/modules/system/lang/cs/client.php b/modules/system/lang/cs/client.php
index c6a276222..1bd9e3875 100644
--- a/modules/system/lang/cs/client.php
+++ b/modules/system/lang/cs/client.php
@@ -52,6 +52,3 @@ return [
     ],
 
 ];
-
-
-
diff --git a/modules/system/lang/el/client.php b/modules/system/lang/el/client.php
index ee4a92798..a7d336451 100644
--- a/modules/system/lang/el/client.php
+++ b/modules/system/lang/el/client.php
@@ -49,9 +49,9 @@ return [
     'datepicker' => [
         'previousMonth' => 'Προηγούμενος Μήνας',
         'nextMonth' => 'Επόμενος Μήνας',
-        'months' => ['Ιανουάριος', 'Φεβρουάριος', 'Μάρτιος', 'Απρίλιος', 'Μάιος', 'Ιούνιος', 'Ιούλιος', 'Αύγουστος', 'Σεπτέμβριος', 'Οκτώβριος', 'Νοέμβριος', 'Δεκέμβριος'], 
-        'weekdays' => ['Κυριακή', 'Δευτέρα', 'Τρίτη', 'Τετάρτη', 'Πέμπτη', 'Παρασκευή', 'Σάββατο'], 
-        'weekdaysShort' => ['Κυρ', 'Δευ', 'Τρι', 'Τετ', 'Πεμ', 'Παρ', 'Σαβ'] 
+        'months' => ['Ιανουάριος', 'Φεβρουάριος', 'Μάρτιος', 'Απρίλιος', 'Μάιος', 'Ιούνιος', 'Ιούλιος', 'Αύγουστος', 'Σεπτέμβριος', 'Οκτώβριος', 'Νοέμβριος', 'Δεκέμβριος'],
+        'weekdays' => ['Κυριακή', 'Δευτέρα', 'Τρίτη', 'Τετάρτη', 'Πέμπτη', 'Παρασκευή', 'Σάββατο'],
+        'weekdaysShort' => ['Κυρ', 'Δευ', 'Τρι', 'Τετ', 'Πεμ', 'Παρ', 'Σαβ']
     ],
     'filter' => [
         'group' => [
diff --git a/modules/system/lang/el/lang.php b/modules/system/lang/el/lang.php
index 99ca8b605..75ce357ca 100644
--- a/modules/system/lang/el/lang.php
+++ b/modules/system/lang/el/lang.php
@@ -156,7 +156,7 @@ return [
         'menu_layouts_label' => 'Πρότυπα Ηλεκτρονικού Ταχυδρομείου',
         'layout' => 'Διάταξη',
         'layouts' => 'Διάταξεις',
-        'no_layout' => '-- Χωρίς διάταξη --',        
+        'no_layout' => '-- Χωρίς διάταξη --',
         'name' => 'Όνομα',
         'name_comment' => 'Μοναδικό όνομα που χρησιμοποιείται για την αναφορά σε αυτό το πρότυπο',
         'code' => 'Κωδικος',
diff --git a/modules/system/lang/es/validation.php b/modules/system/lang/es/validation.php
index 9ae8f667c..57702b00e 100644
--- a/modules/system/lang/es/validation.php
+++ b/modules/system/lang/es/validation.php
@@ -46,7 +46,7 @@ return [
         "array"   => "El campo :attribute no debe tener más de :max elementos."
     ],
     "mimes"            => "El campo :attribute debe ser un archivo del tipo: :values.",
-    "extensions"       => "El campo :attribute debe tener una extensión de: :values.",	
+    "extensions"       => "El campo :attribute debe tener una extensión de: :values.",
     "min"              => [
         "numeric" => "El campo :attribute debe ser :min o más.",
         "file"    => "El campo :attribute debe ocupar :min kilobytes o más.",
diff --git a/modules/system/lang/pl/lang.php b/modules/system/lang/pl/lang.php
index 33c1d5f83..a7a41b41a 100644
--- a/modules/system/lang/pl/lang.php
+++ b/modules/system/lang/pl/lang.php
@@ -32,7 +32,7 @@ return [
             'my_settings' => 'Moje Ustawienia'
         ]
     ],
-	'theme' => [
+    'theme' => [
         'label' => 'Motyw',
         'unnamed' => 'Nienazwany motyw',
         'name' => [
@@ -49,7 +49,7 @@ return [
         'remove_confirm' => 'Na pewno usunąć ten motyw?'
     ],
     'plugin' => [
-		'label' => 'Wtyczka',
+        'label' => 'Wtyczka',
         'unnamed' => 'Wtyczka bez nazwy',
         'name' => [
             'label' => 'Nazwa Wtyczki',
@@ -60,7 +60,7 @@ return [
         'manage' => 'Zarządzaj Wtyczkami',
         'enable_or_disable' => 'Włącz lub wyłącz',
         'enable_or_disable_title' => 'Włącz lub Wyłącz Wtyczki',
-		'install' => 'Zainstaluj wtyczki',
+        'install' => 'Zainstaluj wtyczki',
         'install_products' => 'Zainstaluj produkty',
         'search' => 'szukaj wtyczek do instalacji...',
         'installed' => 'Zainstalowane wtyczki',
@@ -70,7 +70,7 @@ return [
         'refresh' => 'Odśwież',
         'disabled_label' => 'Wyłączona',
         'disabled_help' => 'Wyłączone wtyczki są ignorowane przez aplikację.',
-		'frozen_label' => 'Zablokuj zaktualizacje',
+        'frozen_label' => 'Zablokuj zaktualizacje',
         'frozen_help' => 'Zamrożone wtyczki będą pomijane w procesie aktualizacji.',
         'selected_amount' => 'Zaznaczono wtyczek: :amount',
         'remove_confirm' => 'Czy jesteś pewny?',
@@ -133,7 +133,7 @@ return [
         'mailgun_domain_comment' => 'Proszę podać nazwę domeny Mailgun.',
         'mailgun_secret' => 'Mailgun Secret',
         'mailgun_secret_comment' => 'Podaj swój klucz API Mailgun.',
-		'mandrill' => 'Mandrill',
+        'mandrill' => 'Mandrill',
         'mandrill_secret' => 'Mandrill secret',
         'mandrill_secret_comment' => 'Podaj swój klucz API Mandrill.',
         'ses' => 'SES',
@@ -184,9 +184,9 @@ return [
     'install' => [
         'project_label' => 'Podłącz do Projektu',
         'plugin_label' => 'Zainstaluj Wtyczkę',
-		'theme_label' => 'Zainstaluj Motyw',
+        'theme_label' => 'Zainstaluj Motyw',
         'missing_plugin_name' => 'Proszę podać nazwę Wtyczki do zainstalowania.',
-		'missing_theme_name' => 'Proszę podać nazwę Motywu do zainstalowania.',
+        'missing_theme_name' => 'Proszę podać nazwę Motywu do zainstalowania.',
         'install_completing' => 'Proces instalacji prawie zakończony.',
         'install_success' => 'Wtyczka została zainstalowana pomyślnie.'
     ],
@@ -195,11 +195,11 @@ return [
         'name' => 'Aktualizacje',
         'menu_label' => 'Aktualizacje',
         'menu_description' => 'Aktualizacja systemu, zarządzaj i instaluj wtyczki oraz szablony.',
-		'return_link' => 'Wróć do aktualizacji systemu',
+        'return_link' => 'Wróć do aktualizacji systemu',
         'check_label' => 'Sprawdź aktualizacje',
         'retry_label' => 'Spróbuj ponownie',
         'plugin_name' => 'Nazwa',
-		'plugin_code' => 'Kod',
+        'plugin_code' => 'Kod',
         'plugin_description' => 'Opis',
         'plugin_version' => 'Wersja',
         'plugin_author' => 'Autor',
@@ -210,12 +210,12 @@ return [
         'core_downloading' => 'Pobieranie plików aplikacji',
         'core_extracting' => 'Rozpakowywanie plików aplikacji',
         'plugins' => 'Wtyczki',
-		'themes' => 'Motywy',
+        'themes' => 'Motywy',
         'disabled' => 'Wyłączony',
         'plugin_downloading' => 'Pobieranie wtyczki: :name',
         'plugin_extracting' => 'Rozpakowywanie wtyczki: :name',
         'plugin_version_none' => 'Nowa wtyczka',
-		'plugin_current_version' => 'Aktualna wersja',
+        'plugin_current_version' => 'Aktualna wersja',
         'theme_new_install' => 'Zainstaluj nowy motyw.',
         'theme_downloading' => 'Pobieranie nowego motywu: :name',
         'theme_extracting' => 'Rozpakowywanie motywu: :name',
@@ -233,7 +233,7 @@ return [
             'label' => 'Brak aktualizacji',
             'help' => 'Brak nowych aktualizacji.'
         ],
-		'important_action' => [
+        'important_action' => [
             'empty' => 'Wybierz działanie',
             'confirm' => 'Zatwierdź aktualizację',
             'skip' => 'Pomiń tę wtyczkę (tylko teraz)',
@@ -304,13 +304,13 @@ return [
         'name' => 'System',
         'manage_system_settings' => 'Zarządzaj ustawienia systemu',
         'manage_software_updates' => 'Zarządzaj aktualizacjami – software',
-		'access_logs' => 'Przeglądaj logi systemowe',
+        'access_logs' => 'Przeglądaj logi systemowe',
         'manage_mail_templates' => 'Zarządzaj szablonami wiadomości',
         'manage_mail_settings' => 'Zarządzaj ustawieniami wiadomości',
         'manage_other_administrators' => 'Zarządzaj innymi administratorami',
         'manage_preferences' => 'Zarządzaj ustawieniami backend',
         'manage_editor' => 'Zarządzaj ustawieniami edytora kodu',
         'view_the_dashboard' => 'Zobacz kokpit',
-		'manage_branding' => 'Personalizuj zaplecze'
+        'manage_branding' => 'Personalizuj zaplecze'
     ]
 ];
diff --git a/modules/system/lang/ro/client.php b/modules/system/lang/ro/client.php
index 43dc1578b..b02cd92fe 100644
--- a/modules/system/lang/ro/client.php
+++ b/modules/system/lang/ro/client.php
@@ -52,6 +52,3 @@ return [
     ],
 
 ];
-
-
-
diff --git a/modules/system/lang/sv/client.php b/modules/system/lang/sv/client.php
index 2a5f3f9b5..158315d76 100644
--- a/modules/system/lang/sv/client.php
+++ b/modules/system/lang/sv/client.php
@@ -52,6 +52,3 @@ return [
     ],
 
 ];
-
-
-
diff --git a/modules/system/lang/zh-tw/lang.php b/modules/system/lang/zh-tw/lang.php
index 5081e0606..815d9699e 100644
--- a/modules/system/lang/zh-tw/lang.php
+++ b/modules/system/lang/zh-tw/lang.php
@@ -261,4 +261,4 @@ return [
         'view_the_dashboard' => '查看儀表板',
         'manage_branding' => '自訂後台'
     ]
-];
\ No newline at end of file
+];
diff --git a/modules/system/traits/AssetMaker.php b/modules/system/traits/AssetMaker.php
index d8a200e46..4637af7a0 100644
--- a/modules/system/traits/AssetMaker.php
+++ b/modules/system/traits/AssetMaker.php
@@ -102,7 +102,7 @@ trait AssetMaker
     }
 
     /**
-     * Adds JavaScript asset to the asset list. Call $this->makeAssets() in a view 
+     * Adds JavaScript asset to the asset list. Call $this->makeAssets() in a view
      * to output corresponding markup.
      * @param string $name Specifies a path (URL) to the script.
      * @param array $attributes Adds extra HTML attributes to the asset link.
diff --git a/modules/system/traits/ConfigMaker.php b/modules/system/traits/ConfigMaker.php
index c01252581..80094e318 100644
--- a/modules/system/traits/ConfigMaker.php
+++ b/modules/system/traits/ConfigMaker.php
@@ -100,7 +100,7 @@ trait ConfigMaker
     }
 
     /**
-     * Makes a config object from an array, making the first level keys properties a new object. 
+     * Makes a config object from an array, making the first level keys properties a new object.
      * Property values are converted to camelCase and are not set if one already exists.
      * @param array $configArray Config array.
      * @return stdClass The config object
diff --git a/modules/system/traits/PropertyContainer.php b/modules/system/traits/PropertyContainer.php
index d15ec7bdf..9760783b4 100644
--- a/modules/system/traits/PropertyContainer.php
+++ b/modules/system/traits/PropertyContainer.php
@@ -3,7 +3,7 @@
 /**
  * Property container trait
  *
- * Adds properties and methods for classes that could define properties, 
+ * Adds properties and methods for classes that could define properties,
  * like components or report widgets.
  *
  * @package october\system
diff --git a/tests/fixtures/plugins/database/tester/Plugin.php b/tests/fixtures/plugins/database/tester/Plugin.php
index 4cad4adf7..ad118519f 100644
--- a/tests/fixtures/plugins/database/tester/Plugin.php
+++ b/tests/fixtures/plugins/database/tester/Plugin.php
@@ -14,4 +14,4 @@ class Plugin extends PluginBase
         ];
     }
 
-}
\ No newline at end of file
+}
diff --git a/tests/fixtures/plugins/database/tester/models/Category.php b/tests/fixtures/plugins/database/tester/models/Category.php
index f839280a5..60deaf7ae 100644
--- a/tests/fixtures/plugins/database/tester/models/Category.php
+++ b/tests/fixtures/plugins/database/tester/models/Category.php
@@ -29,4 +29,4 @@ class CategoryNested extends Category
      * @var string The database table used by the model.
      */
     public $table = 'database_tester_categories_nested';
-}
\ No newline at end of file
+}
diff --git a/tests/fixtures/plugins/database/tester/models/Phone.php b/tests/fixtures/plugins/database/tester/models/Phone.php
index f123e96ef..ffbd8e8cf 100644
--- a/tests/fixtures/plugins/database/tester/models/Phone.php
+++ b/tests/fixtures/plugins/database/tester/models/Phone.php
@@ -27,4 +27,4 @@ class Phone extends Model
         'author' => 'Database\Tester\Models\Author',
     ];
 
-}
\ No newline at end of file
+}
diff --git a/tests/fixtures/plugins/database/tester/models/User.php b/tests/fixtures/plugins/database/tester/models/User.php
index b22916357..6c4e42b8c 100644
--- a/tests/fixtures/plugins/database/tester/models/User.php
+++ b/tests/fixtures/plugins/database/tester/models/User.php
@@ -54,4 +54,4 @@ class UserWithAuthorAndSoftDelete extends UserWithAuthor
 class UserWithSoftAuthorAndSoftDelete extends UserWithSoftAuthor
 {
     use \October\Rain\Database\Traits\SoftDelete;
-}
\ No newline at end of file
+}
diff --git a/tests/fixtures/plugins/database/tester/updates/create_authors_table.php b/tests/fixtures/plugins/database/tester/updates/create_authors_table.php
index bbed9c7b7..2e542580a 100644
--- a/tests/fixtures/plugins/database/tester/updates/create_authors_table.php
+++ b/tests/fixtures/plugins/database/tester/updates/create_authors_table.php
@@ -8,7 +8,7 @@ class CreateAuthorsTable extends Migration
 
     public function up()
     {
-        Schema::create('database_tester_authors', function($table)
+        Schema::create('database_tester_authors', function ($table)
         {
             $table->engine = 'InnoDB';
             $table->increments('id');
diff --git a/tests/fixtures/plugins/database/tester/updates/create_categories_table.php b/tests/fixtures/plugins/database/tester/updates/create_categories_table.php
index 9c3373244..49cf8a1c1 100644
--- a/tests/fixtures/plugins/database/tester/updates/create_categories_table.php
+++ b/tests/fixtures/plugins/database/tester/updates/create_categories_table.php
@@ -8,7 +8,7 @@ class CreateCategoriesTable extends Migration
 
     public function up()
     {
-        Schema::create('database_tester_categories', function($table)
+        Schema::create('database_tester_categories', function ($table)
         {
             $table->engine = 'InnoDB';
             $table->increments('id');
@@ -22,7 +22,7 @@ class CreateCategoriesTable extends Migration
             $table->softDeletes();
         });
 
-        Schema::create('database_tester_categories_nested', function($table)
+        Schema::create('database_tester_categories_nested', function ($table)
         {
             $table->engine = 'InnoDB';
             $table->increments('id');
diff --git a/tests/fixtures/plugins/database/tester/updates/create_event_log_table.php b/tests/fixtures/plugins/database/tester/updates/create_event_log_table.php
index 30a1d4c16..8539d85d8 100644
--- a/tests/fixtures/plugins/database/tester/updates/create_event_log_table.php
+++ b/tests/fixtures/plugins/database/tester/updates/create_event_log_table.php
@@ -8,7 +8,7 @@ class CreateEventLogTable extends Migration
 
     public function up()
     {
-        Schema::create('database_tester_event_log', function($table)
+        Schema::create('database_tester_event_log', function ($table)
         {
             $table->engine = 'InnoDB';
             $table->increments('id');
diff --git a/tests/fixtures/plugins/database/tester/updates/create_meta_table.php b/tests/fixtures/plugins/database/tester/updates/create_meta_table.php
index 3d942798c..3add13d2c 100644
--- a/tests/fixtures/plugins/database/tester/updates/create_meta_table.php
+++ b/tests/fixtures/plugins/database/tester/updates/create_meta_table.php
@@ -8,7 +8,7 @@ class CreateMetaTable extends Migration
 
     public function up()
     {
-        Schema::create('database_tester_meta', function($table)
+        Schema::create('database_tester_meta', function ($table)
         {
             $table->engine = 'InnoDB';
             $table->increments('id')->unsigned();
diff --git a/tests/fixtures/plugins/database/tester/updates/create_phones_table.php b/tests/fixtures/plugins/database/tester/updates/create_phones_table.php
index 5af8ef778..891344c27 100644
--- a/tests/fixtures/plugins/database/tester/updates/create_phones_table.php
+++ b/tests/fixtures/plugins/database/tester/updates/create_phones_table.php
@@ -8,7 +8,7 @@ class CreatePhonesTable extends Migration
 
     public function up()
     {
-        Schema::create('database_tester_phones', function($table)
+        Schema::create('database_tester_phones', function ($table)
         {
             $table->engine = 'InnoDB';
             $table->increments('id');
diff --git a/tests/fixtures/plugins/database/tester/updates/create_posts_table.php b/tests/fixtures/plugins/database/tester/updates/create_posts_table.php
index 9a4a24798..139ea288f 100644
--- a/tests/fixtures/plugins/database/tester/updates/create_posts_table.php
+++ b/tests/fixtures/plugins/database/tester/updates/create_posts_table.php
@@ -8,7 +8,7 @@ class CreatePostsTable extends Migration
 
     public function up()
     {
-        Schema::create('database_tester_posts', function($table)
+        Schema::create('database_tester_posts', function ($table)
         {
             $table->engine = 'InnoDB';
             $table->increments('id');
diff --git a/tests/fixtures/plugins/database/tester/updates/create_roles_table.php b/tests/fixtures/plugins/database/tester/updates/create_roles_table.php
index 6af4d48d6..6ed84b4c9 100644
--- a/tests/fixtures/plugins/database/tester/updates/create_roles_table.php
+++ b/tests/fixtures/plugins/database/tester/updates/create_roles_table.php
@@ -8,7 +8,7 @@ class CreateRolesTable extends Migration
 
     public function up()
     {
-        Schema::create('database_tester_roles', function($table)
+        Schema::create('database_tester_roles', function ($table)
         {
             $table->engine = 'InnoDB';
             $table->increments('id');
@@ -17,7 +17,7 @@ class CreateRolesTable extends Migration
             $table->timestamps();
         });
 
-        Schema::create('database_tester_authors_roles', function($table)
+        Schema::create('database_tester_authors_roles', function ($table)
         {
             $table->engine = 'InnoDB';
             $table->integer('author_id')->unsigned();
diff --git a/tests/fixtures/plugins/database/tester/updates/create_users_table.php b/tests/fixtures/plugins/database/tester/updates/create_users_table.php
index 1025138c7..13838f474 100644
--- a/tests/fixtures/plugins/database/tester/updates/create_users_table.php
+++ b/tests/fixtures/plugins/database/tester/updates/create_users_table.php
@@ -8,7 +8,7 @@ class CreateUsersTable extends Migration
 
     public function up()
     {
-        Schema::create('database_tester_users', function($table)
+        Schema::create('database_tester_users', function ($table)
         {
             $table->engine = 'InnoDB';
             $table->increments('id');
diff --git a/tests/fixtures/plugins/october/noupdates/Plugin.php b/tests/fixtures/plugins/october/noupdates/Plugin.php
index a3c3e44ab..5486e2251 100644
--- a/tests/fixtures/plugins/october/noupdates/Plugin.php
+++ b/tests/fixtures/plugins/october/noupdates/Plugin.php
@@ -14,4 +14,4 @@ class Plugin extends PluginBase
         ];
     }
 
-}
\ No newline at end of file
+}
diff --git a/tests/fixtures/plugins/october/sample/Plugin.php b/tests/fixtures/plugins/october/sample/Plugin.php
index 3c0142d68..9d934d1cb 100644
--- a/tests/fixtures/plugins/october/sample/Plugin.php
+++ b/tests/fixtures/plugins/october/sample/Plugin.php
@@ -14,4 +14,4 @@ class Plugin extends PluginBase
         ];
     }
 
-}
\ No newline at end of file
+}
diff --git a/tests/fixtures/plugins/october/tester/Plugin.php b/tests/fixtures/plugins/october/tester/Plugin.php
index c3d5506fb..7a4c8035c 100644
--- a/tests/fixtures/plugins/october/tester/Plugin.php
+++ b/tests/fixtures/plugins/october/tester/Plugin.php
@@ -63,4 +63,4 @@ class Plugin extends PluginBase
         ];
     }
 
-}
\ No newline at end of file
+}
diff --git a/tests/fixtures/plugins/october/tester/components/Archive.php b/tests/fixtures/plugins/october/tester/components/Archive.php
index 3fb1e93b3..97ec581bd 100644
--- a/tests/fixtures/plugins/october/tester/components/Archive.php
+++ b/tests/fixtures/plugins/october/tester/components/Archive.php
@@ -18,7 +18,7 @@ class Archive extends ComponentBase
         return [
             'posts-per-page' => [
                  'description' => 'This will set the posts to display per page',
-                 'default' => 10 
+                 'default' => 10
             ],
             'page-number-param' => [
                 'description' => 'The router parameter for getting the pagination page number',
@@ -40,4 +40,4 @@ class Archive extends ComponentBase
         $this->page['var'] = 'page';
     }
 
-}
\ No newline at end of file
+}
diff --git a/tests/fixtures/plugins/october/tester/components/ContentBlock.php b/tests/fixtures/plugins/october/tester/components/ContentBlock.php
index 0728999b8..ea02f1c8a 100644
--- a/tests/fixtures/plugins/october/tester/components/ContentBlock.php
+++ b/tests/fixtures/plugins/october/tester/components/ContentBlock.php
@@ -22,4 +22,4 @@ class ContentBlock extends ComponentBase
         return 'Pass';
     }
 
-}
\ No newline at end of file
+}
diff --git a/tests/fixtures/plugins/october/tester/components/MainMenu.php b/tests/fixtures/plugins/october/tester/components/MainMenu.php
index 9e70d8910..131cd2f5a 100644
--- a/tests/fixtures/plugins/october/tester/components/MainMenu.php
+++ b/tests/fixtures/plugins/october/tester/components/MainMenu.php
@@ -18,4 +18,4 @@ class MainMenu extends ComponentBase
         return ['Home', 'Blog', 'About', 'Contact'];
     }
 
-}
\ No newline at end of file
+}
diff --git a/tests/fixtures/plugins/october/tester/components/Post.php b/tests/fixtures/plugins/october/tester/components/Post.php
index c5b058cb8..571d99f4b 100644
--- a/tests/fixtures/plugins/october/tester/components/Post.php
+++ b/tests/fixtures/plugins/october/tester/components/Post.php
@@ -23,4 +23,4 @@ class Post extends ComponentBase
         ];
     }
 
-}
\ No newline at end of file
+}
diff --git a/tests/fixtures/plugins/october/tester/formwidgets/Preview.php b/tests/fixtures/plugins/october/tester/formwidgets/Preview.php
index 4e34813c4..28543cd34 100644
--- a/tests/fixtures/plugins/october/tester/formwidgets/Preview.php
+++ b/tests/fixtures/plugins/october/tester/formwidgets/Preview.php
@@ -4,4 +4,4 @@ use Backend\Classes\FormWidgetBase;
 
 class Preview extends FormWidgetBase
 {
-}
\ No newline at end of file
+}
diff --git a/tests/fixtures/plugins/testvendor/test/Plugin.php b/tests/fixtures/plugins/testvendor/test/Plugin.php
index 16a7fc64b..d2b78734e 100644
--- a/tests/fixtures/plugins/testvendor/test/Plugin.php
+++ b/tests/fixtures/plugins/testvendor/test/Plugin.php
@@ -24,4 +24,4 @@ class Plugin extends PluginBase
         ];
     }
 
-}
\ No newline at end of file
+}
diff --git a/tests/fixtures/plugins/testvendor/test/formwidgets/Sample.php b/tests/fixtures/plugins/testvendor/test/formwidgets/Sample.php
index 7560e65a0..1507d3118 100644
--- a/tests/fixtures/plugins/testvendor/test/formwidgets/Sample.php
+++ b/tests/fixtures/plugins/testvendor/test/formwidgets/Sample.php
@@ -4,4 +4,4 @@ use Backend\Classes\FormWidgetBase;
 
 class Sample extends FormWidgetBase
 {
-}
\ No newline at end of file
+}
diff --git a/tests/functional/cms/TemplateTest.php b/tests/functional/cms/TemplateTest.php
index 90ba3486b..b59b851a7 100644
--- a/tests/functional/cms/TemplateTest.php
+++ b/tests/functional/cms/TemplateTest.php
@@ -144,4 +144,4 @@ class TemplateTest extends UiTestCase
 
     }
 
-}
\ No newline at end of file
+}
diff --git a/tests/unit/backend/classes/WidgetManagerTest.php b/tests/unit/backend/classes/WidgetManagerTest.php
index 577d787c7..83c0d334e 100644
--- a/tests/unit/backend/classes/WidgetManagerTest.php
+++ b/tests/unit/backend/classes/WidgetManagerTest.php
@@ -13,4 +13,4 @@ class WidgetManagerTest extends TestCase
         $this->assertArrayHasKey('TestVendor\Test\FormWidgets\Sample', $widgets);
         $this->assertArrayHasKey('October\Tester\FormWidgets\Preview', $widgets);
     }
-}
\ No newline at end of file
+}
diff --git a/tests/unit/backend/models/ImportModelTest.php b/tests/unit/backend/models/ImportModelTest.php
index 555f98abf..401e3e67a 100644
--- a/tests/unit/backend/models/ImportModelTest.php
+++ b/tests/unit/backend/models/ImportModelTest.php
@@ -50,4 +50,4 @@ class ImportModelTest extends TestCase
         $this->assertEquals(['art direction', 'roman empire', 'sci-fi'], $result);
     }
 
-}
\ No newline at end of file
+}
diff --git a/tests/unit/backend/traits/WidgetMakerTest.php b/tests/unit/backend/traits/WidgetMakerTest.php
index c55922200..a94cc773c 100644
--- a/tests/unit/backend/traits/WidgetMakerTest.php
+++ b/tests/unit/backend/traits/WidgetMakerTest.php
@@ -59,4 +59,4 @@ class WidgetMakerTest extends TestCase
         $this->assertEquals('config', $widget->getConfig('test'));
     }
 
-}
\ No newline at end of file
+}
diff --git a/tests/unit/cms/classes/CmsCompoundObjectTest.php b/tests/unit/cms/classes/CmsCompoundObjectTest.php
index a84ae9519..98d3dd6b3 100644
--- a/tests/unit/cms/classes/CmsCompoundObjectTest.php
+++ b/tests/unit/cms/classes/CmsCompoundObjectTest.php
@@ -302,4 +302,4 @@ class CmsCompoundObjectTest extends TestCase
         $this->assertEquals($expected, $actual);
     }
 
-}
\ No newline at end of file
+}
diff --git a/tests/unit/cms/classes/CmsExceptionTest.php b/tests/unit/cms/classes/CmsExceptionTest.php
index dec08530f..81d0bf636 100644
--- a/tests/unit/cms/classes/CmsExceptionTest.php
+++ b/tests/unit/cms/classes/CmsExceptionTest.php
@@ -72,4 +72,4 @@ class CmsExceptionTest extends TestCase
         $this->assertEquals('This is a general error', $exception->getMessage());
     }
 
-}
\ No newline at end of file
+}
diff --git a/tests/unit/cms/classes/CmsObjectQueryTest.php b/tests/unit/cms/classes/CmsObjectQueryTest.php
index ef89bda17..20eedd4d0 100644
--- a/tests/unit/cms/classes/CmsObjectQueryTest.php
+++ b/tests/unit/cms/classes/CmsObjectQueryTest.php
@@ -43,7 +43,7 @@ class CmsObjectQueryTest extends TestCase
     {
         include_once base_path() . '/tests/fixtures/plugins/october/tester/components/Archive.php';
 
-        $pages = Page::withComponent('testArchive', function($component) {
+        $pages = Page::withComponent('testArchive', function ($component) {
             return $component->property('posts-per-page') == '69';
         })->all();
 
diff --git a/tests/unit/cms/classes/CmsObjectTest.php b/tests/unit/cms/classes/CmsObjectTest.php
index cc72f3c39..81ca29201 100644
--- a/tests/unit/cms/classes/CmsObjectTest.php
+++ b/tests/unit/cms/classes/CmsObjectTest.php
@@ -332,4 +332,4 @@ class CmsObjectTest extends TestCase
         $this->assertFileExists($destFilePath);
         $this->assertEquals($testContents, file_get_contents($destFilePath));
     }
-}
\ No newline at end of file
+}
diff --git a/tests/unit/cms/classes/ContentTest.php b/tests/unit/cms/classes/ContentTest.php
index 05eac5e82..2c0de6888 100644
--- a/tests/unit/cms/classes/ContentTest.php
+++ b/tests/unit/cms/classes/ContentTest.php
@@ -33,4 +33,4 @@ class ContentTest extends TestCase
         $this->assertEquals('Stephen Saucier changed his profile picture — 7 hrs ago', $content->parsedMarkup);
     }
 
-}
\ No newline at end of file
+}
diff --git a/tests/unit/cms/classes/RouterTest.php b/tests/unit/cms/classes/RouterTest.php
index 9e867dc75..b0cbf4b52 100644
--- a/tests/unit/cms/classes/RouterTest.php
+++ b/tests/unit/cms/classes/RouterTest.php
@@ -107,7 +107,7 @@ class RouterTest extends TestCase
         $this->assertArrayHasKey('url_title', $parameters);
         $this->assertEquals('my-post-title', $parameters['url_title']);
 
-        // Test cached 
+        // Test cached
         $page = $router->findByUrl('blog/post/my-post-title');
         $parameters = $router->getParameters();
         $this->assertNotEmpty($page);
@@ -156,4 +156,4 @@ class RouterTest extends TestCase
         $this->assertNotEmpty($page);
         $this->assertEquals('b/b-page.htm', $page->getFileName());
     }
-}
\ No newline at end of file
+}
diff --git a/tests/unit/cms/classes/ThemeTest.php b/tests/unit/cms/classes/ThemeTest.php
index 22e18eeb0..7fc919dc6 100644
--- a/tests/unit/cms/classes/ThemeTest.php
+++ b/tests/unit/cms/classes/ThemeTest.php
@@ -75,7 +75,7 @@ class ThemeTest extends TestCase
     public function testApiTheme()
     {
         Event::flush('cms.theme.getActiveTheme');
-        Event::listen('cms.theme.getActiveTheme', function() { return 'apitest'; });
+        Event::listen('cms.theme.getActiveTheme', function () { return 'apitest'; });
 
         $activeTheme = Theme::getActiveTheme();
         $this->assertNotNull($activeTheme);
diff --git a/tests/unit/plugins/database/DeferredBindingTest.php b/tests/unit/plugins/database/DeferredBindingTest.php
index b79acbd67..b97f4fa99 100644
--- a/tests/unit/plugins/database/DeferredBindingTest.php
+++ b/tests/unit/plugins/database/DeferredBindingTest.php
@@ -106,4 +106,4 @@ class DeferredBindingTest extends PluginTestCase
         $this->assertEquals(0, DeferredBinding::count());
     }
 
-}
\ No newline at end of file
+}
diff --git a/tests/unit/plugins/database/HasManyModelTest.php b/tests/unit/plugins/database/HasManyModelTest.php
index e825271b9..e35758cf0 100644
--- a/tests/unit/plugins/database/HasManyModelTest.php
+++ b/tests/unit/plugins/database/HasManyModelTest.php
@@ -119,4 +119,4 @@ class HasManyModelTest extends PluginTestCase
         $this->assertNull($post->author_id);
         $this->assertEmpty($author->posts);
     }
-}
\ No newline at end of file
+}
diff --git a/tests/unit/plugins/database/NestedTreeModelTest.php b/tests/unit/plugins/database/NestedTreeModelTest.php
index 18bc7a3af..b2f0ae019 100644
--- a/tests/unit/plugins/database/NestedTreeModelTest.php
+++ b/tests/unit/plugins/database/NestedTreeModelTest.php
@@ -20,7 +20,7 @@ class NestedTreeModelTest extends PluginTestCase
         $items = CategoryNested::getNested();
 
         // Eager loaded
-        $items->each(function($item) {
+        $items->each(function ($item) {
             $this->assertTrue($item->relationLoaded('children'));
         });
 
@@ -32,7 +32,7 @@ class NestedTreeModelTest extends PluginTestCase
         $items = CategoryNested::getAllRoot();
 
         // Not eager loaded
-        $items->each(function($item) {
+        $items->each(function ($item) {
             $this->assertFalse($item->relationLoaded('children'));
         });
 
diff --git a/tests/unit/plugins/database/RevisionableModelTest.php b/tests/unit/plugins/database/RevisionableModelTest.php
index 792c325d0..afee0c93d 100644
--- a/tests/unit/plugins/database/RevisionableModelTest.php
+++ b/tests/unit/plugins/database/RevisionableModelTest.php
@@ -138,4 +138,4 @@ class RevisionableModelTest extends PluginTestCase
         $this->assertInstanceOf('Carbon\Carbon', $item->old_value);
         $this->assertInstanceOf('Carbon\Carbon', $item->new_value);
     }
-}
\ No newline at end of file
+}
diff --git a/tests/unit/plugins/database/SimpleTreeModelTest.php b/tests/unit/plugins/database/SimpleTreeModelTest.php
index cfae81fae..fac6a48f3 100644
--- a/tests/unit/plugins/database/SimpleTreeModelTest.php
+++ b/tests/unit/plugins/database/SimpleTreeModelTest.php
@@ -20,7 +20,7 @@ class SimpleTreeModelTest extends PluginTestCase
         $items = CategorySimple::getNested();
 
         // Eager loaded
-        $items->each(function($item) {
+        $items->each(function ($item) {
             $this->assertTrue($item->relationLoaded('children'));
         });
 
@@ -32,7 +32,7 @@ class SimpleTreeModelTest extends PluginTestCase
         $items = CategorySimple::getAllRoot();
 
         // Not eager loaded
-        $items->each(function($item) {
+        $items->each(function ($item) {
             $this->assertFalse($item->relationLoaded('children'));
         });
 
diff --git a/tests/unit/plugins/database/SoftDeleteModelTest.php b/tests/unit/plugins/database/SoftDeleteModelTest.php
index 4051204cd..1e96b8ce4 100644
--- a/tests/unit/plugins/database/SoftDeleteModelTest.php
+++ b/tests/unit/plugins/database/SoftDeleteModelTest.php
@@ -95,4 +95,4 @@ class SoftDeleteModelTest extends PluginTestCase
         $this->assertNotNull(SoftDeleteAuthor::find($authorId));
     }
 
-}
\ No newline at end of file
+}
diff --git a/tests/unit/system/classes/CombineAssetsTest.php b/tests/unit/system/classes/CombineAssetsTest.php
index 7f52c0c1c..68e7de01b 100644
--- a/tests/unit/system/classes/CombineAssetsTest.php
+++ b/tests/unit/system/classes/CombineAssetsTest.php
@@ -3,7 +3,7 @@
 use Cms\Classes\Theme;
 use System\Classes\CombineAssets;
 
-class CombineAssetsTest extends TestCase 
+class CombineAssetsTest extends TestCase
 {
     public function setUp()
     {
diff --git a/tests/unit/system/classes/CoreLangTest.php b/tests/unit/system/classes/CoreLangTest.php
index b5de62475..f3600edc1 100644
--- a/tests/unit/system/classes/CoreLangTest.php
+++ b/tests/unit/system/classes/CoreLangTest.php
@@ -43,4 +43,4 @@ class CoreLangTest extends TestCase
             }
         }
     }
-}
\ No newline at end of file
+}
diff --git a/tests/unit/system/classes/MarkupManagerTest.php b/tests/unit/system/classes/MarkupManagerTest.php
index 97d21b546..61f66a2cf 100644
--- a/tests/unit/system/classes/MarkupManagerTest.php
+++ b/tests/unit/system/classes/MarkupManagerTest.php
@@ -62,7 +62,7 @@ class MarkupManagerTest extends TestCase
         $result = self::callProtectedMethod($manager, 'isWildCallable', [$callable]);
         $this->assertFalse($result);
 
-        $callable = function() { return 'O, Hai!'; };
+        $callable = function () { return 'O, Hai!'; };
         $result = self::callProtectedMethod($manager, 'isWildCallable', [$callable]);
         $this->assertFalse($result);
 
@@ -110,4 +110,4 @@ class MarkupManagerTest extends TestCase
         $this->assertEquals('myFood', $result[1]);
     }
 
-}
\ No newline at end of file
+}
diff --git a/tests/unit/system/classes/PluginManagerTest.php b/tests/unit/system/classes/PluginManagerTest.php
index c4f610f44..3a30196cf 100644
--- a/tests/unit/system/classes/PluginManagerTest.php
+++ b/tests/unit/system/classes/PluginManagerTest.php
@@ -149,4 +149,4 @@ class PluginManagerTest extends TestCase
         $this->assertEquals('Alexey Bobkov, Samuel Georges', $pluginDetails['author']);
     }
 
-}
\ No newline at end of file
+}
diff --git a/tests/unit/system/classes/VersionManagerTest.php b/tests/unit/system/classes/VersionManagerTest.php
index cceb9a593..3345a9cca 100644
--- a/tests/unit/system/classes/VersionManagerTest.php
+++ b/tests/unit/system/classes/VersionManagerTest.php
@@ -119,4 +119,4 @@ class VersionManagerTest extends TestCase
         $this->assertArrayHasKey('1.0.5', $result);
     }
 
-}
\ No newline at end of file
+}