From fa46fdf4d675e951ec12da0f83ff6f7f7b1223b2 Mon Sep 17 00:00:00 2001 From: Song Date: Sun, 6 Sep 2020 18:36:29 +0000 Subject: [PATCH] Apply fixes from StyleCI --- resources/lang/tr/admin.php | 10 +++++----- resources/lang/zh-CN/admin.php | 8 ++++---- src/Form/Field/Date.php | 4 ++-- src/Http/Controllers/AdminController.php | 4 ++-- src/Table/Actions/EditModal.php | 3 ++- src/Table/Displayers/DropdownActions.php | 1 - src/Table/Displayers/Expand.php | 2 +- src/Table/Tools/CreateButton.php | 2 +- src/helpers.php | 7 ++++--- 9 files changed, 21 insertions(+), 20 deletions(-) diff --git a/resources/lang/tr/admin.php b/resources/lang/tr/admin.php index 80f7e1ec6f..ee6dccebbd 100644 --- a/resources/lang/tr/admin.php +++ b/resources/lang/tr/admin.php @@ -98,10 +98,10 @@ 'filter_clear' => 'Tümünü göster', 'filter_placeholder' => 'Filtrele', ], - 'menu_titles' => [], + 'menu_titles' => [], 'table_items_selected' => '{n} öğe seçildi', - 'menu_titles' => [], - 'prev' => 'Önceki', - 'next' => 'Sonraki', - 'quick_create' => 'Hemen oluştur', + 'menu_titles' => [], + 'prev' => 'Önceki', + 'next' => 'Sonraki', + 'quick_create' => 'Hemen oluştur', ]; diff --git a/resources/lang/zh-CN/admin.php b/resources/lang/zh-CN/admin.php index 7a03a477d1..02fa134ae8 100644 --- a/resources/lang/zh-CN/admin.php +++ b/resources/lang/zh-CN/admin.php @@ -99,8 +99,8 @@ 'filter_placeholder' => '过滤', ], 'table_items_selected' => '已选择 {n} 项', - 'menu_titles' => [], - 'prev' => '上一步', - 'next' => '下一步', - 'quick_create' => '快速创建', + 'menu_titles' => [], + 'prev' => '上一步', + 'next' => '下一步', + 'quick_create' => '快速创建', ]; diff --git a/src/Form/Field/Date.php b/src/Form/Field/Date.php index 0090438bf9..8581cce347 100644 --- a/src/Form/Field/Date.php +++ b/src/Form/Field/Date.php @@ -98,7 +98,7 @@ public function disable($disabledDates = null) } /** - * {@inheritDoc} + * {@inheritdoc} */ public function prepare($value) { @@ -110,7 +110,7 @@ public function prepare($value) } /** - * {@inheritDoc} + * {@inheritdoc} */ public function render() { diff --git a/src/Http/Controllers/AdminController.php b/src/Http/Controllers/AdminController.php index cfa47a420c..dbcb28b91e 100644 --- a/src/Http/Controllers/AdminController.php +++ b/src/Http/Controllers/AdminController.php @@ -106,7 +106,7 @@ public function create(Content $content) } /** - * @param Form $form + * @param Form $form * @param Content $content * * @return mixed @@ -125,7 +125,7 @@ public function renderModalForm($form, $content) $crawler->filter('form')->outerHtml(), Admin::style(), Admin::html(), - Admin::script() + Admin::script(), ]); } } diff --git a/src/Table/Actions/EditModal.php b/src/Table/Actions/EditModal.php index de7deda2d4..4ab08312fd 100644 --- a/src/Table/Actions/EditModal.php +++ b/src/Table/Actions/EditModal.php @@ -7,8 +7,9 @@ class EditModal extends Edit { /** - * @return string * @throws \Throwable + * + * @return string */ public function render() { diff --git a/src/Table/Displayers/DropdownActions.php b/src/Table/Displayers/DropdownActions.php index 038f9c55cd..39ddc82462 100644 --- a/src/Table/Displayers/DropdownActions.php +++ b/src/Table/Displayers/DropdownActions.php @@ -54,7 +54,6 @@ public function add(RowAction $action) protected function prependDefaultActions() { foreach ($this->defaultClass as $class) { - if ($this->table->modalForm && $class == Edit::class) { $class = EditModal::class; } diff --git a/src/Table/Displayers/Expand.php b/src/Table/Displayers/Expand.php index 1275e1b7b6..d2d537e6e1 100644 --- a/src/Table/Displayers/Expand.php +++ b/src/Table/Displayers/Expand.php @@ -27,7 +27,7 @@ public function display($callback = null, $isExpand = false) return Admin::view('admin::components.column-expand', [ 'key' => $this->getKey(), 'url' => $this->getLoadUrl(), - 'name' => str_replace('.', '-', $this->getName()) . '-' . $this->getKey(), + 'name' => str_replace('.', '-', $this->getName()).'-'.$this->getKey(), 'html' => $html, 'value' => $this->value, 'async' => $async, diff --git a/src/Table/Tools/CreateButton.php b/src/Table/Tools/CreateButton.php index 3adf930555..8e2d785a7c 100644 --- a/src/Table/Tools/CreateButton.php +++ b/src/Table/Tools/CreateButton.php @@ -34,7 +34,7 @@ public function render() } return Admin::view('admin::table.create-btn', [ - 'url' => $this->table->getCreateUrl(), + 'url' => $this->table->getCreateUrl(), 'modal' => $this->table->modalForm, ]); } diff --git a/src/helpers.php b/src/helpers.php index ff8b312743..6ab62f16d5 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -403,13 +403,14 @@ function admin_login_page_backgroud() /** * @param string $view - * @param array $data - * @return string + * @param array $data + * * @throws Throwable + * + * @return string */ function admin_view($view, $data = []) { return Admin::view($view, $data); } - }