From 5f113f834a9e295aa797b5fc0bc8fafbf8b5acb1 Mon Sep 17 00:00:00 2001 From: Jiang Qinghua Date: Tue, 14 Sep 2021 03:32:50 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Actions/Action.php | 17 +- src/Admin.php | 53 ++- src/Color.php | 33 +- src/Console/ActionCommand.php | 8 +- src/Console/AdminCommand.php | 4 +- src/Console/Development/LinkCommand.php | 6 +- src/Console/ExportSeedCommand.php | 9 +- src/Console/ExtensionMakeCommand.php | 13 +- src/Console/FormCommand.php | 3 +- src/Console/IdeHelperCommand.php | 16 +- src/Console/InstallCommand.php | 6 +- src/Console/MinifyCommand.php | 10 +- src/Contracts/ExceptionHandler.php | 8 +- src/Contracts/Grid/ColumnSelectorStore.php | 6 +- src/Contracts/Repository.php | 26 +- src/Contracts/TreeRepository.php | 7 +- src/Contracts/UploadField.php | 5 +- src/Exception/Handler.php | 11 +- src/Extend/CanImportMenu.php | 10 +- src/Extend/Manager.php | 65 ++-- src/Extend/ServiceProvider.php | 34 +- src/Extend/Setting.php | 13 +- src/Extend/UpdateManager.php | 2 +- src/Form.php | 307 +++++++----------- src/Form/AbstractTool.php | 9 +- src/Form/BlockForm.php | 6 +- src/Form/Builder.php | 57 ++-- src/Form/Concerns/HandleCascadeFields.php | 5 +- src/Form/Concerns/HasEvents.php | 73 ++--- src/Form/Concerns/HasFieldValidator.php | 65 ++-- src/Form/Concerns/HasFiles.php | 25 +- src/Form/Concerns/HasLayout.php | 5 +- src/Form/Concerns/HasRows.php | 3 +- src/Form/Concerns/HasTabs.php | 5 +- src/Form/EmbeddedForm.php | 139 ++++---- src/Form/Field.php | 170 ++++------ src/Form/Field/CanCascadeFields.php | 14 +- src/Form/Field/CanLoadFields.php | 18 +- src/Form/Field/CascadeGroup.php | 5 +- src/Form/Field/Checkbox.php | 6 +- src/Form/Field/Currency.php | 9 +- src/Form/Field/Editor.php | 18 +- src/Form/Field/Embeds.php | 24 +- src/Form/Field/File.php | 17 +- src/Form/Field/HasMany.php | 45 ++- src/Form/Field/Html.php | 4 +- src/Form/Field/Image.php | 102 +++--- src/Form/Field/ImageField.php | 27 +- src/Form/Field/ListField.php | 6 +- src/Form/Field/Markdown.php | 21 +- src/Form/Field/MultipleFile.php | 9 +- src/Form/Field/MultipleImage.php | 9 +- src/Form/Field/MultipleSelectTable.php | 6 +- src/Form/Field/Number.php | 6 +- src/Form/Field/Radio.php | 6 +- src/Form/Field/Select.php | 35 +- src/Form/Field/SelectTable.php | 20 +- src/Form/Field/SwitchField.php | 9 +- src/Form/Field/Tags.php | 15 +- src/Form/Field/Text.php | 27 +- src/Form/Field/Textarea.php | 3 +- src/Form/Field/Tree.php | 30 +- src/Form/Field/UploadField.php | 43 +-- src/Form/Field/WebUploader.php | 47 +-- src/Form/Footer.php | 30 +- src/Form/Layout.php | 23 +- src/Form/NestedForm.php | 40 +-- src/Form/ResolveField.php | 6 +- src/Form/Row.php | 115 ++++--- src/Form/Tab.php | 17 +- src/Form/Tools.php | 14 +- src/Grid.php | 113 +++---- src/Grid/Column.php | 80 ++--- src/Grid/Column/Filter.php | 29 +- src/Grid/Column/Filter/Between.php | 7 +- src/Grid/Column/Filter/Equal.php | 9 +- src/Grid/Column/Filter/Gt.php | 4 +- src/Grid/Column/Filter/In.php | 6 +- src/Grid/Column/Filter/Input.php | 6 +- src/Grid/Column/Filter/Like.php | 4 +- src/Grid/Column/Filter/Lt.php | 4 +- src/Grid/Column/Filter/Ngt.php | 4 +- src/Grid/Column/Filter/Nlt.php | 4 +- src/Grid/Column/Filter/StartWith.php | 4 +- src/Grid/Column/HasDisplayers.php | 51 ++- src/Grid/Column/HasHeader.php | 23 +- src/Grid/Column/Help.php | 2 +- src/Grid/Column/Sorter.php | 6 +- src/Grid/ComplexHeader.php | 10 +- src/Grid/Concerns/CanFixColumns.php | 5 +- src/Grid/Concerns/CanHidesColumns.php | 6 +- src/Grid/Concerns/HasActions.php | 24 +- src/Grid/Concerns/HasComplexHeaders.php | 7 +- src/Grid/Concerns/HasEvents.php | 9 +- src/Grid/Concerns/HasExporter.php | 14 +- src/Grid/Concerns/HasFilter.php | 15 +- src/Grid/Concerns/HasNames.php | 9 +- src/Grid/Concerns/HasPaginator.php | 14 +- src/Grid/Concerns/HasQuickCreate.php | 3 +- src/Grid/Concerns/HasQuickSearch.php | 56 ++-- src/Grid/Concerns/HasSelector.php | 3 +- src/Grid/Concerns/HasTools.php | 33 +- src/Grid/Concerns/HasTree.php | 16 +- src/Grid/Displayers/AbstractDisplayer.php | 11 +- src/Grid/Displayers/Actions.php | 30 +- src/Grid/Displayers/DialogTree.php | 25 +- src/Grid/Displayers/DropdownActions.php | 9 +- src/Grid/Exporter.php | 32 +- src/Grid/Exporters/AbstractExporter.php | 34 +- src/Grid/Filter.php | 104 +++--- src/Grid/Filter/AbstractFilter.php | 70 ++-- src/Grid/Filter/Between.php | 12 +- src/Grid/Filter/EndWith.php | 3 +- src/Grid/Filter/Group.php | 58 ++-- src/Grid/Filter/Gt.php | 3 +- src/Grid/Filter/Hidden.php | 4 +- src/Grid/Filter/Ilike.php | 3 +- src/Grid/Filter/In.php | 3 +- src/Grid/Filter/Layout/Column.php | 4 +- src/Grid/Filter/Layout/Layout.php | 8 +- src/Grid/Filter/Like.php | 3 +- src/Grid/Filter/Lt.php | 3 +- src/Grid/Filter/Ngt.php | 3 +- src/Grid/Filter/Nlt.php | 3 +- src/Grid/Filter/Presenter/DateTime.php | 5 +- src/Grid/Filter/Presenter/MultipleSelect.php | 9 +- .../Filter/Presenter/MultipleSelectTable.php | 3 +- src/Grid/Filter/Presenter/Presenter.php | 6 +- src/Grid/Filter/Presenter/Radio.php | 2 +- src/Grid/Filter/Presenter/Select.php | 53 ++- src/Grid/Filter/Presenter/SelectTable.php | 20 +- src/Grid/Filter/Presenter/Text.php | 19 +- src/Grid/Filter/Scope.php | 11 +- src/Grid/Filter/StartWith.php | 3 +- src/Grid/Filter/Where.php | 9 +- src/Grid/Filter/WhereBetween.php | 9 +- src/Grid/FixColumns.php | 9 +- src/Grid/GridAction.php | 3 +- src/Grid/LazyRenderable.php | 6 +- src/Grid/Model.php | 76 ++--- src/Grid/Row.php | 26 +- src/Grid/RowAction.php | 9 +- src/Grid/Tools.php | 22 +- src/Grid/Tools/BatchActions.php | 5 +- src/Grid/Tools/ColumnSelector.php | 8 +- src/Grid/Tools/ExportButton.php | 2 +- src/Grid/Tools/Paginator.php | 2 +- src/Grid/Tools/PerPageSelector.php | 2 +- src/Grid/Tools/QuickCreate.php | 85 ++--- src/Grid/Tools/QuickSearch.php | 9 +- src/Grid/Tools/Selector.php | 39 +-- src/Http/Auth/Permission.php | 12 +- src/Http/Controllers/AdminController.php | 22 +- src/Http/Controllers/AuthController.php | 9 +- .../Controllers/HandleActionController.php | 8 +- src/Http/Controllers/HandleFormController.php | 9 +- src/Http/Controllers/HasResourceActions.php | 6 +- src/Http/Controllers/ValueController.php | 8 +- src/Http/JsonResponse.php | 72 ++-- src/Http/Middleware/Authenticate.php | 8 +- src/Http/Middleware/Bootstrap.php | 4 +- src/Http/Middleware/Permission.php | 16 +- src/Http/Middleware/Pjax.php | 12 +- src/Http/Repositories/Extension.php | 6 +- src/Layout/Asset.php | 62 ++-- src/Layout/Column.php | 4 +- src/Layout/Content.php | 74 ++--- src/Layout/Menu.php | 38 +-- src/Layout/Navbar.php | 9 +- src/Layout/Row.php | 9 +- src/Layout/SectionManager.php | 49 ++- src/Models/Administrator.php | 5 +- src/Models/Menu.php | 5 +- src/Models/MenuCache.php | 3 +- src/Models/Permission.php | 15 +- src/Models/Role.php | 8 +- src/Repositories/EloquentRepository.php | 97 +++--- src/Repositories/QueryBuilderRepository.php | 49 +-- src/Repositories/Repository.php | 40 +-- src/Scaffold/ControllerCreator.php | 27 +- src/Scaffold/FormCreator.php | 7 +- src/Scaffold/GridCreator.php | 5 +- src/Scaffold/LangCreator.php | 8 +- src/Scaffold/MigrationCreator.php | 28 +- src/Scaffold/ModelCreator.php | 59 ++-- src/Scaffold/RepositoryCreator.php | 5 +- src/Scaffold/ShowCreator.php | 5 +- src/Show.php | 87 ++--- src/Show/AbstractField.php | 6 +- src/Show/AbstractTool.php | 3 +- src/Show/Field.php | 100 +++--- src/Show/Panel.php | 18 +- src/Show/Relation.php | 12 +- src/Show/Row.php | 17 +- src/Show/Tools.php | 20 +- src/Support/Composer.php | 9 +- src/Support/ComposerProperty.php | 24 +- src/Support/DatabaseUpdater.php | 4 +- src/Support/Helper.php | 165 ++++------ src/Support/JavaScript.php | 11 +- src/Support/Setting.php | 28 +- src/Support/Translator.php | 22 +- src/Support/WebUploader.php | 34 +- src/Support/Zip.php | 24 +- src/Support/helpers.php | 159 ++++----- src/Traits/HasAssets.php | 35 +- src/Traits/HasAuthorization.php | 3 +- src/Traits/HasFormResponse.php | 12 +- src/Traits/HasHtml.php | 39 +-- src/Traits/HasPermissions.php | 9 +- src/Traits/HasUploadedFile.php | 23 +- src/Traits/HasVariables.php | 3 +- src/Traits/InteractsWithApi.php | 19 +- src/Traits/InteractsWithRenderApi.php | 3 +- src/Traits/ModelTree.php | 29 +- src/Traits/Resizable.php | 6 +- src/Tree.php | 58 ++-- src/Tree/AbstractTool.php | 3 +- src/Tree/Actions.php | 6 +- src/Tree/Tools.php | 3 +- src/Widgets/Alert.php | 15 +- src/Widgets/ApexCharts/Chart.php | 36 +- src/Widgets/Box.php | 14 +- src/Widgets/Callout.php | 12 +- src/Widgets/Card.php | 14 +- src/Widgets/Checkbox.php | 6 +- src/Widgets/Code.php | 23 +- src/Widgets/DialogForm.php | 37 +-- src/Widgets/DialogTable.php | 24 +- src/Widgets/Dropdown.php | 28 +- src/Widgets/Dump.php | 13 +- src/Widgets/Form.php | 185 +++++------ src/Widgets/Lazy.php | 3 +- src/Widgets/LazyTable.php | 16 +- src/Widgets/Markdown.php | 3 +- src/Widgets/Metrics/Bar.php | 3 +- src/Widgets/Metrics/Card.php | 47 +-- src/Widgets/Metrics/Donut.php | 7 +- src/Widgets/Metrics/RadialBar.php | 11 +- src/Widgets/Metrics/Round.php | 23 +- src/Widgets/Modal.php | 51 +-- src/Widgets/Radio.php | 24 +- src/Widgets/Tab.php | 21 +- src/Widgets/Table.php | 18 +- src/Widgets/Terminal.php | 5 +- src/Widgets/Tooltip.php | 3 +- src/Widgets/Tree.php | 17 +- src/Widgets/Widget.php | 33 +- tests/Browser.php | 5 +- tests/Browser/Cases/AuthTest.php | 1 - tests/Browser/Cases/Form/HasManyTest.php | 3 +- tests/Browser/Cases/IndexTest.php | 1 - tests/Browser/Components/Component.php | 13 +- .../Browser/Components/Form/Field/HasMany.php | 43 +-- .../Components/Form/Field/MultipleSelect2.php | 5 +- .../Browser/Components/Form/Field/Select2.php | 3 +- tests/Browser/Components/Form/Field/Tree.php | 18 +- .../Components/Form/MenuCreationForm.php | 5 +- .../Components/Grid/Actions/Delete.php | 12 +- .../Browser/Components/Grid/BatchActions.php | 18 +- tests/Browser/Components/Grid/RowSelector.php | 6 +- tests/Browser/Pages/MenuPage.php | 5 +- tests/Browser/Pages/PainterCreatePage.php | 8 +- tests/Controllers/PainterController.php | 3 +- tests/Controllers/UserController.php | 9 +- tests/DuskTestCase.php | 4 +- tests/Factory.php | 2 +- tests/Models/Tree.php | 2 +- tests/helpers.php | 6 +- 269 files changed, 2410 insertions(+), 3768 deletions(-) diff --git a/src/Actions/Action.php b/src/Actions/Action.php index aad83d5d9..f8aac6fa5 100644 --- a/src/Actions/Action.php +++ b/src/Actions/Action.php @@ -61,7 +61,7 @@ abstract class Action implements Renderable /** * Action constructor. * - * @param string $title + * @param string $title */ public function __construct($title = null) { @@ -73,8 +73,7 @@ public function __construct($title = null) /** * 是否禁用动作. * - * @param bool $disable - * + * @param bool $disable * @return $this */ public function disable(bool $disable = true) @@ -105,8 +104,7 @@ public function getKey() /** * 设置主键. * - * @param mixed $key - * + * @param mixed $key * @return $this */ public function setKey($key) @@ -145,8 +143,7 @@ public function selector() /** * 生成选择器. * - * @param string $prefix - * + * @param string $prefix * @return string */ public function makeSelector() @@ -155,8 +152,7 @@ public function makeSelector() } /** - * @param string|array $class - * + * @param string|array $class * @return $this */ public function addHtmlClass($class) @@ -260,8 +256,7 @@ public function __toString() } /** - * @param mixed ...$params - * + * @param mixed ...$params * @return $this */ public static function make(...$params) diff --git a/src/Admin.php b/src/Admin.php index f4bddf5b1..c35eb5a1c 100755 --- a/src/Admin.php +++ b/src/Admin.php @@ -86,8 +86,7 @@ public static function color() /** * 菜单管理. * - * @param Closure|null $builder - * + * @param Closure|null $builder * @return Menu */ public static function menu(Closure $builder = null) @@ -114,8 +113,7 @@ public static function title($title = null) } /** - * @param null|string $favicon - * + * @param null|string $favicon * @return string|void */ public static function favicon($favicon = null) @@ -130,7 +128,7 @@ public static function favicon($favicon = null) /** * 设置翻译文件路径. * - * @param string|null $path + * @param string|null $path */ public static function translation(?string $path) { @@ -156,8 +154,7 @@ public static function guard() } /** - * @param Closure|null $builder - * + * @param Closure|null $builder * @return Navbar */ public static function navbar(Closure $builder = null) @@ -172,8 +169,7 @@ public static function navbar(Closure $builder = null) /** * 启用或禁用Pjax. * - * @param bool $value - * + * @param bool $value * @return void */ public static function pjax(bool $value = true) @@ -210,8 +206,7 @@ public static function getPjaxContainerId() /** * section. * - * @param Closure|null $builder - * + * @param Closure|null $builder * @return SectionManager */ public static function section(Closure $builder = null) @@ -236,9 +231,8 @@ public static function setting() /** * 创建数据仓库实例. * - * @param string|Repository|Model|Builder $value - * @param array $args - * + * @param string|Repository|Model|Builder $value + * @param array $args * @return Repository */ public static function repository($repository, array $args = []) @@ -273,8 +267,7 @@ public static function app() /** * 处理异常. * - * @param \Throwable $e - * + * @param \Throwable $e * @return mixed */ public static function handleException(\Throwable $e) @@ -285,8 +278,7 @@ public static function handleException(\Throwable $e) /** * 上报异常. * - * @param \Throwable $e - * + * @param \Throwable $e * @return mixed */ public static function reportException(\Throwable $e) @@ -297,8 +289,7 @@ public static function reportException(\Throwable $e) /** * 显示异常信息. * - * @param \Throwable $e - * + * @param \Throwable $e * @return mixed */ public static function renderException(\Throwable $e) @@ -307,7 +298,7 @@ public static function renderException(\Throwable $e) } /** - * @param callable $callback + * @param callable $callback */ public static function booting($callback) { @@ -315,7 +306,7 @@ public static function booting($callback) } /** - * @param callable $callback + * @param callable $callback */ public static function booted($callback) { @@ -359,8 +350,7 @@ public static function translator() } /** - * @param array|string $name - * + * @param array|string $name * @return void */ public static function addIgnoreQueryName($name) @@ -383,7 +373,7 @@ public static function getIgnoreQueryNames() /** * 中断默认的渲染逻辑. * - * @param string|\Illuminate\Contracts\Support\Renderable|\Closure $value + * @param string|\Illuminate\Contracts\Support\Renderable|\Closure $value */ public static function prevent($value) { @@ -438,8 +428,7 @@ public static function renderContents() /** * 响应json数据. * - * @param array $data - * + * @param array $data * @return JsonResponse */ public static function json(array $data = []) @@ -450,8 +439,7 @@ public static function json(array $data = []) /** * 插件管理. * - * @param string $name - * + * @param string $name * @return \Dcat\Admin\Extend\Manager|\Dcat\Admin\Extend\ServiceProvider|null */ public static function extension(?string $name = null) @@ -466,7 +454,7 @@ public static function extension(?string $name = null) /** * 响应并中断后续逻辑. * - * @param Response|string|array $response + * @param Response|string|array $response * * @throws HttpResponseException */ @@ -494,7 +482,7 @@ public static function classLoader() /** * 往分组插入中间件. * - * @param array $mix + * @param array $mix */ public static function mixMiddlewareGroup(array $mix = []) { @@ -532,8 +520,7 @@ public static function mixMiddlewareGroup(array $mix = []) /** * 获取js配置. * - * @param array|null $variables - * + * @param array|null $variables * @return string */ public static function jsVariables(array $variables = null) diff --git a/src/Color.php b/src/Color.php index 4af932c2e..6814c8922 100644 --- a/src/Color.php +++ b/src/Color.php @@ -221,8 +221,7 @@ public function getName() /** * 设置主题色名称. * - * @param string $name - * + * @param string $name * @return void */ public function setName(string $name) @@ -233,9 +232,8 @@ public function setName(string $name) /** * 获取颜色. * - * @param string $colorName - * @param string $default - * + * @param string $colorName + * @param string $default * @return string */ public function get(?string $colorName, ?string $default = null) @@ -278,9 +276,8 @@ public function all() /** * 颜色转亮. * - * @param string $color - * @param int $amt - * + * @param string $color + * @param int $amt * @return string */ public function lighten(?string $color, int $amt) @@ -291,9 +288,8 @@ public function lighten(?string $color, int $amt) /** * 颜色转暗. * - * @param string $color - * @param int $amt - * + * @param string $color + * @param int $amt * @return string */ public function darken(string $color, int $amt) @@ -304,9 +300,8 @@ public function darken(string $color, int $amt) /** * 颜色透明度转化. * - * @param string $color - * @param float|string $alpha - * + * @param string $color + * @param float|string $alpha * @return string */ public function alpha(?string $color, $alpha) @@ -332,9 +327,8 @@ protected function getColors() /** * 获取颜色. * - * @param string $method - * @param array $arguments - * + * @param string $method + * @param array $arguments * @return string */ public function __call(string $method, array $arguments = []) @@ -348,9 +342,8 @@ public function __call(string $method, array $arguments = []) /** * 扩展颜色. * - * @param string $name - * @param array $colors - * + * @param string $name + * @param array $colors * @return void */ public static function extend(string $name, array $colors) diff --git a/src/Console/ActionCommand.php b/src/Console/ActionCommand.php index 656614422..9d41fcac8 100644 --- a/src/Console/ActionCommand.php +++ b/src/Console/ActionCommand.php @@ -88,9 +88,8 @@ protected function actionTyps() /** * Replace the class name for the given stub. * - * @param string $stub - * @param string $name - * + * @param string $stub + * @param string $name * @return string */ protected function replaceClass($stub, $name) @@ -121,8 +120,7 @@ public function getStub() /** * Get the default namespace for the class. * - * @param string $rootNamespace - * + * @param string $rootNamespace * @return string */ protected function getDefaultNamespace($rootNamespace) diff --git a/src/Console/AdminCommand.php b/src/Console/AdminCommand.php index 51d6e4cb5..d1fb08367 100755 --- a/src/Console/AdminCommand.php +++ b/src/Console/AdminCommand.php @@ -75,7 +75,6 @@ protected function listAdminCommands() /** * @param (Command|string)[] $commands - * * @return int */ private function getColumnWidth(array $commands) @@ -95,8 +94,7 @@ private function getColumnWidth(array $commands) /** * Returns the length of a string, using mb_strwidth if it is available. * - * @param string $string The string to check its length - * + * @param string $string The string to check its length * @return int The length of the string */ public static function strlen($string) diff --git a/src/Console/Development/LinkCommand.php b/src/Console/Development/LinkCommand.php index 6935ab0da..98b07ddf0 100644 --- a/src/Console/Development/LinkCommand.php +++ b/src/Console/Development/LinkCommand.php @@ -29,8 +29,7 @@ public function handle() } /** - * @param Filesystem $files - * + * @param Filesystem $files * @return void */ protected function linkTests($files) @@ -60,8 +59,7 @@ protected function linkTests($files) } /** - * @param Filesystem $files - * + * @param Filesystem $files * @return void */ protected function linkAssets($files) diff --git a/src/Console/ExportSeedCommand.php b/src/Console/ExportSeedCommand.php index 3290ade9b..2eea8959f 100755 --- a/src/Console/ExportSeedCommand.php +++ b/src/Console/ExportSeedCommand.php @@ -91,9 +91,8 @@ protected function getTableName($config) /** * Get data array from table as string result var_export. * - * @param string $table - * @param array $exceptFields - * + * @param string $table + * @param array $exceptFields * @return string */ protected function getTableDataArrayAsString($table, $exceptFields = []) @@ -112,7 +111,6 @@ protected function getTableDataArrayAsString($table, $exceptFields = []) * Get stub contents. * * @param $name - * * @return string */ protected function getStub($name) @@ -124,8 +122,7 @@ protected function getStub($name) * Custom var_export for correct work with \r\n. * * @param $var - * @param string $indent - * + * @param string $indent * @return string */ protected function varExport($var, $indent = '') diff --git a/src/Console/ExtensionMakeCommand.php b/src/Console/ExtensionMakeCommand.php index bf58a908c..03bf4e309 100644 --- a/src/Console/ExtensionMakeCommand.php +++ b/src/Console/ExtensionMakeCommand.php @@ -329,8 +329,7 @@ protected function makeDirs() /** * Extension path. * - * @param string $path - * + * @param string $path * @return string */ protected function extensionPath($path = '') @@ -347,8 +346,8 @@ protected function extensionPath($path = '') /** * Put contents to file. * - * @param string $to - * @param string $content + * @param string $to + * @param string $content */ protected function putFile($to, $content) { @@ -360,8 +359,8 @@ protected function putFile($to, $content) /** * Copy files to extension path. * - * @param string|array $from - * @param string|null $to + * @param string|array $from + * @param string|null $to */ protected function copy($from, $to = null) { @@ -385,7 +384,7 @@ protected function copy($from, $to = null) /** * Make new directory. * - * @param array|string $paths + * @param array|string $paths */ protected function makeDir($paths = '') { diff --git a/src/Console/FormCommand.php b/src/Console/FormCommand.php index 44a5e28ce..2ce0d71d1 100644 --- a/src/Console/FormCommand.php +++ b/src/Console/FormCommand.php @@ -45,8 +45,7 @@ protected function getStub() /** * Get the default namespace for the class. * - * @param string $rootNamespace - * + * @param string $rootNamespace * @return string */ protected function getDefaultNamespace($rootNamespace) diff --git a/src/Console/IdeHelperCommand.php b/src/Console/IdeHelperCommand.php index 53fe7c748..f6abe447a 100755 --- a/src/Console/IdeHelperCommand.php +++ b/src/Console/IdeHelperCommand.php @@ -92,8 +92,7 @@ public function handle() } /** - * @param array $reject - * + * @param array $reject * @return Collection */ protected function getFieldsFromDatabase(array $reject = []) @@ -136,8 +135,7 @@ protected function getFieldsFromDatabase(array $reject = []) } /** - * @param array $reject - * + * @param array $reject * @return Collection */ protected function getFieldsFromControllerFiles(array $reject = []) @@ -167,7 +165,7 @@ protected function getFieldsFromControllerFiles(array $reject = []) } /** - * @param Collection $fields + * @param Collection $fields */ protected function write(Collection $fields) { @@ -195,9 +193,8 @@ protected function write(Collection $fields) } /** - * @param string $type - * @param Collection $fields - * + * @param string $type + * @param Collection $fields * @return string */ public function generate(string $type, Collection $fields) @@ -368,8 +365,7 @@ public function getClassContent($class) } /** - * @param string $class - * + * @param string $class * @return string */ public function getFileNameByClass($class) diff --git a/src/Console/InstallCommand.php b/src/Console/InstallCommand.php index cf57ec9ee..f856d6b44 100755 --- a/src/Console/InstallCommand.php +++ b/src/Console/InstallCommand.php @@ -168,8 +168,7 @@ public function createMetricCards() } /** - * @param string $name - * + * @param string $name * @return string */ protected function namespace($name = null) @@ -211,7 +210,6 @@ protected function createRoutesFile() * Get stub contents. * * @param $name - * * @return string */ protected function getStub($name) @@ -222,7 +220,7 @@ protected function getStub($name) /** * Make new directory. * - * @param string $path + * @param string $path */ protected function makeDir($path = '') { diff --git a/src/Console/MinifyCommand.php b/src/Console/MinifyCommand.php index 680809dad..e138ddb33 100644 --- a/src/Console/MinifyCommand.php +++ b/src/Console/MinifyCommand.php @@ -216,8 +216,7 @@ protected function npmInstall() /** * 获取颜色. * - * @param string $name - * + * @param string $name * @return string */ protected function getColor($name) @@ -246,8 +245,7 @@ protected function getColor($name) } /** - * @param string $color - * + * @param string $color * @return string */ protected function formatColor($color) @@ -262,8 +260,8 @@ protected function formatColor($color) /** * 执行命令. * - * @param string $command - * @param int $timeout + * @param string $command + * @param int $timeout */ protected function runProcess($command, $timeout = 1800) { diff --git a/src/Contracts/ExceptionHandler.php b/src/Contracts/ExceptionHandler.php index c9e54e3b0..15ccfabc7 100644 --- a/src/Contracts/ExceptionHandler.php +++ b/src/Contracts/ExceptionHandler.php @@ -7,8 +7,7 @@ interface ExceptionHandler /** * 处理异常. * - * @param \Throwable $e - * + * @param \Throwable $e * @return array|string|void */ public function handle(\Throwable $e); @@ -16,8 +15,7 @@ public function handle(\Throwable $e); /** * 显示异常信息. * - * @param \Throwable $exception - * + * @param \Throwable $exception * @return array|string|void */ public function render(\Throwable $exception); @@ -25,7 +23,7 @@ public function render(\Throwable $exception); /** * 上报异常信息. * - * @param \Throwable $e + * @param \Throwable $e */ public function report(\Throwable $e); } diff --git a/src/Contracts/Grid/ColumnSelectorStore.php b/src/Contracts/Grid/ColumnSelectorStore.php index df632db53..a788999e5 100644 --- a/src/Contracts/Grid/ColumnSelectorStore.php +++ b/src/Contracts/Grid/ColumnSelectorStore.php @@ -7,8 +7,7 @@ interface ColumnSelectorStore { /** - * @param Grid $grid - * + * @param Grid $grid * @return mixed */ public function setGrid(Grid $grid); @@ -16,8 +15,7 @@ public function setGrid(Grid $grid); /** * 存储数据. * - * @param array $input - * + * @param array $input * @return void */ public function store(array $input); diff --git a/src/Contracts/Repository.php b/src/Contracts/Repository.php index d5ef20492..3e06ec25f 100755 --- a/src/Contracts/Repository.php +++ b/src/Contracts/Repository.php @@ -48,8 +48,7 @@ public function isSoftDeletes(); /** * 获取Grid表格数据. * - * @param Grid\Model $model - * + * @param Grid\Model $model * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator|Collection|array */ public function get(Grid\Model $model); @@ -57,8 +56,7 @@ public function get(Grid\Model $model); /** * 获取编辑页面数据. * - * @param Form $form - * + * @param Form $form * @return array|\Illuminate\Contracts\Support\Arrayable */ public function edit(Form $form); @@ -66,8 +64,7 @@ public function edit(Form $form); /** * 获取详情页面数据. * - * @param Show $show - * + * @param Show $show * @return array|\Illuminate\Contracts\Support\Arrayable */ public function detail(Show $show); @@ -75,8 +72,7 @@ public function detail(Show $show); /** * 新增记录. * - * @param Form $form - * + * @param Form $form * @return int|bool|\Dcat\Admin\Http\JsonResponse */ public function store(Form $form); @@ -84,8 +80,7 @@ public function store(Form $form); /** * 查询更新前的行数据. * - * @param Form $form - * + * @param Form $form * @return array|\Illuminate\Contracts\Support\Arrayable */ public function updating(Form $form); @@ -93,8 +88,7 @@ public function updating(Form $form); /** * 更新数据. * - * @param Form $form - * + * @param Form $form * @return bool|\Dcat\Admin\Http\JsonResponse */ public function update(Form $form); @@ -102,9 +96,8 @@ public function update(Form $form); /** * 删除数据. * - * @param Form $form - * @param array $deletingData - * + * @param Form $form + * @param array $deletingData * @return mixed|\Dcat\Admin\Http\JsonResponse */ public function delete(Form $form, array $deletingData); @@ -112,8 +105,7 @@ public function delete(Form $form, array $deletingData); /** * 查询删除前的行数据. * - * @param Form $form - * + * @param Form $form * @return array|\Illuminate\Contracts\Support\Arrayable */ public function deleting(Form $form); diff --git a/src/Contracts/TreeRepository.php b/src/Contracts/TreeRepository.php index 1868a5357..6c7fce5b6 100644 --- a/src/Contracts/TreeRepository.php +++ b/src/Contracts/TreeRepository.php @@ -43,16 +43,15 @@ public function getOrderColumn(); /** * 保存层级数据排序. * - * @param array $tree - * @param int $parentId + * @param array $tree + * @param int $parentId */ public function saveOrder($tree = [], $parentId = 0); /** * 设置数据查询回调. * - * @param \Closure|null $query - * + * @param \Closure|null $query * @return $this */ public function withQuery($queryCallback); diff --git a/src/Contracts/UploadField.php b/src/Contracts/UploadField.php index 2d220ba29..3cf3f7576 100644 --- a/src/Contracts/UploadField.php +++ b/src/Contracts/UploadField.php @@ -10,8 +10,7 @@ interface UploadField /** * Upload File. * - * @param UploadedFile $file - * + * @param UploadedFile $file * @return Response */ public function upload(UploadedFile $file); @@ -26,7 +25,7 @@ public function destroy(); /** * Destroy files. * - * @param string|array $path + * @param string|array $path */ public function deleteFile($path); } diff --git a/src/Exception/Handler.php b/src/Exception/Handler.php index 33e2faca1..d7adf189a 100644 --- a/src/Exception/Handler.php +++ b/src/Exception/Handler.php @@ -13,8 +13,7 @@ class Handler implements ExceptionHandler /** * 处理异常. * - * @param \Throwable $e - * + * @param \Throwable $e * @return array|string|void */ public function handle(\Throwable $e) @@ -31,8 +30,7 @@ public function handle(\Throwable $e) /** * 显示异常信息. * - * @param \Throwable $exception - * + * @param \Throwable $exception * @return array|string|void * * @throws \Throwable @@ -64,7 +62,7 @@ public function render(\Throwable $exception) /** * 上报异常信息. * - * @param \Throwable $e + * @param \Throwable $e */ public function report(\Throwable $e) { @@ -72,8 +70,7 @@ public function report(\Throwable $e) } /** - * @param string $path - * + * @param string $path * @return mixed */ protected function replaceBasePath(string $path) diff --git a/src/Extend/CanImportMenu.php b/src/Extend/CanImportMenu.php index 2fd1463e6..a540e0f27 100644 --- a/src/Extend/CanImportMenu.php +++ b/src/Extend/CanImportMenu.php @@ -32,7 +32,7 @@ protected function menu() /** * 添加菜单. * - * @param array $menu + * @param array $menu * * @throws \Exception */ @@ -81,8 +81,7 @@ protected function refreshMenu() /** * 根据名称获取菜单ID. * - * @param int|string $parent - * + * @param int|string $parent * @return int */ protected function getParentMenuId($parent) @@ -118,11 +117,10 @@ protected function flushMenu() /** * 验证菜单字段格式是否正确. * - * @param array $menu + * @param array $menu + * @return bool * * @throws \Exception - * - * @return bool */ public function validateMenu(array $menu) { diff --git a/src/Extend/Manager.php b/src/Extend/Manager.php index 0582088a1..6401ca75c 100644 --- a/src/Extend/Manager.php +++ b/src/Extend/Manager.php @@ -78,8 +78,7 @@ public function boot() /** * 判断扩展是否启用. * - * @param string|null $name - * + * @param string|null $name * @return bool */ public function enabled(?string $name) @@ -90,9 +89,8 @@ public function enabled(?string $name) /** * 启用或禁用扩展. * - * @param string|null $name - * @param bool $enable - * + * @param string|null $name + * @param bool $enable * @return void */ public function enable(?string $name, bool $enable = true) @@ -131,9 +129,8 @@ public function load() /** * 获取扩展路径. * - * @param string|ServiceProvider $name - * @param string|null $path - * + * @param string|ServiceProvider $name + * @param string|null $path * @return string|void * * @throws \ReflectionException @@ -150,8 +147,7 @@ public function path($name, $path = null) /** * 获取扩展对象. * - * @param string|ServiceProvider $name - * + * @param string|ServiceProvider $name * @return ServiceProvider|null */ public function get($name) @@ -166,8 +162,7 @@ public function get($name) /** * 判断插件是否存在. * - * @param string $name - * + * @param string $name * @return bool */ public function has($name) @@ -176,8 +171,7 @@ public function has($name) } /** - * @param string $name - * + * @param string $name * @return mixed */ protected function formatName($name) @@ -212,9 +206,8 @@ public function available() /** * 加载扩展. * - * @param string $directory - * @param bool $addPsr4 - * + * @param string $directory + * @param bool $addPsr4 * @return ServiceProvider|null */ public function loadExtension(string $directory, bool $addPsr4 = true) @@ -235,9 +228,8 @@ public function loadExtension(string $directory, bool $addPsr4 = true) /** * 获取扩展类实例. * - * @param string $directory - * @param bool $addPsr4 - * + * @param string $directory + * @param bool $addPsr4 * @return ServiceProvider */ public function resolveExtension(string $directory, bool $addPsr4 = true) @@ -263,8 +255,7 @@ public function resolveExtension(string $directory, bool $addPsr4 = true) /** * 获取扩展目录. * - * @param string $dirPath - * + * @param string $dirPath * @return array */ public function getExtensionDirectories($dirPath = null) @@ -297,7 +288,7 @@ public function getExtensionDirectories($dirPath = null) /** * 添加扩展. * - * @param \Dcat\Admin\Extend\ServiceProvider $serviceProvider + * @param \Dcat\Admin\Extend\ServiceProvider $serviceProvider */ public function addExtension(ServiceProvider $serviceProvider) { @@ -321,7 +312,6 @@ public function addExtension(ServiceProvider $serviceProvider) * 获取扩展名称. * * @param $extension - * * @return string */ public function getName($extension) @@ -336,9 +326,8 @@ public function getName($extension) /** * 解压缩扩展包. * - * @param string $filePath - * @param bool $force - * + * @param string $filePath + * @param bool $force * @return string */ public function extract($filePath, bool $force = false) @@ -353,9 +342,8 @@ public function extract($filePath, bool $force = false) } /** - * @param string $filePath - * @param bool $force - * + * @param string $filePath + * @param bool $force * @return bool */ public function extractZip($filePath, bool $force = false) @@ -412,7 +400,6 @@ public function extractZip($filePath, bool $force = false) * 校验扩展包内容是否正确. * * @param $directory - * * @return bool */ protected function checkFiles($directory) @@ -437,8 +424,8 @@ protected function checkFiles($directory) /** * 生成临时文件. * - * @param string $fileCode A unique file code - * @return string Full path on the disk + * @param string $fileCode A unique file code + * @return string Full path on the disk */ protected function getFilePath($fileCode) { @@ -486,8 +473,7 @@ public function versionManager() /** * 创建临时目录. * - * @param string $dir - * + * @param string $dir * @return string */ protected function makeTempDirectory($dir = null) @@ -506,8 +492,8 @@ protected function makeTempDirectory($dir = null) /** * 注册 PSR4 验证规则. * - * @param string $directory - * @param array $psr4 + * @param string $directory + * @param array $psr4 */ protected function registerPsr4($directory, array $psr4) { @@ -523,7 +509,7 @@ protected function registerPsr4($directory, array $psr4) /** * 上报异常. * - * @param \Throwable $e + * @param \Throwable $e */ protected function reportException(\Throwable $e) { @@ -531,8 +517,7 @@ protected function reportException(\Throwable $e) } /** - * @param string $dir - * + * @param string $dir * @return array */ protected function scandir($dir) diff --git a/src/Extend/ServiceProvider.php b/src/Extend/ServiceProvider.php index e24960af4..a92ad3c4d 100644 --- a/src/Extend/ServiceProvider.php +++ b/src/Extend/ServiceProvider.php @@ -220,8 +220,7 @@ public function getLocalLatestVersion() /** * 获取扩展包路径. * - * @param string $path - * + * @param string $path * @return string * * @throws \ReflectionException @@ -295,9 +294,8 @@ public function disabled() /** * 获取或保存配置. * - * @param string $key - * @param null $default - * + * @param string $key + * @param null $default * @return mixed */ public function config($key = null, $default = null) @@ -322,7 +320,7 @@ public function config($key = null, $default = null) /** * 保存配置. * - * @param array $config + * @param array $config */ public function saveConfig(array $config) { @@ -343,8 +341,8 @@ protected function initConfig() /** * 更新扩展. * - * @param string $currentVersion - * @param string $stopOnVersion + * @param string $currentVersion + * @param string $stopOnVersion * * @throws \Exception */ @@ -493,8 +491,7 @@ final public function getRoutes() } /** - * @param ComposerProperty $composerProperty - * + * @param ComposerProperty $composerProperty * @return $this */ public function withComposerProperty(ComposerProperty $composerProperty) @@ -507,9 +504,8 @@ public function withComposerProperty(ComposerProperty $composerProperty) /** * 获取或保存配置. * - * @param string $key - * @param string $value - * + * @param string $key + * @param string $value * @return mixed */ public static function setting($key = null, $value = null) @@ -524,10 +520,9 @@ public static function setting($key = null, $value = null) /** * 翻译. * - * @param string $key - * @param array $replace - * @param null $locale - * + * @param string $key + * @param array $replace + * @param null $locale * @return array|string|null */ public static function trans($key, $replace = [], $locale = null) @@ -564,8 +559,7 @@ protected function aliasAssets() } /** - * @param string|array $files - * + * @param string|array $files * @return mixed */ protected function formatAssetFiles($files) @@ -589,7 +583,6 @@ protected function getConfigKey() /** * @param $config - * * @return false|string */ protected function serializeConfig($config) @@ -599,7 +592,6 @@ protected function serializeConfig($config) /** * @param $config - * * @return array */ protected function unserializeConfig($config) diff --git a/src/Extend/Setting.php b/src/Extend/Setting.php index e904a3163..a57fc35f9 100644 --- a/src/Extend/Setting.php +++ b/src/Extend/Setting.php @@ -35,8 +35,7 @@ protected function initExtension(?ServiceProvider $extension) /** * 处理请求. * - * @param array $input - * + * @param array $input * @return \Dcat\Admin\Http\JsonResponse */ public function handle(array $input) @@ -49,8 +48,7 @@ public function handle(array $input) /** * 格式化配置信息. * - * @param array $input - * + * @param array $input * @return array */ protected function formatInput(array $input) @@ -77,10 +75,9 @@ public function title() /** * 翻译. * - * @param string $key - * @param array $replace - * @param null $locale - * + * @param string $key + * @param array $replace + * @param null $locale * @return array|string|null */ protected function trans($key, $replace = [], $locale = null) diff --git a/src/Extend/UpdateManager.php b/src/Extend/UpdateManager.php index 4c2dbfd99..2fa6cf79e 100644 --- a/src/Extend/UpdateManager.php +++ b/src/Extend/UpdateManager.php @@ -96,7 +96,7 @@ public function update($name, ?string $stopOnVersion = null) /** * 发布扩展资源. * - * @param string $name + * @param string $name */ public function publish($name) { diff --git a/src/Form.php b/src/Form.php index 8f3b89f92..231768b8f 100755 --- a/src/Form.php +++ b/src/Form.php @@ -32,61 +32,61 @@ /** * Class Form. * - * @method Field\Text text($column, $label = '') - * @method Field\Checkbox checkbox($column, $label = '') - * @method Field\Radio radio($column, $label = '') - * @method Field\Select select($column, $label = '') - * @method Field\MultipleSelect multipleSelect($column, $label = '') - * @method Field\Textarea textarea($column, $label = '') - * @method Field\Hidden hidden($column, $label = '') - * @method Field\Id id($column, $label = '') - * @method Field\Ip ip($column, $label = '') - * @method Field\Url url($column, $label = '') - * @method Field\Email email($column, $label = '') - * @method Field\Mobile mobile($column, $label = '') - * @method Field\Slider slider($column, $label = '') - * @method Field\Map map($latitude, $longitude, $label = '') - * @method Field\Editor editor($column, $label = '') - * @method Field\Date date($column, $label = '') - * @method Field\Datetime datetime($column, $label = '') - * @method Field\Time time($column, $label = '') - * @method Field\Year year($column, $label = '') - * @method Field\Month month($column, $label = '') - * @method Field\DateRange dateRange($start, $end, $label = '') - * @method Field\DateTimeRange datetimeRange($start, $end, $label = '') - * @method Field\TimeRange timeRange($start, $end, $label = '') - * @method Field\Number number($column, $label = '') - * @method Field\Currency currency($column, $label = '') - * @method Field\SwitchField switch($column, $label = '') - * @method Field\Display display($column, $label = '') - * @method Field\Rate rate($column, $label = '') - * @method Field\Divide divider(string $title = null) - * @method Field\Password password($column, $label = '') - * @method Field\Decimal decimal($column, $label = '') - * @method Field\Html html($html, $label = '') - * @method Field\Tags tags($column, $label = '') - * @method Field\Icon icon($column, $label = '') - * @method Field\Embeds embeds($column, $label = '', Closure $callback = null) - * @method Field\Captcha captcha() - * @method Field\Listbox listbox($column, $label = '') - * @method Field\File file($column, $label = '') - * @method Field\Image image($column, $label = '') - * @method Field\MultipleFile multipleFile($column, $label = '') - * @method Field\MultipleImage multipleImage($column, $label = '') - * @method Field\HasMany hasMany($column, $labelOrCallback, $callback = null) - * @method Field\Tree tree($column, $label = '') - * @method Field\Table table($column, $labelOrCallback, $callback = null) - * @method Field\ListField list($column, $label = '') - * @method Field\Timezone timezone($column, $label = '') - * @method Field\KeyValue keyValue($column, $label = '') - * @method Field\Tel tel($column, $label = '') - * @method Field\Markdown markdown($column, $label = '') - * @method Field\Range range($start, $end, $label = '') - * @method Field\Color color($column, $label = '') - * @method Field\ArrayField array($column, $labelOrCallback, $callback = null) - * @method Field\SelectTable selectTable($column, $label = '') - * @method Field\MultipleSelectTable multipleSelectTable($column, $label = '') - * @method Field\Button button(string $html = null) + * @method Field\Text text($column, $label = '') + * @method Field\Checkbox checkbox($column, $label = '') + * @method Field\Radio radio($column, $label = '') + * @method Field\Select select($column, $label = '') + * @method Field\MultipleSelect multipleSelect($column, $label = '') + * @method Field\Textarea textarea($column, $label = '') + * @method Field\Hidden hidden($column, $label = '') + * @method Field\Id id($column, $label = '') + * @method Field\Ip ip($column, $label = '') + * @method Field\Url url($column, $label = '') + * @method Field\Email email($column, $label = '') + * @method Field\Mobile mobile($column, $label = '') + * @method Field\Slider slider($column, $label = '') + * @method Field\Map map($latitude, $longitude, $label = '') + * @method Field\Editor editor($column, $label = '') + * @method Field\Date date($column, $label = '') + * @method Field\Datetime datetime($column, $label = '') + * @method Field\Time time($column, $label = '') + * @method Field\Year year($column, $label = '') + * @method Field\Month month($column, $label = '') + * @method Field\DateRange dateRange($start, $end, $label = '') + * @method Field\DateTimeRange datetimeRange($start, $end, $label = '') + * @method Field\TimeRange timeRange($start, $end, $label = '') + * @method Field\Number number($column, $label = '') + * @method Field\Currency currency($column, $label = '') + * @method Field\SwitchField switch($column, $label = '') + * @method Field\Display display($column, $label = '') + * @method Field\Rate rate($column, $label = '') + * @method Field\Divide divider(string $title = null) + * @method Field\Password password($column, $label = '') + * @method Field\Decimal decimal($column, $label = '') + * @method Field\Html html($html, $label = '') + * @method Field\Tags tags($column, $label = '') + * @method Field\Icon icon($column, $label = '') + * @method Field\Embeds embeds($column, $label = '', Closure $callback = null) + * @method Field\Captcha captcha() + * @method Field\Listbox listbox($column, $label = '') + * @method Field\File file($column, $label = '') + * @method Field\Image image($column, $label = '') + * @method Field\MultipleFile multipleFile($column, $label = '') + * @method Field\MultipleImage multipleImage($column, $label = '') + * @method Field\HasMany hasMany($column, $labelOrCallback, $callback = null) + * @method Field\Tree tree($column, $label = '') + * @method Field\Table table($column, $labelOrCallback, $callback = null) + * @method Field\ListField list($column, $label = '') + * @method Field\Timezone timezone($column, $label = '') + * @method Field\KeyValue keyValue($column, $label = '') + * @method Field\Tel tel($column, $label = '') + * @method Field\Markdown markdown($column, $label = '') + * @method Field\Range range($start, $end, $label = '') + * @method Field\Color color($column, $label = '') + * @method Field\ArrayField array($column, $labelOrCallback, $callback = null) + * @method Field\SelectTable selectTable($column, $label = '') + * @method Field\MultipleSelectTable multipleSelectTable($column, $label = '') + * @method Field\Button button(string $html = null) */ class Form implements Renderable { @@ -279,9 +279,9 @@ class Form implements Renderable /** * Create a new form instance. * - * @param Repository|Model|\Illuminate\Database\Eloquent\Builder|string $model - * @param \Closure $callback - * @param Request $request + * @param Repository|Model|\Illuminate\Database\Eloquent\Builder|string $model + * @param \Closure $callback + * @param Request $request */ public function __construct($repository = null, ?Closure $callback = null, Request $request = null) { @@ -299,8 +299,7 @@ public function __construct($repository = null, ?Closure $callback = null, Reque /** * Create a form instance. * - * @param mixed ...$params - * + * @param mixed ...$params * @return $this */ public static function make(...$params) @@ -309,8 +308,7 @@ public static function make(...$params) } /** - * @param Field $field - * + * @param Field $field * @return $this */ public function pushField(Field $field) @@ -334,8 +332,7 @@ public function pushField(Field $field) /** * Get specify field. * - * @param string|null $name - * + * @param string|null $name * @return Field|Collection|Field[]|null */ public function field($name = null) @@ -353,7 +350,6 @@ public function fields() /** * @param $column - * * @return $this */ public function removeField($column) @@ -364,9 +360,8 @@ public function removeField($column) } /** - * @param string $title - * @param string $content - * + * @param string $title + * @param string $content * @return $this */ public function confirm(?string $title = null, ?string $content = null) @@ -401,8 +396,7 @@ public function isDeleting() } /** - * @param Fluent|array|\Illuminate\Database\Eloquent\Model $model - * + * @param Fluent|array|\Illuminate\Database\Eloquent\Model $model * @return Fluent|\Illuminate\Database\Eloquent\Model|void */ public function model($model = null) @@ -431,8 +425,7 @@ public function getKey() /** * 启用或禁用ajax表单提交. * - * @param bool $value - * + * @param bool $value * @return $this */ public function ajax(bool $value = true) @@ -453,8 +446,7 @@ public function allowAjaxSubmit() /** * 设置使用 Toastr 展示字段验证信息. * - * @param bool $value - * + * @param bool $value * @return $this */ public function validationErrorToastr(bool $value = true) @@ -465,8 +457,7 @@ public function validationErrorToastr(bool $value = true) } /** - * @param \Closure $closure - * + * @param \Closure $closure * @return $this; */ public function wrap(\Closure $closure) @@ -512,7 +503,6 @@ public function repository() * Generate a edit form. * * @param $id - * * @return $this */ public function edit($id) @@ -528,9 +518,8 @@ public function edit($id) /** * Add a fieldset to form. * - * @param string $title - * @param Closure $setCallback - * + * @param string $title + * @param Closure $setCallback * @return Field\Fieldset */ public function fieldset(string $title, Closure $setCallback) @@ -550,7 +539,6 @@ public function fieldset(string $title, Closure $setCallback) * Destroy data entity and remove files. * * @param $id - * * @return mixed */ public function destroy($id) @@ -604,8 +592,7 @@ public function destroy($id) } /** - * @param \Throwable $e - * + * @param \Throwable $e * @return mixed */ protected function handleException(\Throwable $e) @@ -616,9 +603,8 @@ protected function handleException(\Throwable $e) /** * Store a new record. * - * @param array|null $data - * @param string|string $redirectTo - * + * @param array|null $data + * @param string|string $redirectTo * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\Http\JsonResponse|Response */ public function store(?array $data = null, $redirectTo = null) @@ -681,8 +667,7 @@ public function store(?array $data = null, $redirectTo = null) /** * Before store. * - * @param array $data - * + * @param array $data * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse|Response|void */ protected function beforeStore(array $data) @@ -716,8 +701,7 @@ protected function beforeStore(array $data) /** * Prepare input data for insert or update. * - * @param array $data - * + * @param array $data * @return Response|null */ protected function prepare($data = []) @@ -734,8 +718,7 @@ protected function prepare($data = []) /** * Remove ignored fields from input. * - * @param array $input - * + * @param array $input * @return array */ public function removeIgnoredFields($input) @@ -748,8 +731,7 @@ public function removeIgnoredFields($input) /** * Get or set data for insert or update. * - * @param array $updates - * + * @param array $updates * @return $this|array */ public function updates(array $updates = null) @@ -766,9 +748,8 @@ public function updates(array $updates = null) /** * Handle orderable update. * - * @param int $id - * @param array $input - * + * @param int $id + * @param array $input * @return Response */ protected function handleOrderable(array $input = []) @@ -794,9 +775,8 @@ protected function handleOrderable(array $input = []) * Handle update. * * @param $id - * @param array|null $data - * @param string|null $redirectTo - * + * @param array|null $data + * @param string|null $redirectTo * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse||Response */ public function update( @@ -861,8 +841,7 @@ public function update( /** * Before update. * - * @param array $data - * + * @param array $data * @return Response|void */ protected function beforeUpdate($id, array &$data) @@ -911,8 +890,7 @@ protected function beforeUpdate($id, array &$data) } /** - * @param array $inputs - * + * @param array $inputs * @return array */ protected function handleHasManyValues(array $inputs) @@ -941,7 +919,6 @@ protected function handleHasManyValues(array $inputs) /** * @param $key * @param $redirectTo - * * @return string|null */ public function getRedirectUrl($key, $redirectTo = null) @@ -977,8 +954,7 @@ public function getRedirectUrl($key, $redirectTo = null) /** * Check if request is from editable. * - * @param array $input - * + * @param array $input * @return bool */ protected function isEditable(array $input = []) @@ -989,8 +965,7 @@ protected function isEditable(array $input = []) /** * Handle editable update. * - * @param array $input - * + * @param array $input * @return array */ protected function handleEditable(array $input = []) @@ -1009,8 +984,7 @@ protected function handleEditable(array $input = []) /** * Prepare input data for update. * - * @param array $updates - * + * @param array $updates * @return array */ public function prepareUpdate(array $updates) @@ -1046,7 +1020,6 @@ public function prepareUpdate(array $updates) * Prepare input data for insert. * * @param $inserts - * * @return array */ public function prepareInsert($inserts) @@ -1074,8 +1047,7 @@ public function prepareInsert($inserts) /** * Ignore fields to save. * - * @param string|array $fields - * + * @param string|array $fields * @return $this */ public function ignore($fields) @@ -1089,7 +1061,6 @@ public function ignore($fields) /** * @param $keys - * * @return $this */ public function forgetIgnored($keys) @@ -1138,9 +1109,8 @@ public function updatedAtColumn() } /** - * @param array $data - * @param string|array $columns - * + * @param array $data + * @param string|array $columns * @return array|mixed */ protected function getDataByColumn($data, $columns) @@ -1196,8 +1166,7 @@ protected function setFieldOriginalValue() * * $form->if(true)->removeField('name'); * - * @param bool|\Closure $condition - * + * @param bool|\Closure $condition * @return Condition */ public function if($condition) @@ -1223,8 +1192,7 @@ protected function rendering() } /** - * @param array $data - * + * @param array $data * @return void */ public function fillFields(array $data) @@ -1253,8 +1221,7 @@ protected function build() /** * Get validation messages. * - * @param array $input - * + * @param array $input * @return MessageBag|bool */ public function validationMessages($input) @@ -1282,9 +1249,8 @@ public function validationMessages($input) } /** - * @param string|array|MessageProvider $column - * @param string|array $messages - * + * @param string|array|MessageProvider $column + * @param string|array $messages * @return $this */ public function responseValidationMessages($column, $messages = null) @@ -1316,8 +1282,7 @@ public function responseValidationMessages($column, $messages = null) /** * Merge validation messages from input validators. * - * @param array $validators - * + * @param array $validators * @return MessageBag */ protected function mergeValidationMessages($validators) @@ -1340,8 +1305,7 @@ protected function mergeValidationMessages($validators) /** * Get or set action for form. * - * @param string|null $action - * + * @param string|null $action * @return $this|string */ public function action($action = null) @@ -1358,9 +1322,8 @@ public function action($action = null) /** * Set field and label width in current form. * - * @param int $fieldWidth - * @param int $labelWidth - * + * @param int $fieldWidth + * @param int $labelWidth * @return $this */ public function width($fieldWidth = 8, $labelWidth = 2) @@ -1378,8 +1341,7 @@ public function width($fieldWidth = 8, $labelWidth = 2) /** * Set view for form. * - * @param string $view - * + * @param string $view * @return $this */ public function view($view) @@ -1390,8 +1352,7 @@ public function view($view) } /** - * @param array $vars - * + * @param array $vars * @return $this */ public function addVariables(array $vars) @@ -1404,8 +1365,7 @@ public function addVariables(array $vars) /** * Get or set title for form. * - * @param string $title - * + * @param string $title * @return $this */ public function title($title = null) @@ -1418,8 +1378,7 @@ public function title($title = null) /** * Tools setting for form. * - * @param Closure|string|AbstractTool|Renderable|Action|array $callback - * + * @param Closure|string|AbstractTool|Renderable|Action|array $callback * @return $this; */ public function tools($callback) @@ -1442,8 +1401,7 @@ public function tools($callback) } /** - * @param bool $disable - * + * @param bool $disable * @return $this */ public function disableHeader(bool $disable = true) @@ -1454,8 +1412,7 @@ public function disableHeader(bool $disable = true) } /** - * @param bool $disable - * + * @param bool $disable * @return $this */ public function disableFooter(bool $disable = true) @@ -1600,8 +1557,7 @@ public function disableDeleteButton(bool $disable = true) /** * Footer setting for form. * - * @param Closure $callback - * + * @param Closure $callback * @return $this */ public function footer(Closure $callback) @@ -1614,8 +1570,7 @@ public function footer(Closure $callback) /** * Get current resource route url. * - * @param int $slice - * + * @param int $slice * @return string */ public function resource($slice = -2) @@ -1634,8 +1589,7 @@ public function resource($slice = -2) /** * Set resource path. * - * @param string $resource - * + * @param string $resource * @return $this */ public function setResource(string $resource) @@ -1664,9 +1618,8 @@ public function render() /** * Get or set input data. * - * @param string|array $key - * @param mixed $value - * + * @param string|array $key + * @param mixed $value * @return array|mixed */ public function input($key = null, $value = null) @@ -1689,8 +1642,7 @@ public function input($key = null, $value = null) } /** - * @param string|array $keys - * + * @param string|array $keys * @return void */ public function deleteInput($keys) @@ -1699,9 +1651,8 @@ public function deleteInput($keys) } /** - * @param int $width - * @param Closure $callback - * + * @param int $width + * @param Closure $callback * @return $this */ public function block(int $width, \Closure $callback) @@ -1715,9 +1666,8 @@ public function block(int $width, \Closure $callback) } /** - * @param int|float $width - * @param Closure $callback - * + * @param int|float $width + * @param Closure $callback * @return $this */ public function column($width, \Closure $callback) @@ -1740,8 +1690,7 @@ protected function prepareDialogForm() } /** - * @param Closure $callback - * + * @param Closure $callback * @return bool|void */ public function inDialog(\Closure $callback = null) @@ -1758,8 +1707,7 @@ public function inDialog(\Closure $callback = null) /** * Create a dialog form. * - * @param string|null $title - * + * @param string|null $title * @return DialogForm */ public static function dialog(?string $title = null) @@ -1770,9 +1718,8 @@ public static function dialog(?string $title = null) /** * Register custom field. * - * @param string $abstract - * @param string $class - * + * @param string $abstract + * @param string $class * @return void */ public static function extend($abstract, $class) @@ -1791,9 +1738,8 @@ public static function extensions() /** * Set form field alias. * - * @param string $field - * @param string $alias - * + * @param string $field + * @param string $alias * @return void */ public static function alias($field, $alias) @@ -1804,8 +1750,7 @@ public static function alias($field, $alias) /** * Find field class. * - * @param string $method - * + * @param string $method * @return bool|mixed */ public static function findFieldClass($method) @@ -1827,8 +1772,7 @@ public static function findFieldClass($method) /** * Getter. * - * @param string $name - * + * @param string $name * @return array|mixed */ public function __get($name) @@ -1839,8 +1783,8 @@ public function __get($name) /** * Setter. * - * @param string $name - * @param mixed $value + * @param string $name + * @param mixed $value */ public function __set($name, $value) { @@ -1850,9 +1794,8 @@ public function __set($name, $value) /** * Generate a Field object and add to form builder if Field exists. * - * @param string $method - * @param array $arguments - * + * @param string $method + * @param array $arguments * @return Field */ public function __call($method, $arguments) diff --git a/src/Form/AbstractTool.php b/src/Form/AbstractTool.php index eb2b443be..d7379e97b 100644 --- a/src/Form/AbstractTool.php +++ b/src/Form/AbstractTool.php @@ -32,8 +32,7 @@ abstract class AbstractTool extends Action public $allowOnlyEditing = false; /** - * @param Form $form - * + * @param Form $form * @return void */ public function setForm(Form $form) @@ -80,8 +79,7 @@ public function setupHtmlAttributes() } /** - * @param mixed ...$params - * + * @param mixed ...$params * @return $this */ public static function allowOnlyCreating(...$params) @@ -95,8 +93,7 @@ public static function allowOnlyCreating(...$params) } /** - * @param mixed ...$params - * + * @param mixed ...$params * @return $this */ public static function allowOnlyEditing(...$params) diff --git a/src/Form/BlockForm.php b/src/Form/BlockForm.php index e294e88e7..50139b160 100644 --- a/src/Form/BlockForm.php +++ b/src/Form/BlockForm.php @@ -47,8 +47,7 @@ public function __construct(Form $form) /** * 设置标题. * - * @param string $title - * + * @param string $title * @return $this */ public function title($title) @@ -75,8 +74,7 @@ public function showFooter() /** * 在当前列增加一块表单. * - * @param \Closure $callback - * + * @param \Closure $callback * @return $this */ public function next(\Closure $callback) diff --git a/src/Form/Builder.php b/src/Form/Builder.php index 38077795f..f6d97b9d3 100755 --- a/src/Form/Builder.php +++ b/src/Form/Builder.php @@ -139,7 +139,7 @@ class Builder /** * Builder constructor. * - * @param Form $form + * @param Form $form */ public function __construct(Form $form) { @@ -151,8 +151,7 @@ public function __construct(Form $form) } /** - * @param \Closure $closure - * + * @param \Closure $closure * @return Layout */ public function layout($closure = null) @@ -165,8 +164,7 @@ public function layout($closure = null) } /** - * @param Closure $closure - * + * @param Closure $closure * @return $this; */ public function wrap(Closure $closure) @@ -205,9 +203,8 @@ public function footer() } /** - * @param string $title - * @param string $content - * + * @param string $title + * @param string $content * @return $this */ public function confirm(?string $title = null, ?string $content = null) @@ -221,8 +218,7 @@ public function confirm(?string $title = null, ?string $content = null) /** * Set the builder mode. * - * @param string $mode - * + * @param string $mode * @return void|string */ public function mode(string $mode = null) @@ -238,7 +234,6 @@ public function mode(string $mode = null) * Returns builder is $mode. * * @param $mode - * * @return bool */ public function isMode($mode) @@ -280,7 +275,6 @@ public function isDeleting() * Set resource Id. * * @param $id - * * @return mixed|void */ public function setResourceId($id) @@ -312,9 +306,8 @@ public function resource($slice = null) } /** - * @param int $field - * @param int $label - * + * @param int $field + * @param int $label * @return $this */ public function width($field = 8, $label = 2) @@ -368,8 +361,7 @@ public function action($action = null) /** * Set view for this form. * - * @param string $view - * + * @param string $view * @return $this */ public function view($view) @@ -382,8 +374,7 @@ public function view($view) /** * Get or set title for form. * - * @param string $title - * + * @param string $title * @return $this|string */ public function title($title = null) @@ -422,8 +413,7 @@ public function fields() /** * Get specify field. * - * @param string|Field $name - * + * @param string|Field $name * @return Field|null */ public function field($name) @@ -443,7 +433,6 @@ public function field($name) /** * @param $column - * * @return void */ public function removeField($column) @@ -490,8 +479,7 @@ public function hiddenFields() } /** - * @param Field $field - * + * @param Field $field * @return void */ public function addHiddenField(Field $field) @@ -502,8 +490,7 @@ public function addHiddenField(Field $field) /** * Add or get options. * - * @param array $options - * + * @param array $options * @return array|null */ public function options($options = []) @@ -518,9 +505,8 @@ public function options($options = []) /** * Get or set option. * - * @param string $option - * @param mixed $value - * + * @param string $option + * @param mixed $value * @return void */ public function option($option, $value = null) @@ -533,8 +519,7 @@ public function option($option, $value = null) } /** - * @param bool $disable - * + * @param bool $disable * @return void */ public function disableHeader(bool $disable = true) @@ -543,8 +528,7 @@ public function disableHeader(bool $disable = true) } /** - * @param bool $disable - * + * @param bool $disable * @return void */ public function disableFooter(bool $disable = true) @@ -554,7 +538,6 @@ public function disableFooter(bool $disable = true) /** * @param $id - * * @return void */ public function setElementId($id) @@ -619,8 +602,7 @@ protected function addRedirectUrlField() /** * Open up a new HTML form. * - * @param array $options - * + * @param array $options * @return string */ public function open($options = []) @@ -802,8 +784,7 @@ public function render() } /** - * @param Renderable $view - * + * @param Renderable $view * @return string */ protected function doWrap(Renderable $view) diff --git a/src/Form/Concerns/HandleCascadeFields.php b/src/Form/Concerns/HandleCascadeFields.php index 3240acb6c..2a5be35de 100644 --- a/src/Form/Concerns/HandleCascadeFields.php +++ b/src/Form/Concerns/HandleCascadeFields.php @@ -7,9 +7,8 @@ trait HandleCascadeFields { /** - * @param array $dependency - * @param \Closure $closure - * + * @param array $dependency + * @param \Closure $closure * @return Field\CascadeGroup */ public function cascadeGroup(\Closure $closure, array $dependency) diff --git a/src/Form/Concerns/HasEvents.php b/src/Form/Concerns/HasEvents.php index ddb19a872..803db734d 100644 --- a/src/Form/Concerns/HasEvents.php +++ b/src/Form/Concerns/HasEvents.php @@ -18,8 +18,7 @@ trait HasEvents /** * 监听创建页面访问事件. * - * @param Closure $callback - * + * @param Closure $callback * @return $this */ public function creating(Closure $callback) @@ -32,8 +31,7 @@ public function creating(Closure $callback) /** * 监听编辑页面访问时间. * - * @param Closure $callback - * + * @param Closure $callback * @return $this */ public function editing(Closure $callback) @@ -46,8 +44,7 @@ public function editing(Closure $callback) /** * 监听提交事件. * - * @param Closure $callback - * + * @param Closure $callback * @return $this */ public function submitted(Closure $callback) @@ -60,8 +57,7 @@ public function submitted(Closure $callback) /** * 保存. * - * @param Closure $callback - * + * @param Closure $callback * @return $this */ public function saving(Closure $callback) @@ -74,8 +70,7 @@ public function saving(Closure $callback) /** * 保存完成. * - * @param Closure $callback - * + * @param Closure $callback * @return $this */ public function saved(Closure $callback) @@ -88,8 +83,7 @@ public function saved(Closure $callback) /** * 删除. * - * @param Closure $callback - * + * @param Closure $callback * @return $this */ public function deleting(Closure $callback) @@ -102,8 +96,7 @@ public function deleting(Closure $callback) /** * 删除完成. * - * @param Closure $callback - * + * @param Closure $callback * @return $this */ public function deleted(Closure $callback) @@ -116,8 +109,7 @@ public function deleted(Closure $callback) /** * 文件上传. * - * @param \Closure $callback - * + * @param \Closure $callback * @return $this */ public function uploading(Closure $callback) @@ -130,8 +122,7 @@ public function uploading(Closure $callback) /** * 上传完成. * - * @param \Closure $callback - * + * @param \Closure $callback * @return $this */ public function uploaded(Closure $callback) @@ -144,8 +135,7 @@ public function uploaded(Closure $callback) /** * 删除文件. * - * @param \Closure $callback - * + * @param \Closure $callback * @return $this */ public function fileDeleting(Closure $callback) @@ -158,8 +148,7 @@ public function fileDeleting(Closure $callback) /** * 删除文件完成. * - * @param \Closure $callback - * + * @param \Closure $callback * @return $this */ public function fileDeleted(Closure $callback) @@ -170,8 +159,7 @@ public function fileDeleted(Closure $callback) } /** - * @param \Closure $callback - * + * @param \Closure $callback * @return \Closure */ protected function makeListener(Closure $callback) @@ -238,8 +226,7 @@ protected function callSaving() /** * 触发表单保存完成事件. * - * @param mixed $result - * + * @param mixed $result * @return mixed|null */ protected function callSaved($result) @@ -260,8 +247,7 @@ protected function callDeleting() /** * 触发数据删除完成事件. * - * @param mixed $result - * + * @param mixed $result * @return mixed|null */ protected function callDeleted($result) @@ -272,9 +258,8 @@ protected function callDeleted($result) /** * 触发文件上传事件. * - * @param UploadFieldInterface|\Dcat\Admin\Form\Field $field - * @param UploadedFile $file - * + * @param UploadFieldInterface|\Dcat\Admin\Form\Field $field + * @param UploadedFile $file * @return mixed|null */ protected function callUploading($field, $file) @@ -285,10 +270,9 @@ protected function callUploading($field, $file) /** * 触发文件上传完成事件. * - * @param UploadFieldInterface|\Dcat\Admin\Form\Field $field - * @param UploadedFile $file - * @param Response $response - * + * @param UploadFieldInterface|\Dcat\Admin\Form\Field $field + * @param UploadedFile $file + * @param Response $response * @return \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\RedirectResponse|void */ protected function callUploaded($field, $file, $response) @@ -299,10 +283,9 @@ protected function callUploaded($field, $file, $response) /** * 触发文件删除事件. * - * @param UploadFieldInterface|\Dcat\Admin\Form\Field $field - * @param UploadedFile $file - * @param Response $response - * + * @param UploadFieldInterface|\Dcat\Admin\Form\Field $field + * @param UploadedFile $file + * @param Response $response * @return \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\RedirectResponse|void */ protected function callFileDeleting($field) @@ -313,10 +296,9 @@ protected function callFileDeleting($field) /** * 触发文件删除完成事件. * - * @param UploadFieldInterface|\Dcat\Admin\Form\Field $field - * @param UploadedFile $file - * @param Response $response - * + * @param UploadFieldInterface|\Dcat\Admin\Form\Field $field + * @param UploadedFile $file + * @param Response $response * @return \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\RedirectResponse|void */ protected function callFileDeleted($field) @@ -325,9 +307,8 @@ protected function callFileDeleted($field) } /** - * @param string $name - * @param array $payload - * + * @param string $name + * @param array $payload * @return RedirectResponse|\Illuminate\Http\Response|void */ protected function fire($name, array $payload = []) diff --git a/src/Form/Concerns/HasFieldValidator.php b/src/Form/Concerns/HasFieldValidator.php index 8108affc3..26d96eb95 100644 --- a/src/Form/Concerns/HasFieldValidator.php +++ b/src/Form/Concerns/HasFieldValidator.php @@ -50,9 +50,8 @@ trait HasFieldValidator /** * Set the update validation rules for the field. * - * @param array|callable|string $rules - * @param array $messages - * + * @param array|callable|string $rules + * @param array $messages * @return $this */ public function updateRules($rules = null, $messages = []) @@ -69,9 +68,8 @@ public function updateRules($rules = null, $messages = []) /** * Set the creation validation rules for the field. * - * @param array|callable|string $rules - * @param array $messages - * + * @param array|callable|string $rules + * @param array $messages * @return $this */ public function creationRules($rules = null, $messages = []) @@ -88,9 +86,8 @@ public function creationRules($rules = null, $messages = []) /** * Get or set rules. * - * @param null $rules - * @param array $messages - * + * @param null $rules + * @param array $messages * @return $this */ public function rules($rules = null, $messages = []) @@ -159,8 +156,7 @@ protected function getRules() /** * Format validation rules. * - * @param array|string $rules - * + * @param array|string $rules * @return array */ protected function formatRules($rules) @@ -173,9 +169,8 @@ protected function formatRules($rules) } /** - * @param string|array|\Closure $input - * @param string|array $original - * + * @param string|array|\Closure $input + * @param string|array $original * @return array|\Closure */ protected function mergeRules($input, $original) @@ -193,8 +188,7 @@ protected function mergeRules($input, $original) } /** - * @param string $rule - * + * @param string $rule * @return $this */ public function removeUpdateRule($rule) @@ -205,8 +199,7 @@ public function removeUpdateRule($rule) } /** - * @param string $rule - * + * @param string $rule * @return $this */ public function removeCreationRule($rule) @@ -219,8 +212,7 @@ public function removeCreationRule($rule) /** * Remove a specific rule by keyword. * - * @param string $rule - * + * @param string $rule * @return $this */ public function removeRule($rule) @@ -233,7 +225,6 @@ public function removeRule($rule) /** * @param $rules * @param $rule - * * @return void */ protected function deleteRuleByKeyword(&$rules, $rule) @@ -254,8 +245,7 @@ protected function deleteRuleByKeyword(&$rules, $rule) } /** - * @param string $rule - * + * @param string $rule * @return bool */ public function hasUpdateRule($rule) @@ -264,8 +254,7 @@ public function hasUpdateRule($rule) } /** - * @param string $rule - * + * @param string $rule * @return bool */ public function hasCreationRule($rule) @@ -274,8 +263,7 @@ public function hasCreationRule($rule) } /** - * @param string $rule - * + * @param string $rule * @return bool */ public function hasRule($rule) @@ -284,8 +272,7 @@ public function hasRule($rule) } /** - * @param string $rule - * + * @param string $rule * @return bool|mixed */ protected function getRule($rule) @@ -318,7 +305,6 @@ protected function getRule($rule) /** * @param $rules * @param $rule - * * @return bool */ protected function isRuleExists($rules, $rule) @@ -347,8 +333,7 @@ protected function isRuleExists($rules, $rule) /** * Set field validator. * - * @param callable $validator - * + * @param callable $validator * @return $this */ public function validator(callable $validator) @@ -361,8 +346,7 @@ public function validator(callable $validator) /** * Get validator for this field. * - * @param array $input - * + * @param array $input * @return bool|Validator */ public function getValidator(array $input) @@ -406,9 +390,8 @@ public function getValidator(array $input) /** * Set validation messages for column. * - * @param string $key - * @param array $messages - * + * @param string $key + * @param array $messages * @return $this */ public function setValidationMessages($key, array $messages) @@ -462,9 +445,8 @@ public function getValidationMessages() * * @see http://1000hz.github.io/bootstrap-validator/ * - * @param string $error - * @param string $key - * + * @param string $error + * @param string $key * @return $this */ public function setClientValidationError(string $error, string $key = null) @@ -475,8 +457,7 @@ public function setClientValidationError(string $error, string $key = null) } /** - * @param MessageBag $messageBag - * + * @param MessageBag $messageBag * @return MessageBag */ public function formatValidatorMessages($messageBag) diff --git a/src/Form/Concerns/HasFiles.php b/src/Form/Concerns/HasFiles.php index fbef06732..b100e8489 100644 --- a/src/Form/Concerns/HasFiles.php +++ b/src/Form/Concerns/HasFiles.php @@ -19,8 +19,7 @@ trait HasFiles /** * 文件上传操作. * - * @param array $data - * + * @param array $data * @return Response|void */ protected function handleUploadFile($data) @@ -61,8 +60,7 @@ protected function handleUploadFile($data) /** * 根据字段名称查找字段. * - * @param string|null $column - * + * @param string|null $column * @return Field|null */ public function findFieldByName(?string $column) @@ -73,8 +71,7 @@ public function findFieldByName(?string $column) /** * 新增页面删除文件. * - * @param array $input - * + * @param array $input * @return \Illuminate\Http\JsonResponse */ protected function deleteFileWhenCreating(array $input) @@ -110,8 +107,8 @@ protected function deleteFileWhenCreating(array $input) /** * 删除文件. * - * @param UploadFieldInterface|Field $field - * @param array $input + * @param UploadFieldInterface|Field $field + * @param array $input */ protected function deleteFile(UploadFieldInterface $field, $input = null) { @@ -138,9 +135,8 @@ protected function deleteFile(UploadFieldInterface $field, $input = null) /** * 获取hasMany的子表单字段. * - * @param string $relation - * @param string $column - * + * @param string $relation + * @param string $column * @return mixed */ public function getFieldByRelationName($relation, $column) @@ -157,8 +153,8 @@ public function getFieldByRelationName($relation, $column) /** * 根据传入数据删除文件. * - * @param array $input - * @param bool $forceDelete + * @param array $input + * @param bool $forceDelete */ public function deleteFiles($input, $forceDelete = false) { @@ -178,8 +174,7 @@ public function deleteFiles($input, $forceDelete = false) } /** - * @param array $input - * + * @param array $input * @return array */ protected function handleFileDelete(array $input = []) diff --git a/src/Form/Concerns/HasLayout.php b/src/Form/Concerns/HasLayout.php index b397ba830..cc3db4fb2 100644 --- a/src/Form/Concerns/HasLayout.php +++ b/src/Form/Concerns/HasLayout.php @@ -13,9 +13,8 @@ trait HasLayout protected $layout; /** - * @param int|float $width - * @param Closure $callback - * + * @param int|float $width + * @param Closure $callback * @return $this */ public function column($width, Closure $callback) diff --git a/src/Form/Concerns/HasRows.php b/src/Form/Concerns/HasRows.php index c68ddb91b..5f59ea6bb 100644 --- a/src/Form/Concerns/HasRows.php +++ b/src/Form/Concerns/HasRows.php @@ -17,8 +17,7 @@ trait HasRows /** * Add a row in form. * - * @param Closure $callback - * + * @param Closure $callback * @return $this */ public function row(Closure $callback) diff --git a/src/Form/Concerns/HasTabs.php b/src/Form/Concerns/HasTabs.php index 61f966247..0159d292e 100644 --- a/src/Form/Concerns/HasTabs.php +++ b/src/Form/Concerns/HasTabs.php @@ -15,9 +15,8 @@ trait HasTabs /** * Use tab to split form. * - * @param string $title - * @param Closure $content - * + * @param string $title + * @param Closure $content * @return $this */ public function tab($title, Closure $content, $active = false) diff --git a/src/Form/EmbeddedForm.php b/src/Form/EmbeddedForm.php index 118b6632b..3284b7fa7 100755 --- a/src/Form/EmbeddedForm.php +++ b/src/Form/EmbeddedForm.php @@ -10,59 +10,59 @@ /** * Class EmbeddedForm. * - * @method Field\Text text($column, $label = '') - * @method Field\Checkbox checkbox($column, $label = '') - * @method Field\Radio radio($column, $label = '') - * @method Field\Select select($column, $label = '') - * @method Field\MultipleSelect multipleSelect($column, $label = '') - * @method Field\Textarea textarea($column, $label = '') - * @method Field\Hidden hidden($column, $label = '') - * @method Field\Id id($column, $label = '') - * @method Field\Ip ip($column, $label = '') - * @method Field\Url url($column, $label = '') - * @method Field\Email email($column, $label = '') - * @method Field\Mobile mobile($column, $label = '') - * @method Field\Slider slider($column, $label = '') - * @method Field\Map map($latitude, $longitude, $label = '') - * @method Field\Editor editor($column, $label = '') - * @method Field\Date date($column, $label = '') - * @method Field\Datetime datetime($column, $label = '') - * @method Field\Time time($column, $label = '') - * @method Field\Year year($column, $label = '') - * @method Field\Month month($column, $label = '') - * @method Field\DateRange dateRange($start, $end, $label = '') - * @method Field\DateTimeRange datetimeRange($start, $end, $label = '') - * @method Field\TimeRange timeRange($start, $end, $label = '') - * @method Field\Number number($column, $label = '') - * @method Field\Currency currency($column, $label = '') - * @method Field\SwitchField switch($column, $label = '') - * @method Field\Display display($column, $label = '') - * @method Field\Rate rate($column, $label = '') - * @method Field\Divide divider(string $title = null) - * @method Field\Password password($column, $label = '') - * @method Field\Decimal decimal($column, $label = '') - * @method Field\Html html($html, $label = '') - * @method Field\Tags tags($column, $label = '') - * @method Field\Icon icon($column, $label = '') - * @method Field\Embeds embeds($column, $label = '') - * @method Field\Captcha captcha() - * @method Field\Listbox listbox($column, $label = '') - * @method Field\File file($column, $label = '') - * @method Field\Image image($column, $label = '') - * @method Field\MultipleFile multipleFile($column, $label = '') - * @method Field\MultipleImage multipleImage($column, $label = '') - * @method Field\Tree tree($column, $label = '') - * @method Field\Table table($column, $labelOrCallback, $callback = null) - * @method Field\ListField list($column, $label = '') - * @method Field\Timezone timezone($column, $label = '') - * @method Field\KeyValue keyValue($column, $label = '') - * @method Field\Tel tel($column, $label = '') - * @method Field\Markdown markdown($column, $label = '') - * @method Field\Range range($start, $end, $label = '') - * @method Field\Color color($column, $label = '') - * @method Field\ArrayField array($column, $labelOrCallback, $callback = null) - * @method Field\SelectTable selectTable($column, $label = '') - * @method Field\MultipleSelectTable multipleSelectTable($column, $label = '') + * @method Field\Text text($column, $label = '') + * @method Field\Checkbox checkbox($column, $label = '') + * @method Field\Radio radio($column, $label = '') + * @method Field\Select select($column, $label = '') + * @method Field\MultipleSelect multipleSelect($column, $label = '') + * @method Field\Textarea textarea($column, $label = '') + * @method Field\Hidden hidden($column, $label = '') + * @method Field\Id id($column, $label = '') + * @method Field\Ip ip($column, $label = '') + * @method Field\Url url($column, $label = '') + * @method Field\Email email($column, $label = '') + * @method Field\Mobile mobile($column, $label = '') + * @method Field\Slider slider($column, $label = '') + * @method Field\Map map($latitude, $longitude, $label = '') + * @method Field\Editor editor($column, $label = '') + * @method Field\Date date($column, $label = '') + * @method Field\Datetime datetime($column, $label = '') + * @method Field\Time time($column, $label = '') + * @method Field\Year year($column, $label = '') + * @method Field\Month month($column, $label = '') + * @method Field\DateRange dateRange($start, $end, $label = '') + * @method Field\DateTimeRange datetimeRange($start, $end, $label = '') + * @method Field\TimeRange timeRange($start, $end, $label = '') + * @method Field\Number number($column, $label = '') + * @method Field\Currency currency($column, $label = '') + * @method Field\SwitchField switch($column, $label = '') + * @method Field\Display display($column, $label = '') + * @method Field\Rate rate($column, $label = '') + * @method Field\Divide divider(string $title = null) + * @method Field\Password password($column, $label = '') + * @method Field\Decimal decimal($column, $label = '') + * @method Field\Html html($html, $label = '') + * @method Field\Tags tags($column, $label = '') + * @method Field\Icon icon($column, $label = '') + * @method Field\Embeds embeds($column, $label = '') + * @method Field\Captcha captcha() + * @method Field\Listbox listbox($column, $label = '') + * @method Field\File file($column, $label = '') + * @method Field\Image image($column, $label = '') + * @method Field\MultipleFile multipleFile($column, $label = '') + * @method Field\MultipleImage multipleImage($column, $label = '') + * @method Field\Tree tree($column, $label = '') + * @method Field\Table table($column, $labelOrCallback, $callback = null) + * @method Field\ListField list($column, $label = '') + * @method Field\Timezone timezone($column, $label = '') + * @method Field\KeyValue keyValue($column, $label = '') + * @method Field\Tel tel($column, $label = '') + * @method Field\Markdown markdown($column, $label = '') + * @method Field\Range range($start, $end, $label = '') + * @method Field\Color color($column, $label = '') + * @method Field\ArrayField array($column, $labelOrCallback, $callback = null) + * @method Field\SelectTable selectTable($column, $label = '') + * @method Field\MultipleSelectTable multipleSelectTable($column, $label = '') */ class EmbeddedForm { @@ -97,7 +97,7 @@ class EmbeddedForm /** * EmbeddedForm constructor. * - * @param string $column + * @param string $column */ public function __construct($column) { @@ -119,8 +119,7 @@ public function fields() /** * Set parent form for this form. * - * @param Form $parent - * + * @param Form $parent * @return $this */ public function setParent($parent) @@ -143,8 +142,7 @@ public function model() /** * Set original values for fields. * - * @param array $data - * + * @param array $data * @return $this */ public function setOriginal($data) @@ -165,8 +163,7 @@ public function setOriginal($data) /** * Prepare for insert or update. * - * @param array $input - * + * @param array $input * @return mixed */ public function prepare($input) @@ -182,9 +179,8 @@ public function prepare($input) /** * Do prepare work for each field. * - * @param string $key - * @param string $record - * + * @param string $key + * @param string $record * @return mixed */ protected function prepareValue($key, $record) @@ -203,8 +199,7 @@ protected function prepareValue($key, $record) /** * Set original data for each field. * - * @param string $key - * + * @param string $key * @return void */ protected function setFieldOriginalValue($key) @@ -221,8 +216,7 @@ protected function setFieldOriginalValue($key) /** * Fill data to all fields in form. * - * @param array $data - * + * @param array $data * @return $this */ public function fill(array $data) @@ -237,8 +231,7 @@ public function fill(array $data) /** * Format form, set `element name` `error key` and `element class`. * - * @param Field $field - * + * @param Field $field * @return Field */ protected function formatField(Field $field) @@ -279,8 +272,7 @@ protected function formatClass(string $column) /** * Add a field to form. * - * @param Field $field - * + * @param Field $field * @return $this */ public function pushField(Field $field) @@ -299,9 +291,8 @@ public function pushField(Field $field) /** * Add nested-form fields dynamically. * - * @param string $method - * @param array $arguments - * + * @param string $method + * @param array $arguments * @return Field|$this */ public function __call($method, $arguments) diff --git a/src/Form/Field.php b/src/Form/Field.php index 968fa2815..79567c6e8 100755 --- a/src/Form/Field.php +++ b/src/Form/Field.php @@ -228,8 +228,8 @@ class Field implements Renderable /** * Field constructor. * - * @param string|array $column - * @param array $arguments + * @param string|array $column + * @param array $arguments */ public function __construct($column, $arguments = []) { @@ -240,8 +240,7 @@ public function __construct($column, $arguments = []) } /** - * @param array $options - * + * @param array $options * @return $this */ public function setRelation(array $options = []) @@ -252,8 +251,7 @@ public function setRelation(array $options = []) /** * Format the label value. * - * @param array $arguments - * + * @param array $arguments * @return string */ protected function formatLabel($arguments = []) @@ -270,8 +268,7 @@ protected function formatLabel($arguments = []) /** * Format the name of the field. * - * @param string $column - * + * @param string $column * @return array|mixed|string */ protected function formatName($column) @@ -282,8 +279,7 @@ protected function formatName($column) /** * Set form element name. * - * @param string|array $name - * + * @param string|array $name * @return $this * * @author Edwin Hui @@ -308,8 +304,7 @@ public function getElementName() /** * Fill data to the field. * - * @param array $data - * + * @param array $data * @return void */ final public function fill($data) @@ -326,8 +321,7 @@ final public function fill($data) /** * Format field data. * - * @param array $data - * + * @param array $data * @return mixed */ protected function formatFieldData($data) @@ -346,10 +340,9 @@ protected function formatFieldData($data) } /** - * @param array $data - * @param string $column - * @param mixed $default - * + * @param array $data + * @param string $column + * @param mixed $default * @return mixed */ protected function getValueFromData($data, $column = null, $default = null) @@ -371,8 +364,7 @@ protected function normalizeColumn(?string $column = null) /** * custom format form column data when edit. * - * @param \Closure $call - * + * @param \Closure $call * @return $this */ public function customFormat(\Closure $call) @@ -385,8 +377,7 @@ public function customFormat(\Closure $call) /** * Set original value to the field. * - * @param array $data - * + * @param array $data * @return void */ final public function setOriginal($data) @@ -399,8 +390,8 @@ final public function setOriginal($data) } /** - * @param string $key - * @param Fluent|null $dataremoveField + * @param string $key + * @param Fluent|null $dataremoveField */ protected function callCustomFormatter($key = 'value', Fluent $data = null) { @@ -416,8 +407,7 @@ protected function callCustomFormatter($key = 'value', Fluent $data = null) } /** - * @param Form|WidgetForm $form - * + * @param Form|WidgetForm $form * @return $this */ public function setForm($form = null) @@ -428,8 +418,7 @@ public function setForm($form = null) } /** - * @param WidgetForm $form - * + * @param WidgetForm $form * @return $this */ public function setParent($form = null) @@ -450,9 +439,8 @@ public function values() /** * Set width for field and label. * - * @param int $field - * @param int $label - * + * @param int $field + * @param int $label * @return $this */ public function width($field = 8, $label = 2) @@ -468,8 +456,7 @@ public function width($field = 8, $label = 2) /** * Set the field options. * - * @param array $options - * + * @param array $options * @return $this */ public function options($options = []) @@ -484,8 +471,7 @@ public function options($options = []) } /** - * @param array $options - * + * @param array $options * @return $this */ public function replaceOptions($options) @@ -500,8 +486,7 @@ public function replaceOptions($options) } /** - * @param array|Arrayable $options - * + * @param array|Arrayable $options * @return $this */ public function mergeOptions($options) @@ -512,8 +497,7 @@ public function mergeOptions($options) /** * Set the field option checked. * - * @param array $checked - * + * @param array $checked * @return $this */ public function checked($checked = []) @@ -530,8 +514,7 @@ public function checked($checked = []) /** * Set key for error message. * - * @param string|array $key - * + * @param string|array $key * @return $this */ public function setErrorKey($key) @@ -554,8 +537,7 @@ public function getErrorKey() /** * Set or get value of the field. * - * @param null $value - * + * @param null $value * @return mixed|$this */ public function value($value = null) @@ -579,8 +561,7 @@ public function value($value = null) /** * Set or get data. * - * @param array $data - * + * @param array $data * @return $this|Fluent */ public function data(array $data = null) @@ -601,9 +582,8 @@ public function data(array $data = null) /** * Get or set default value for field. * - * @param mixed $default - * @param bool $edit - * + * @param mixed $default + * @param bool $edit * @return $this|mixed */ public function default($default = null, bool $edit = false) @@ -636,9 +616,8 @@ public function default($default = null, bool $edit = false) /** * Set help block for current field. * - * @param string $text - * @param string $icon - * + * @param string $text + * @param string $icon * @return $this */ public function help($text = '', $icon = 'feather icon-help-circle') @@ -661,8 +640,7 @@ public function column() /** * Get or set label of the field. * - * @param null $label - * + * @param null $label * @return $this|string */ public function label($label = null) @@ -693,9 +671,8 @@ public function original() /** * Sanitize input data. * - * @param array $input - * @param string $column - * + * @param array $input + * @param string $column * @return array */ protected function sanitizeInput($input, $column) @@ -711,9 +688,8 @@ protected function sanitizeInput($input, $column) /** * Add html attributes to elements. * - * @param array|string $attribute - * @param mixed $value - * + * @param array|string $attribute + * @param mixed $value * @return $this */ public function attribute($attribute, $value = null) @@ -728,8 +704,7 @@ public function attribute($attribute, $value = null) } /** - * @param string $key - * + * @param string $key * @return bool */ public function hasAttribute(string $key) @@ -738,8 +713,7 @@ public function hasAttribute(string $key) } /** - * @param string $key - * + * @param string $key * @return mixed|null */ public function getAttribute(string $key) @@ -750,9 +724,8 @@ public function getAttribute(string $key) /** * Specifies a regular expression against which to validate the value of the input. * - * @param string $error - * @param string $regexp - * + * @param string $error + * @param string $regexp * @return $this */ public function pattern($regexp, $error = null) @@ -767,8 +740,7 @@ public function pattern($regexp, $error = null) /** * set the input filed required. * - * @param bool $isLabelAsterisked - * + * @param bool $isLabelAsterisked * @return $this */ public function required($isLabelAsterisked = true) @@ -785,8 +757,7 @@ public function required($isLabelAsterisked = true) /** * Set the field automatically get focus. * - * @param bool $value - * + * @param bool $value * @return $this */ public function autofocus(bool $value = true) @@ -797,8 +768,7 @@ public function autofocus(bool $value = true) /** * Set the field as readonly mode. * - * @param bool $value - * + * @param bool $value * @return $this */ public function readOnly(bool $value = true) @@ -815,8 +785,7 @@ public function readOnly(bool $value = true) /** * Set field as disabled. * - * @param bool $value - * + * @param bool $value * @return $this */ public function disable(bool $value = true) @@ -833,8 +802,7 @@ public function disable(bool $value = true) /** * Get or set field placeholder. * - * @param string $placeholder - * + * @param string $placeholder * @return $this|string */ public function placeholder($placeholder = null) @@ -857,8 +825,7 @@ protected function defaultPlaceholder() } /** - * @param mixed $value - * + * @param mixed $value * @return mixed */ protected function prepareInputValue($value) @@ -867,8 +834,7 @@ protected function prepareInputValue($value) } /** - * @param \Closure $closure - * + * @param \Closure $closure * @return $this */ public function saving(\Closure $closure) @@ -881,8 +847,7 @@ public function saving(\Closure $closure) /** * Prepare for a field value before update or insert. * - * @param mixed $value - * + * @param mixed $value * @return mixed */ final public function prepare($value) @@ -915,8 +880,7 @@ protected function formatAttributes() } /** - * @param bool $value - * + * @param bool $value * @return $this */ public function horizontal(bool $value = true) @@ -949,9 +913,8 @@ public function getViewElementClasses() /** * Set element class. * - * @param string|array $class - * @param bool $normalize - * + * @param string|array $class + * @param bool $normalize * @return $this */ public function setElementClass($class, bool $normalize = true) @@ -968,9 +931,8 @@ public function setElementClass($class, bool $normalize = true) /** * Add element class. * - * @param string|array $class - * @param bool $normalize - * + * @param string|array $class + * @param bool $normalize * @return $this */ public function addElementClass($class, bool $normalize = false) @@ -1005,8 +967,7 @@ protected function getDefaultElementClass() } /** - * @param string|array $class - * + * @param string|array $class * @return array|string */ public function normalizeElementClass($class) @@ -1092,7 +1053,6 @@ protected function getFormElementId() * Remove element class. * * @param $class - * * @return $this */ public function removeElementClass($class) @@ -1103,9 +1063,8 @@ public function removeElementClass($class) } /** - * @param array|string $labelClass - * @param bool $append - * + * @param array|string $labelClass + * @param bool $append * @return $this|string */ public function setLabelClass($labelClass, bool $append = true) @@ -1128,7 +1087,6 @@ public function getLabelClass() /** * @param mixed $value * @param callable $callback - * * @return $this|mixed */ public function when($value, $callback) @@ -1141,9 +1099,8 @@ public function when($value, $callback) } /** - * @param string|array $class - * @param bool $append - * + * @param string|array $class + * @param bool $append * @return $this */ public function setFormGroupClass($class, bool $append = true) @@ -1164,9 +1121,8 @@ public function getFormGroupClass() } /** - * @param string|array $class - * @param bool $append - * + * @param string|array $class + * @param bool $append * @return $this */ public function setFieldClass($class, bool $append = true) @@ -1277,9 +1233,8 @@ public function display(bool $display) /** * 设置默认属性. * - * @param string $attribute - * @param mixed $value - * + * @param string $attribute + * @param mixed $value * @return $this */ public function defaultAttribute(string $attribute, $value) @@ -1304,8 +1259,7 @@ protected function shouldRender() /** * 保存数据为json格式. * - * @param int $option - * + * @param int $option * @return $this */ public function saveAsJson($option = 0) diff --git a/src/Form/Field/CanCascadeFields.php b/src/Form/Field/CanCascadeFields.php index ac2e915de..5a293e324 100644 --- a/src/Form/Field/CanCascadeFields.php +++ b/src/Form/Field/CanCascadeFields.php @@ -26,7 +26,6 @@ trait CanCascadeFields * @param $operator * @param $value * @param $closure - * * @return $this */ public function when($operator, $value, $closure = null) @@ -54,8 +53,8 @@ protected function getDefaultOperator() } /** - * @param string $operator - * @param mixed $value + * @param string $operator + * @param mixed $value */ protected function formatValues(string $operator, &$value) { @@ -71,9 +70,9 @@ protected function formatValues(string $operator, &$value) } /** - * @param string $operator - * @param mixed $value - * @param \Closure $closure + * @param string $operator + * @param mixed $value + * @param \Closure $closure */ protected function addDependents(string $operator, $value, \Closure $closure) { @@ -87,8 +86,7 @@ protected function addDependents(string $operator, $value, \Closure $closure) } /** - * @param mixed $value - * + * @param mixed $value * @return string */ protected function getCascadeClass($value, string $operator) diff --git a/src/Form/Field/CanLoadFields.php b/src/Form/Field/CanLoadFields.php index 4d4ac8042..3cb968494 100644 --- a/src/Form/Field/CanLoadFields.php +++ b/src/Form/Field/CanLoadFields.php @@ -9,11 +9,10 @@ trait CanLoadFields /** * 联动加载. * - * @param string $field - * @param string $sourceUrl - * @param string $idField - * @param string $textField - * + * @param string $field + * @param string $sourceUrl + * @param string $idField + * @param string $textField * @return $this */ public function load($field, $sourceUrl, string $idField = 'id', string $textField = 'text') @@ -24,11 +23,10 @@ public function load($field, $sourceUrl, string $idField = 'id', string $textFie /** * 联动加载多个字段. * - * @param array|string $fields - * @param array|string $sourceUrls - * @param string $idField - * @param string $textField - * + * @param array|string $fields + * @param array|string $sourceUrls + * @param string $idField + * @param string $textField * @return $this */ public function loads($fields = [], $sourceUrls = [], string $idField = 'id', string $textField = 'text') diff --git a/src/Form/Field/CascadeGroup.php b/src/Form/Field/CascadeGroup.php index 8f7022bd0..a0f849656 100644 --- a/src/Form/Field/CascadeGroup.php +++ b/src/Form/Field/CascadeGroup.php @@ -19,7 +19,7 @@ class CascadeGroup extends Field /** * CascadeGroup constructor. * - * @param array $dependency + * @param array $dependency */ public function __construct(array $dependency) { @@ -27,8 +27,7 @@ public function __construct(array $dependency) } /** - * @param Field $field - * + * @param Field $field * @return bool */ public function dependsOn(Field $field) diff --git a/src/Form/Field/Checkbox.php b/src/Form/Field/Checkbox.php index ca55a6ad6..09d6cd614 100755 --- a/src/Form/Field/Checkbox.php +++ b/src/Form/Field/Checkbox.php @@ -20,8 +20,7 @@ class Checkbox extends MultipleSelect protected $inline = true; /** - * @param array|\Closure|string $options - * + * @param array|\Closure|string $options * @return $this|mixed */ public function options($options = []) @@ -40,8 +39,7 @@ public function options($options = []) /** * "info", "primary", "inverse", "danger", "success", "purple". * - * @param string $style - * + * @param string $style * @return $this */ public function style(string $style) diff --git a/src/Form/Field/Currency.php b/src/Form/Field/Currency.php index 17fe09a2a..33a7782da 100755 --- a/src/Form/Field/Currency.php +++ b/src/Form/Field/Currency.php @@ -22,8 +22,7 @@ class Currency extends Text /** * Set symbol for currency field. * - * @param string $symbol - * + * @param string $symbol * @return $this */ public function symbol($symbol) @@ -36,8 +35,7 @@ public function symbol($symbol) /** * Set digits for input number. * - * @param int $digits - * + * @param int $digits * @return $this */ public function digits($digits) @@ -46,8 +44,7 @@ public function digits($digits) } /** - * @param mixed $value - * + * @param mixed $value * @return mixed */ protected function prepareInputValue($value) diff --git a/src/Form/Field/Editor.php b/src/Form/Field/Editor.php index 2694cbade..ca9908711 100755 --- a/src/Form/Field/Editor.php +++ b/src/Form/Field/Editor.php @@ -45,8 +45,7 @@ class Editor extends Field /** * 设置文件上传存储配置. * - * @param string $disk - * + * @param string $disk * @return $this */ public function disk(string $disk) @@ -59,8 +58,7 @@ public function disk(string $disk) /** * 设置图片上传文件夹. * - * @param string $dir - * + * @param string $dir * @return $this */ public function imageDirectory(string $dir) @@ -73,8 +71,7 @@ public function imageDirectory(string $dir) /** * 自定义图片上传接口. * - * @param string $url - * + * @param string $url * @return $this */ public function imageUrl(string $url) @@ -85,8 +82,7 @@ public function imageUrl(string $url) /** * 设置语言包url. * - * @param string $url - * + * @param string $url * @return $this */ public function languageUrl(string $url) @@ -97,8 +93,7 @@ public function languageUrl(string $url) /** * 设置编辑器高度. * - * @param int $height - * + * @param int $height * @return $this */ public function height(int $height) @@ -130,8 +125,7 @@ protected function defaultImageUploadUrl() } /** - * @param string $url - * + * @param string $url * @return string */ protected function formatUrl(string $url) diff --git a/src/Form/Field/Embeds.php b/src/Form/Field/Embeds.php index c019c45ce..5ab6e4bee 100755 --- a/src/Form/Field/Embeds.php +++ b/src/Form/Field/Embeds.php @@ -22,8 +22,8 @@ class Embeds extends Field /** * Create a new HasMany field instance. * - * @param string $column - * @param array $arguments + * @param string $column + * @param array $arguments */ public function __construct($column, $arguments = []) { @@ -42,8 +42,7 @@ public function __construct($column, $arguments = []) /** * Prepare input data for insert or update. * - * @param array $input - * + * @param array $input * @return array */ protected function prepareInputValue($input) @@ -146,9 +145,8 @@ public function getValidator(array $input) /** * Format validation messages. * - * @param array $input - * @param array $messages - * + * @param array $input + * @param array $messages * @return array */ protected function formatValidationMessages(array $input, array $messages) @@ -164,10 +162,9 @@ protected function formatValidationMessages(array $input, array $messages) /** * Format validation attributes. * - * @param array $input - * @param string $label - * @param string $column - * + * @param array $input + * @param string $label + * @param string $column * @return array */ protected function formatValidationAttribute($input, $label, $column) @@ -200,9 +197,8 @@ protected function formatValidationAttribute($input, $label, $column) /** * Reset input key for validation. * - * @param array $input - * @param array $column $column is the column name array set - * + * @param array $input + * @param array $column $column is the column name array set * @return void. */ public function resetInputKey(array &$input, array $column) diff --git a/src/Form/Field/File.php b/src/Form/Field/File.php index a29ac7e0c..47e122962 100755 --- a/src/Form/Field/File.php +++ b/src/Form/Field/File.php @@ -186,10 +186,9 @@ protected function formatValue() * * @see http://fex.baidu.com/webuploader/doc/index.html#WebUploader_Uploader_events * - * @param string $event - * @param string $script - * @param bool $once - * + * @param string $event + * @param string $script + * @param bool $once * @return $this */ public function on(string $event, string $script, bool $once = false) @@ -206,9 +205,8 @@ public function on(string $event, string $script, bool $once = false) * * @see http://fex.baidu.com/webuploader/doc/index.html#WebUploader_Uploader_events * - * @param string $event - * @param string $script - * + * @param string $event + * @param string $script * @return $this */ public function once(string $event, string $script) @@ -217,9 +215,8 @@ public function once(string $event, string $script) } /** - * @param Field $field - * @param string|array $fieldRules - * + * @param Field $field + * @param string|array $fieldRules * @return void */ public static function deleteRules(Field $field, &$fieldRules) diff --git a/src/Form/Field/HasMany.php b/src/Form/Field/HasMany.php index ceecee147..f5f50cef0 100755 --- a/src/Form/Field/HasMany.php +++ b/src/Form/Field/HasMany.php @@ -81,7 +81,7 @@ class HasMany extends Field * Create a new HasMany field instance. * * @param $relationName - * @param array $arguments + * @param array $arguments */ public function __construct($relationName, $arguments = []) { @@ -109,8 +109,7 @@ protected function formatClass(string $column) /** * Get validator for this field. * - * @param array $input - * + * @param array $input * @return bool|Validator */ public function getValidator(array $input) @@ -220,9 +219,8 @@ protected function normalizeValidatorInput(Field $field, array &$input) /** * Format validation messages. * - * @param array $input - * @param array $messages - * + * @param array $input + * @param array $messages * @return array */ protected function formatValidationMessages(array $input, array $messages) @@ -242,10 +240,9 @@ protected function formatValidationMessages(array $input, array $messages) /** * Format validation attributes. * - * @param array $input - * @param string $label - * @param string $column - * + * @param array $input + * @param string $label + * @param string $column * @return array */ protected function formatValidationAttribute($input, $label, $column) @@ -278,9 +275,8 @@ protected function formatValidationAttribute($input, $label, $column) /** * Reset input key for validation. * - * @param array $input - * @param array $column $column is the column name array set - * + * @param array $input + * @param array $column $column is the column name array set * @return void. */ protected function resetInputKey(array &$input, array $column) @@ -342,8 +338,7 @@ protected function resetInputKey(array &$input, array $column) /** * Prepare input data for insert or update. * - * @param array $input - * + * @param array $input * @return array */ protected function prepareInputValue($input) @@ -358,8 +353,7 @@ protected function prepareInputValue($input) /** * Build a Nested form. * - * @param null $key - * + * @param null $key * @return NestedForm */ public function buildNestedForm($key = null) @@ -394,7 +388,7 @@ public function getKeyName() } /** - * @param string $relationKeyName + * @param string $relationKeyName */ public function setRelationKeyName(?string $relationKeyName) { @@ -406,8 +400,7 @@ public function setRelationKeyName(?string $relationKeyName) /** * Set view mode. * - * @param string $mode currently support `tab` mode. - * + * @param string $mode currently support `tab` mode. * @return $this * * @author Edwin Hui @@ -442,9 +435,9 @@ public function useTable() /** * Build Nested form for related data. * - * @throws \Exception - * * @return array + * + * @throws \Exception */ protected function buildRelatedForms() { @@ -507,9 +500,9 @@ public function value($value = null) /** * Render the `HasMany` field. * - * @throws \Exception - * * @return \Illuminate\View\View|string + * + * @throws \Exception */ public function render() { @@ -539,9 +532,9 @@ public function render() /** * Render the `HasMany` field for table style. * - * @throws \Exception - * * @return mixed + * + * @throws \Exception */ protected function renderTable() { diff --git a/src/Form/Field/Html.php b/src/Form/Field/Html.php index a44185a9e..39cbf4d02 100755 --- a/src/Form/Field/Html.php +++ b/src/Form/Field/Html.php @@ -28,8 +28,8 @@ class Html extends Field /** * Create a new Html instance. * - * @param mixed $html - * @param array $arguments + * @param mixed $html + * @param array $arguments */ public function __construct($html, $arguments) { diff --git a/src/Form/Field/Image.php b/src/Form/Field/Image.php index 9b753fdd6..fad5b70ab 100755 --- a/src/Form/Field/Image.php +++ b/src/Form/Field/Image.php @@ -5,45 +5,45 @@ use Symfony\Component\HttpFoundation\File\UploadedFile; /** - * @method $this backup(string $name = 'default') Backups current image state as fallback for reset method under an optional name. Overwrites older state on every call, unless a different name is passed. - * @method $this blur(int $amount = 1) Apply a gaussian blur filter with a optional amount on the current image. Use values between 0 and 100. - * @method $this brightness(int $level) Changes the brightness of the current image by the given level. Use values between -100 for min. brightness. 0 for no change and +100 for max. brightness. - * @method $this cache(\Closure $callback, int $lifetime = null, boolean $returnObj = false) Method to create a new cached image instance from a Closure callback. Pass a lifetime in minutes for the callback and decide whether you want to get an Intervention Image instance as return value or just receive the image stream. - * @method $this canvas(int $width, int $height, mixed $bgcolor = null) Factory method to create a new empty image instance with given width and height. You can define a background-color optionally. By default the canvas background is transparent. - * @method $this circle(int $radius, int $x, int $y, \Closure $callback = null) Draw a circle at given x, y, coordinates with given radius. You can define the appearance of the circle by an optional closure callback. - * @method $this colorize(int $red, int $green, int $blue) Change the RGB color values of the current image on the given channels red, green and blue. The input values are normalized so you have to include parameters from 100 for maximum color value. 0 for no change and -100 to take out all the certain color on the image. - * @method $this contrast(int $level) Changes the contrast of the current image by the given level. Use values between -100 for min. contrast 0 for no change and +100 for max. contrast. - * @method $this crop(int $width, int $height, int $x = null, int $y = null) Cut out a rectangular part of the current image with given width and height. Define optional x,y coordinates to move the top-left corner of the cutout to a certain position. - * @method $this ellipse(int $width, int $height, int $x, int $y, \Closure $callback = null) Draw a colored ellipse at given x, y, coordinates. You can define width and height and set the appearance of the circle by an optional closure callback. - * @method $this exif(string $key = null) Read Exif meta data from current image. - * @method $this iptc(string $key = null) Read Iptc meta data from current image. - * @method $this flip(string $mode = 'h') Mirror the current image horizontally or vertically by specifying the mode. - * @method $this fit(int $width, int $height = null, \Closure $callback = null, string $position = 'center') Combine cropping and resizing to format image in a smart way. The method will find the best fitting aspect ratio of your given width and height on the current image automatically, cut it out and resize it to the given dimension. You may pass an optional Closure callback as third parameter, to prevent possible upsizing and a custom position of the cutout as fourth parameter. - * @method $this gamma(float $correction) Performs a gamma correction operation on the current image. - * @method $this greyscale() Turns image into a greyscale version. - * @method $this heighten(int $height, \Closure $callback = null) Resizes the current image to new height, constraining aspect ratio. Pass an optional Closure callback as third parameter, to apply additional constraints like preventing possible upsizing. - * @method $this insert(mixed $source, string $position = 'top-left', int $x = 0, int $y = 0) Paste a given image source over the current image with an optional position and a offset coordinate. This method can be used to apply another image as watermark because the transparency values are maintained. - * @method $this interlace(boolean $interlace = true) Determine whether an image should be encoded in interlaced or standard mode by toggling interlace mode with a boolean parameter. If an JPEG image is set interlaced the image will be processed as a progressive JPEG. - * @method $this invert() Reverses all colors of the current image. - * @method $this limitColors(int $count, mixed $matte = null) Method converts the existing colors of the current image into a color table with a given maximum count of colors. The function preserves as much alpha channel information as possible and blends transarent pixels against a optional matte color. - * @method $this line(int $x1, int $y1, int $x2, int $y2, \Closure $callback = null) Draw a line from x,y point 1 to x,y point 2 on current image. Define color and/or width of line in an optional Closure callback. - * @method $this make(mixed $source) Universal factory method to create a new image instance from source, which can be a filepath, a GD image resource, an Imagick object or a binary image data. - * @method $this mask(mixed $source, boolean $mask_with_alpha) Apply a given image source as alpha mask to the current image to change current opacity. Mask will be resized to the current image size. By default a greyscale version of the mask is converted to alpha values, but you can set mask_with_alpha to apply the actual alpha channel. Any transparency values of the current image will be maintained. - * @method $this opacity(int $transparency) Set the opacity in percent of the current image ranging from 100% for opaque and 0% for full transparency. - * @method $this orientate() This method reads the EXIF image profile setting 'Orientation' and performs a rotation on the image to display the image correctly. - * @method $this pickColor(int $x, int $y, string $format = 'array') Pick a color at point x, y out of current image and return in optional given format. - * @method $this pixel(mixed $color, int $x, int $y) Draw a single pixel in given color on x, y position. - * @method $this pixelate(int $size) Applies a pixelation effect to the current image with a given size of pixels. - * @method $this polygon(array $points, \Closure $callback = null) Draw a colored polygon with given points. You can define the appearance of the polygon by an optional closure callback. - * @method $this rectangle(int $x1, int $y1, int $x2, int $y2, \Closure $callback = null) Draw a colored rectangle on current image with top-left corner on x,y point 1 and bottom-right corner at x,y point 2. Define the overall appearance of the shape by passing a Closure callback as an optional parameter. - * @method $this reset(string $name = 'default') Resets all of the modifications to a state saved previously by backup under an optional name. - * @method $this resize(int $width, int $height = null, \Closure $callback = null) Resizes current image based on given width and/or height. To contraint the resize command, pass an optional Closure callback as third parameter. - * @method $this resizeCanvas(int $width, int $height, string $anchor = 'center', boolean $relative = false, mixed $bgcolor = null) Resize the boundaries of the current image to given width and height. An anchor can be defined to determine from what point of the image the resizing is going to happen. Set the mode to relative to add or subtract the given width or height to the actual image dimensions. You can also pass a background color for the emerging area of the image. - * @method $this rotate(float $angle, mixed $bgcolor = null) Rotate the current image counter-clockwise by a given angle. Optionally define a background color for the uncovered zone after the rotation. - * @method $this sharpen(int $amount = 10) Sharpen current image with an optional amount. Use values between 0 and 100. - * @method $this text(string $text, int $x = 0, int $y = 0, \Closure $callback = null) Write a text string to the current image at an optional x,y basepoint position. You can define more details like font-size, font-file and alignment via a callback as the fourth parameter. + * @method $this backup(string $name = 'default') Backups current image state as fallback for reset method under an optional name. Overwrites older state on every call, unless a different name is passed. + * @method $this blur(int $amount = 1) Apply a gaussian blur filter with a optional amount on the current image. Use values between 0 and 100. + * @method $this brightness(int $level) Changes the brightness of the current image by the given level. Use values between -100 for min. brightness. 0 for no change and +100 for max. brightness. + * @method $this cache(\Closure $callback, int $lifetime = null, boolean $returnObj = false) Method to create a new cached image instance from a Closure callback. Pass a lifetime in minutes for the callback and decide whether you want to get an Intervention Image instance as return value or just receive the image stream. + * @method $this canvas(int $width, int $height, mixed $bgcolor = null) Factory method to create a new empty image instance with given width and height. You can define a background-color optionally. By default the canvas background is transparent. + * @method $this circle(int $radius, int $x, int $y, \Closure $callback = null) Draw a circle at given x, y, coordinates with given radius. You can define the appearance of the circle by an optional closure callback. + * @method $this colorize(int $red, int $green, int $blue) Change the RGB color values of the current image on the given channels red, green and blue. The input values are normalized so you have to include parameters from 100 for maximum color value. 0 for no change and -100 to take out all the certain color on the image. + * @method $this contrast(int $level) Changes the contrast of the current image by the given level. Use values between -100 for min. contrast 0 for no change and +100 for max. contrast. + * @method $this crop(int $width, int $height, int $x = null, int $y = null) Cut out a rectangular part of the current image with given width and height. Define optional x,y coordinates to move the top-left corner of the cutout to a certain position. + * @method $this ellipse(int $width, int $height, int $x, int $y, \Closure $callback = null) Draw a colored ellipse at given x, y, coordinates. You can define width and height and set the appearance of the circle by an optional closure callback. + * @method $this exif(string $key = null) Read Exif meta data from current image. + * @method $this iptc(string $key = null) Read Iptc meta data from current image. + * @method $this flip(string $mode = 'h') Mirror the current image horizontally or vertically by specifying the mode. + * @method $this fit(int $width, int $height = null, \Closure $callback = null, string $position = 'center') Combine cropping and resizing to format image in a smart way. The method will find the best fitting aspect ratio of your given width and height on the current image automatically, cut it out and resize it to the given dimension. You may pass an optional Closure callback as third parameter, to prevent possible upsizing and a custom position of the cutout as fourth parameter. + * @method $this gamma(float $correction) Performs a gamma correction operation on the current image. + * @method $this greyscale() Turns image into a greyscale version. + * @method $this heighten(int $height, \Closure $callback = null) Resizes the current image to new height, constraining aspect ratio. Pass an optional Closure callback as third parameter, to apply additional constraints like preventing possible upsizing. + * @method $this insert(mixed $source, string $position = 'top-left', int $x = 0, int $y = 0) Paste a given image source over the current image with an optional position and a offset coordinate. This method can be used to apply another image as watermark because the transparency values are maintained. + * @method $this interlace(boolean $interlace = true) Determine whether an image should be encoded in interlaced or standard mode by toggling interlace mode with a boolean parameter. If an JPEG image is set interlaced the image will be processed as a progressive JPEG. + * @method $this invert() Reverses all colors of the current image. + * @method $this limitColors(int $count, mixed $matte = null) Method converts the existing colors of the current image into a color table with a given maximum count of colors. The function preserves as much alpha channel information as possible and blends transarent pixels against a optional matte color. + * @method $this line(int $x1, int $y1, int $x2, int $y2, \Closure $callback = null) Draw a line from x,y point 1 to x,y point 2 on current image. Define color and/or width of line in an optional Closure callback. + * @method $this make(mixed $source) Universal factory method to create a new image instance from source, which can be a filepath, a GD image resource, an Imagick object or a binary image data. + * @method $this mask(mixed $source, boolean $mask_with_alpha) Apply a given image source as alpha mask to the current image to change current opacity. Mask will be resized to the current image size. By default a greyscale version of the mask is converted to alpha values, but you can set mask_with_alpha to apply the actual alpha channel. Any transparency values of the current image will be maintained. + * @method $this opacity(int $transparency) Set the opacity in percent of the current image ranging from 100% for opaque and 0% for full transparency. + * @method $this orientate() This method reads the EXIF image profile setting 'Orientation' and performs a rotation on the image to display the image correctly. + * @method $this pickColor(int $x, int $y, string $format = 'array') Pick a color at point x, y out of current image and return in optional given format. + * @method $this pixel(mixed $color, int $x, int $y) Draw a single pixel in given color on x, y position. + * @method $this pixelate(int $size) Applies a pixelation effect to the current image with a given size of pixels. + * @method $this polygon(array $points, \Closure $callback = null) Draw a colored polygon with given points. You can define the appearance of the polygon by an optional closure callback. + * @method $this rectangle(int $x1, int $y1, int $x2, int $y2, \Closure $callback = null) Draw a colored rectangle on current image with top-left corner on x,y point 1 and bottom-right corner at x,y point 2. Define the overall appearance of the shape by passing a Closure callback as an optional parameter. + * @method $this reset(string $name = 'default') Resets all of the modifications to a state saved previously by backup under an optional name. + * @method $this resize(int $width, int $height = null, \Closure $callback = null) Resizes current image based on given width and/or height. To contraint the resize command, pass an optional Closure callback as third parameter. + * @method $this resizeCanvas(int $width, int $height, string $anchor = 'center', boolean $relative = false, mixed $bgcolor = null) Resize the boundaries of the current image to given width and height. An anchor can be defined to determine from what point of the image the resizing is going to happen. Set the mode to relative to add or subtract the given width or height to the actual image dimensions. You can also pass a background color for the emerging area of the image. + * @method $this rotate(float $angle, mixed $bgcolor = null) Rotate the current image counter-clockwise by a given angle. Optionally define a background color for the uncovered zone after the rotation. + * @method $this sharpen(int $amount = 10) Sharpen current image with an optional amount. Use values between 0 and 100. + * @method $this text(string $text, int $x = 0, int $y = 0, \Closure $callback = null) Write a text string to the current image at an optional x,y basepoint position. You can define more details like font-size, font-file and alignment via a callback as the fourth parameter. * @method $this trim(string $base = 'top-left', array $away = array('top', 'bottom', 'left', 'right'), int $tolerance = 0, int $feather = 0) Trim away image space in given color. Define an optional base to pick a color at a certain position and borders that should be trimmed away. You can also set an optional tolerance level, to trim similar colors and add a feathering border around the trimed image. - * @method $this widen(int $width, \Closure $callback = null) Resizes the current image to new width, constraining aspect ratio. Pass an optional Closure callback as third parameter, to apply additional constraints like preventing possible upsizing. + * @method $this widen(int $width, \Closure $callback = null) Resizes the current image to new width, constraining aspect ratio. Pass an optional Closure callback as third parameter, to apply additional constraints like preventing possible upsizing. */ class Image extends File { @@ -71,17 +71,16 @@ protected function setupImage() } /** - * @param array $options support: - * [ - * 'width' => 100, - * 'height' => 100, - * 'min_width' => 100, - * 'min_height' => 100, - * 'max_width' => 100, - * 'max_height' => 100, - * 'ratio' => 3/2, // (width / height) - * ] - * + * @param array $options support: + * [ + * 'width' => 100, + * 'height' => 100, + * 'min_width' => 100, + * 'min_height' => 100, + * 'max_width' => 100, + * 'max_height' => 100, + * 'ratio' => 3/2, // (width / height) + * ] * @return $this */ public function dimensions(array $options) @@ -102,8 +101,7 @@ public function dimensions(array $options) /** * Set ratio constraint. * - * @param float $ratio width/height - * + * @param float $ratio width/height * @return $this */ public function ratio($ratio) @@ -116,7 +114,7 @@ public function ratio($ratio) } /** - * @param UploadedFile $file + * @param UploadedFile $file */ protected function prepareFile(UploadedFile $file) { diff --git a/src/Form/Field/ImageField.php b/src/Form/Field/ImageField.php index 6ec0bf4b5..85149a7dd 100755 --- a/src/Form/Field/ImageField.php +++ b/src/Form/Field/ImageField.php @@ -42,9 +42,8 @@ public function defaultDirectory() /** * Execute Intervention calls. * - * @param string $target - * @param string $mime - * + * @param string $target + * @param string $mime * @return mixed */ public function callInterventionMethods($target, $mime) @@ -68,12 +67,11 @@ public function callInterventionMethods($target, $mime) /** * Call intervention methods. * - * @param string $method - * @param array $arguments + * @param string $method + * @param array $arguments + * @return $this * * @throws \Exception - * - * @return $this */ public function __call($method, $arguments) { @@ -94,10 +92,9 @@ public function __call($method, $arguments) } /** - * @param string|array $name - * @param int $width - * @param int $height - * + * @param string|array $name + * @param int $width + * @param int $height * @return $this */ public function thumbnail($name, int $width = null, int $height = null) @@ -118,9 +115,8 @@ public function thumbnail($name, int $width = null, int $height = null) /** * Destroy original thumbnail files. * - * @param string|array $file - * @param bool $force - * + * @param string|array $file + * @param bool $force * @return void. */ public function destroyThumbnail($file = null, bool $force = false) @@ -161,8 +157,7 @@ public function destroyThumbnail($file = null, bool $force = false) /** * Upload file and delete original thumbnail files. * - * @param UploadedFile $file - * + * @param UploadedFile $file * @return $this */ protected function uploadAndDeleteOriginalThumbnail(UploadedFile $file) diff --git a/src/Form/Field/ListField.php b/src/Form/Field/ListField.php index cef97a9d5..e224517ff 100644 --- a/src/Form/Field/ListField.php +++ b/src/Form/Field/ListField.php @@ -28,8 +28,7 @@ class ListField extends Field /** * Set Max list size. * - * @param int $size - * + * @param int $size * @return $this */ public function max(int $size) @@ -42,8 +41,7 @@ public function max(int $size) /** * Set Minimum list size. * - * @param int $size - * + * @param int $size * @return $this */ public function min(int $size) diff --git a/src/Form/Field/Markdown.php b/src/Form/Field/Markdown.php index be074aa0f..8bfce5406 100644 --- a/src/Form/Field/Markdown.php +++ b/src/Form/Field/Markdown.php @@ -47,8 +47,7 @@ class Markdown extends Field * 开启 HTML 标签解析. * style,script,iframe|on*. * - * @param string $decode - * + * @param string $decode * @return $this */ public function htmlDecode($decode) @@ -61,8 +60,7 @@ public function htmlDecode($decode) /** * 设置编辑器容器高度. * - * @param int $height - * + * @param int $height * @return $this */ public function height($height) @@ -75,8 +73,7 @@ public function height($height) /** * 设置文件上传存储配置. * - * @param string $disk - * + * @param string $disk * @return $this */ public function disk(string $disk) @@ -89,8 +86,7 @@ public function disk(string $disk) /** * 设置图片上传文件夹. * - * @param string $dir - * + * @param string $dir * @return $this */ public function imageDirectory(string $dir) @@ -103,8 +99,7 @@ public function imageDirectory(string $dir) /** * 自定义图片上传接口. * - * @param string $url - * + * @param string $url * @return $this */ public function imageUrl(string $url) @@ -115,8 +110,7 @@ public function imageUrl(string $url) /** * 设置语言包路径. * - * @param string $url - * + * @param string $url * @return $this */ public function languageUrl(string $url) @@ -135,8 +129,7 @@ protected function defaultImageUploadUrl() } /** - * @param string $url - * + * @param string $url * @return string */ protected function formatUrl(string $url) diff --git a/src/Form/Field/MultipleFile.php b/src/Form/Field/MultipleFile.php index 990abcbcb..f26c3fa95 100755 --- a/src/Form/Field/MultipleFile.php +++ b/src/Form/Field/MultipleFile.php @@ -11,8 +11,7 @@ class MultipleFile extends File /** * Allow to sort files. * - * @param bool $value - * + * @param bool $value * @return $this */ public function sortable(bool $value = true) @@ -25,8 +24,7 @@ public function sortable(bool $value = true) /** * Set a limit of files. * - * @param int $limit - * + * @param int $limit * @return $this */ public function limit(int $limit) @@ -42,8 +40,7 @@ public function limit(int $limit) /** * Prepare for saving. * - * @param string|array $file - * + * @param string|array $file * @return array */ protected function prepareInputValue($file) diff --git a/src/Form/Field/MultipleImage.php b/src/Form/Field/MultipleImage.php index 1abd67ddd..679489b52 100755 --- a/src/Form/Field/MultipleImage.php +++ b/src/Form/Field/MultipleImage.php @@ -11,8 +11,7 @@ class MultipleImage extends Image /** * Allow to sort files. * - * @param bool $value - * + * @param bool $value * @return $this */ public function sortable(bool $value = true) @@ -25,8 +24,7 @@ public function sortable(bool $value = true) /** * Set a limit of files. * - * @param int $limit - * + * @param int $limit * @return $this */ public function limit(int $limit) @@ -43,8 +41,7 @@ public function limit(int $limit) /** * Prepare for saving. * - * @param string|array $file - * + * @param string|array $file * @return array */ protected function prepareInputValue($file) diff --git a/src/Form/Field/MultipleSelectTable.php b/src/Form/Field/MultipleSelectTable.php index e0034ffcb..518d3d57a 100644 --- a/src/Form/Field/MultipleSelectTable.php +++ b/src/Form/Field/MultipleSelectTable.php @@ -20,8 +20,7 @@ class MultipleSelectTable extends SelectTable /** * 设置最大选择数量. * - * @param int $max - * + * @param int $max * @return $this */ public function max(int $max) @@ -34,8 +33,7 @@ public function max(int $max) /** * 转化为数组格式保存. * - * @param mixed $value - * + * @param mixed $value * @return array|mixed */ public function prepareInputValue($value) diff --git a/src/Form/Field/Number.php b/src/Form/Field/Number.php index 05e357393..d9d1c60d2 100755 --- a/src/Form/Field/Number.php +++ b/src/Form/Field/Number.php @@ -15,8 +15,7 @@ class Number extends Text /** * Set min value of number field. * - * @param int $value - * + * @param int $value * @return $this */ public function min($value) @@ -29,8 +28,7 @@ public function min($value) /** * Set max value of number field. * - * @param int $value - * + * @param int $value * @return $this */ public function max($value) diff --git a/src/Form/Field/Radio.php b/src/Form/Field/Radio.php index ac26172cf..007cc82f5 100755 --- a/src/Form/Field/Radio.php +++ b/src/Form/Field/Radio.php @@ -19,8 +19,7 @@ class Radio extends Field protected $inline = true; /** - * @param array|\Closure|string $options - * + * @param array|\Closure|string $options * @return $this */ public function options($options = []) @@ -46,8 +45,7 @@ public function inline(bool $inline) /** * "info", "primary", "inverse", "danger", "success", "purple". * - * @param string $style - * + * @param string $style * @return $this */ public function style(string $style) diff --git a/src/Form/Field/Select.php b/src/Form/Field/Select.php index 9f582a3a9..4b97fe722 100755 --- a/src/Form/Field/Select.php +++ b/src/Form/Field/Select.php @@ -29,8 +29,7 @@ class Select extends Field /** * Set options. * - * @param array|\Closure|string $options - * + * @param array|\Closure|string $options * @return $this|mixed */ public function options($options = []) @@ -57,7 +56,7 @@ public function options($options = []) } /** - * @param array $groups + * @param array $groups */ /** @@ -74,8 +73,7 @@ public function options($options = []) * ... * ] * - * @param array $groups - * + * @param array $groups * @return $this */ public function groups(array $groups) @@ -88,10 +86,9 @@ public function groups(array $groups) /** * Load options from current selected resource(s). * - * @param string $model - * @param string $idField - * @param string $textField - * + * @param string $model + * @param string $idField + * @param string $textField * @return $this */ public function model($model, string $idField = 'id', string $textField = 'name') @@ -128,10 +125,9 @@ public function model($model, string $idField = 'id', string $textField = 'name' /** * Load options from remote. * - * @param string $url - * @param array $parameters - * @param array $options - * + * @param string $url + * @param array $parameters + * @param array $options * @return $this */ protected function loadRemoteOptions(string $url, array $parameters = [], array $options = []) @@ -146,9 +142,8 @@ protected function loadRemoteOptions(string $url, array $parameters = [], array } /** - * @param string|array $key - * @param mixed $value - * + * @param string|array $key + * @param mixed $value * @return $this */ public function addDefaultConfig($key, $value = null) @@ -171,10 +166,9 @@ public function addDefaultConfig($key, $value = null) /** * Load options from ajax results. * - * @param string $url + * @param string $url * @param $idField * @param $textField - * * @return $this */ public function ajax(string $url, string $idField = 'id', string $textField = 'text') @@ -193,9 +187,8 @@ public function ajax(string $url, string $idField = 'id', string $textField = 't * * all configurations see https://select2.org/configuration/options-api * - * @param string $key - * @param mixed $val - * + * @param string $key + * @param mixed $val * @return $this */ public function config(string $key, $val) diff --git a/src/Form/Field/SelectTable.php b/src/Form/Field/SelectTable.php index 989e1bab4..96ccbb81b 100644 --- a/src/Form/Field/SelectTable.php +++ b/src/Form/Field/SelectTable.php @@ -33,8 +33,7 @@ public function __construct($column, $arguments = []) /** * 设置弹窗标题. * - * @param string $title - * + * @param string $title * @return $this */ public function title($title) @@ -51,8 +50,7 @@ public function title($title) * $this->width('500px'); * $this->width('50%'); * - * @param string $width - * + * @param string $width * @return $this */ public function dialogWidth(string $width) @@ -65,8 +63,7 @@ public function dialogWidth(string $width) /** * 设置表格异步渲染实例. * - * @param LazyRenderable $renderable - * + * @param LazyRenderable $renderable * @return $this */ public function from(LazyRenderable $renderable) @@ -81,7 +78,6 @@ public function from(LazyRenderable $renderable) * * @param $visibleColumn * @param $key - * * @return $this */ public function pluck(?string $visibleColumn, ?string $key = 'id') @@ -93,8 +89,7 @@ public function pluck(?string $visibleColumn, ?string $key = 'id') } /** - * @param array $options - * + * @param array $options * @return $this */ public function options($options = []) @@ -107,10 +102,9 @@ public function options($options = []) /** * 设置选中数据显示. * - * @param string $model - * @param string $id - * @param string $text - * + * @param string $model + * @param string $id + * @param string $text * @return $this */ public function model(string $model, string $id = 'id', string $text = 'title') diff --git a/src/Form/Field/SwitchField.php b/src/Form/Field/SwitchField.php index e6903ed56..503dc4843 100755 --- a/src/Form/Field/SwitchField.php +++ b/src/Form/Field/SwitchField.php @@ -45,8 +45,7 @@ public function blue() /** * Set color of the switcher. * - * @param string $color - * + * @param string $color * @return $this */ public function color($color) @@ -55,8 +54,7 @@ public function color($color) } /** - * @param string $color - * + * @param string $color * @return $this */ public function secondary($color) @@ -81,8 +79,7 @@ public function large() } /** - * @param mixed $value - * + * @param mixed $value * @return int */ protected function prepareInputValue($value) diff --git a/src/Form/Field/Tags.php b/src/Form/Field/Tags.php index 3ad8168cb..7562e61a7 100755 --- a/src/Form/Field/Tags.php +++ b/src/Form/Field/Tags.php @@ -54,7 +54,6 @@ protected function formatFieldData($data) * * @param $visibleColumn * @param $key - * * @return $this */ public function pluck($visibleColumn, $key = 'id') @@ -72,9 +71,8 @@ public function pluck($visibleColumn, $key = 'id') /** * Sanitize input data. * - * @param array $input - * @param string $column - * + * @param array $input + * @param string $column * @return array */ protected function sanitizeInput($input, $column) @@ -93,8 +91,7 @@ protected function sanitizeInput($input, $column) /** * Set the field options. * - * @param array|Collection|Arrayable|\Closure $options - * + * @param array|Collection|Arrayable|\Closure $options * @return $this|Field */ public function options($options = []) @@ -137,8 +134,7 @@ protected function prepareInputValue($value) /** * Get or set value for this field. * - * @param mixed $value - * + * @param mixed $value * @return $this|array|mixed */ public function value($value = null) @@ -155,10 +151,9 @@ public function value($value = null) /** * Load options from ajax results. * - * @param string $url + * @param string $url * @param $idField * @param $textField - * * @return $this */ public function ajax(string $url, string $idField = 'id', string $textField = 'text') diff --git a/src/Form/Field/Text.php b/src/Form/Field/Text.php index aa9d3c3a4..445ec0fe4 100755 --- a/src/Form/Field/Text.php +++ b/src/Form/Field/Text.php @@ -47,8 +47,7 @@ public function render() /** * Set input type. * - * @param string $type - * + * @param string $type * @return $this */ public function type(string $type) @@ -61,9 +60,8 @@ public function type(string $type) * * @see http://1000hz.github.io/bootstrap-validator/ * - * @param string|Field $field - * @param string $error - * + * @param string|Field $field + * @param string $error * @return $this */ public function same($field, ?string $error = null) @@ -90,9 +88,8 @@ public function same($field, ?string $error = null) } /** - * @param int $length - * @param string|null $error - * + * @param int $length + * @param string|null $error * @return $this */ public function minLength(int $length, ?string $error = null) @@ -110,9 +107,8 @@ public function minLength(int $length, ?string $error = null) } /** - * @param int $length - * @param string|null $error - * + * @param int $length + * @param string|null $error * @return $this */ public function maxLength(int $length, ?string $error = null) @@ -140,8 +136,7 @@ public function maxLength(int $length, ?string $error = null) /** * Add inputmask to an elements. * - * @param array $options - * + * @param array $options * @return $this */ public function inputmask($options) @@ -158,8 +153,7 @@ public function inputmask($options) } /** - * @param array $options - * + * @param array $options * @return array */ protected function formatOptions($options) @@ -186,8 +180,7 @@ protected function formatOptions($options) /** * Add datalist element to Text input. * - * @param array $entries - * + * @param array $entries * @return $this */ public function datalist($entries = []) diff --git a/src/Form/Field/Textarea.php b/src/Form/Field/Textarea.php index 8e5d6e5cc..67743d6a7 100755 --- a/src/Form/Field/Textarea.php +++ b/src/Form/Field/Textarea.php @@ -16,8 +16,7 @@ class Textarea extends Field /** * Set rows of textarea. * - * @param int $rows - * + * @param int $rows * @return $this */ public function rows($rows = 5) diff --git a/src/Form/Field/Tree.php b/src/Form/Field/Tree.php index 7bf7f5f84..f139c161f 100755 --- a/src/Form/Field/Tree.php +++ b/src/Form/Field/Tree.php @@ -49,14 +49,13 @@ class Tree extends Field protected $rootParentId = 0; /** - * @param array|Arrayable|\Closure $data exp: - * { - * "id": "1", - * "parent": "#", - * "text": "Dashboard", - * // "state": {"selected": true} - * } - * + * @param array|Arrayable|\Closure $data exp: + * { + * "id": "1", + * "parent": "#", + * "text": "Dashboard", + * // "state": {"selected": true} + * } * @return $this */ public function nodes($data) @@ -73,8 +72,7 @@ public function nodes($data) /** * 设置父级复选框是否禁止被单独选中. * - * @param bool $value - * + * @param bool $value * @return $this */ public function treeState(bool $value = true) @@ -87,8 +85,7 @@ public function treeState(bool $value = true) /** * 过滤父节点. * - * @param bool $value - * + * @param bool $value * @return $this */ public function exceptParentNode(bool $value = true) @@ -197,8 +194,7 @@ protected function formatNodes() /** * Set type. * - * @param array $value - * + * @param array $value * @return $this */ public function type(array $value) @@ -211,8 +207,7 @@ public function type(array $value) /** * Set plugins. * - * @param array $value - * + * @param array $value * @return $this */ public function plugins(array $value) @@ -223,8 +218,7 @@ public function plugins(array $value) } /** - * @param bool $value - * + * @param bool $value * @return $this */ public function expand(bool $value = true) diff --git a/src/Form/Field/UploadField.php b/src/Form/Field/UploadField.php index 5ef8df9e4..f4b5badd0 100755 --- a/src/Form/Field/UploadField.php +++ b/src/Form/Field/UploadField.php @@ -94,7 +94,6 @@ protected function initStorage() * If name already exists, rename it. * * @param $file - * * @return void */ public function renameIfExists(UploadedFile $file) @@ -115,8 +114,7 @@ protected function getUploadPath() /** * Get store name of upload file. * - * @param UploadedFile $file - * + * @param UploadedFile $file * @return string */ protected function getStoreName(UploadedFile $file) @@ -157,8 +155,7 @@ public function getDirectory() /** * Indicates if the underlying field is retainable. * - * @param bool $retainable - * + * @param bool $retainable * @return $this */ public function retainable(bool $retainable = true) @@ -178,8 +175,7 @@ public function saveFullUrl(bool $value = true) /** * Upload File. * - * @param UploadedFile $file - * + * @param UploadedFile $file * @return Response */ public function upload(UploadedFile $file) @@ -221,7 +217,7 @@ public function upload(UploadedFile $file) } /** - * @param UploadedFile $file + * @param UploadedFile $file */ protected function prepareFile(UploadedFile $file) { @@ -230,9 +226,8 @@ protected function prepareFile(UploadedFile $file) /** * Specify the directory and name for upload file. * - * @param string|\Closure $directory - * @param null|string $name - * + * @param string|\Closure $directory + * @param null|string $name * @return $this */ public function move($directory, $name = null) @@ -247,8 +242,7 @@ public function move($directory, $name = null) /** * Specify the directory upload file. * - * @param string|\Closure $dir - * + * @param string|\Closure $dir * @return $this */ public function dir($dir) @@ -263,8 +257,7 @@ public function dir($dir) /** * Set name of store name. * - * @param string|callable $name - * + * @param string|callable $name * @return $this */ public function name($name) @@ -303,8 +296,7 @@ public function sequenceName() /** * Generate a unique name for uploaded file. * - * @param UploadedFile $file - * + * @param UploadedFile $file * @return string */ protected function generateUniqueName(UploadedFile $file) @@ -315,8 +307,7 @@ protected function generateUniqueName(UploadedFile $file) /** * Generate a sequence name for uploaded file. * - * @param UploadedFile $file - * + * @param UploadedFile $file * @return string */ protected function generateSequenceName(UploadedFile $file) @@ -335,8 +326,7 @@ protected function generateSequenceName(UploadedFile $file) } /** - * @param UploadedFile $file - * + * @param UploadedFile $file * @return bool|\Illuminate\Support\MessageBag */ protected function getValidationErrors(UploadedFile $file) @@ -396,7 +386,7 @@ public function destroyIfChanged($file) /** * Destroy files. * - * @param string|array $path + * @param string|array $path */ public function deleteFile($paths) { @@ -437,11 +427,10 @@ public function getStorage() /** * Set disk for storage. * - * @param string $disk Disks defined in `config/filesystems.php`. + * @param string $disk Disks defined in `config/filesystems.php`. + * @return $this * * @throws \Exception - * - * @return $this */ public function disk($disk) { @@ -466,8 +455,7 @@ public function disk($disk) /** * Get file visit url. * - * @param string $path - * + * @param string $path * @return string */ public function objectUrl($path) @@ -481,7 +469,6 @@ public function objectUrl($path) /** * @param $permission - * * @return $this */ public function storagePermission($permission) diff --git a/src/Form/Field/WebUploader.php b/src/Form/Field/WebUploader.php index 1be095002..f6ed36d1c 100755 --- a/src/Form/Field/WebUploader.php +++ b/src/Form/Field/WebUploader.php @@ -13,9 +13,8 @@ trait WebUploader { /** - * @param string $extensions exp. gif,jpg,jpeg,bmp,png - * @param string|null $mimeTypes exp. image/* - * + * @param string $extensions exp. gif,jpg,jpeg,bmp,png + * @param string|null $mimeTypes exp. image/* * @return $this */ public function accept(string $extensions, string $mimeTypes = null) @@ -32,8 +31,7 @@ public function accept(string $extensions, string $mimeTypes = null) } /** - * @param string $mimeTypes exp. image/* - * + * @param string $mimeTypes exp. image/* * @return $this */ public function mimeTypes(string $mimeTypes) @@ -44,8 +42,7 @@ public function mimeTypes(string $mimeTypes) } /** - * @param bool $value - * + * @param bool $value * @return $this */ public function chunked(bool $value = true) @@ -56,8 +53,7 @@ public function chunked(bool $value = true) } /** - * @param int|null $size kb - * + * @param int|null $size kb * @return $this */ public function chunkSize(int $size) @@ -70,8 +66,7 @@ public function chunkSize(int $size) } /** - * @param int $size kb - * + * @param int $size kb * @return $this */ public function maxSize(int $size) @@ -83,8 +78,7 @@ public function maxSize(int $size) } /** - * @param int $num - * + * @param int $num * @return $this */ public function threads(int $num) @@ -97,8 +91,7 @@ public function threads(int $num) /** * 设置上传接口. * - * @param string $server - * + * @param string $server * @return $this */ public function url(string $server) @@ -113,8 +106,7 @@ public function url(string $server) /** * 禁止上传文件后自动更新字段值. * - * @param bool $value - * + * @param bool $value * @return $this */ public function autoSave(bool $value = true) @@ -127,8 +119,7 @@ public function autoSave(bool $value = true) /** * 禁用前端删除功能. * - * @param bool $value - * + * @param bool $value * @return $this */ public function removable(bool $value = true) @@ -141,8 +132,7 @@ public function removable(bool $value = true) /** * 设置图片删除地址. * - * @param string $server - * + * @param string $server * @return $this */ public function deleteUrl(string $server) @@ -155,8 +145,7 @@ public function deleteUrl(string $server) /** * 设置上传表单请求参数. * - * @param array $data - * + * @param array $data * @return $this */ public function withFormData(array $data) @@ -169,8 +158,7 @@ public function withFormData(array $data) /** * 设置删除图片请求参数. * - * @param array $data - * + * @param array $data * @return $this */ public function withDeleteData(array $data) @@ -183,8 +171,7 @@ public function withDeleteData(array $data) /** * 是否开启自动上传. * - * @param bool $value - * + * @param bool $value * @return $this */ public function autoUpload(bool $value = true) @@ -197,8 +184,7 @@ public function autoUpload(bool $value = true) /** * 是否开启图片压缩. * - * @param bool|array $compress - * + * @param bool|array $compress * @return $this */ public function compress($compress = true) @@ -211,8 +197,7 @@ public function compress($compress = true) /** * 是否允许下载文件. * - * @param bool $value - * + * @param bool $value * @return $this */ public function downloadable(bool $value = true) diff --git a/src/Form/Footer.php b/src/Form/Footer.php index 85adf4c66..d8e09c73e 100755 --- a/src/Form/Footer.php +++ b/src/Form/Footer.php @@ -52,7 +52,7 @@ class Footer implements Renderable /** * Footer constructor. * - * @param Builder $builder + * @param Builder $builder */ public function __construct(Builder $builder) { @@ -62,8 +62,7 @@ public function __construct(Builder $builder) /** * Disable reset button. * - * @param bool $disable - * + * @param bool $disable * @return $this */ public function disableReset(bool $disable = true) @@ -76,8 +75,7 @@ public function disableReset(bool $disable = true) /** * Disable submit button. * - * @param bool $disable - * + * @param bool $disable * @return $this */ public function disableSubmit(bool $disable = true) @@ -90,8 +88,7 @@ public function disableSubmit(bool $disable = true) /** * Disable View Checkbox. * - * @param bool $disable - * + * @param bool $disable * @return $this */ public function disableViewCheck(bool $disable = true) @@ -104,8 +101,7 @@ public function disableViewCheck(bool $disable = true) /** * Disable Editing Checkbox. * - * @param bool $disable - * + * @param bool $disable * @return $this */ public function disableEditingCheck(bool $disable = true) @@ -118,8 +114,7 @@ public function disableEditingCheck(bool $disable = true) /** * Disable Creating Checkbox. * - * @param bool $disable - * + * @param bool $disable * @return $this */ public function disableCreatingCheck(bool $disable = true) @@ -132,8 +127,7 @@ public function disableCreatingCheck(bool $disable = true) /** * default View Checked. * - * @param bool $checked - * + * @param bool $checked * @return $this */ public function defaultViewChecked(bool $checked = true) @@ -146,8 +140,7 @@ public function defaultViewChecked(bool $checked = true) /** * default Editing Checked. * - * @param bool $checked - * + * @param bool $checked * @return $this */ public function defaultEditingChecked(bool $checked = true) @@ -160,8 +153,7 @@ public function defaultEditingChecked(bool $checked = true) /** * default Creating Checked. * - * @param bool $checked - * + * @param bool $checked * @return $this */ public function defaultCreatingChecked(bool $checked = true) @@ -219,8 +211,8 @@ protected function buildCheckboxes() /** * Use custom view. * - * @param string $view - * @param array $data + * @param string $view + * @param array $data */ public function view(string $view, array $data = []) { diff --git a/src/Form/Layout.php b/src/Form/Layout.php index 89366ee5e..184629af6 100755 --- a/src/Form/Layout.php +++ b/src/Form/Layout.php @@ -53,8 +53,8 @@ public function hasColumns() /** * 列布局. * - * @param int $width 1~12 - * @param mixed $content + * @param int $width 1~12 + * @param mixed $content */ public function onlyColumn($width, $content) { @@ -74,9 +74,8 @@ public function onlyColumn($width, $content) /** * 增加列. * - * @param int $width 1~12 - * @param mixed $content - * + * @param int $width 1~12 + * @param mixed $content * @return Column */ public function column(int $width, $content) @@ -87,8 +86,8 @@ public function column(int $width, $content) /** * block布局. * - * @param int $width - * @param \Closure $callback + * @param int $width + * @param \Closure $callback */ public function block(int $width, \Closure $callback) { @@ -110,8 +109,8 @@ public function block(int $width, \Closure $callback) } /** - * @param int $width - * @param mixed $content + * @param int $width + * @param mixed $content */ public function prepend(int $width, $content) { @@ -121,8 +120,7 @@ public function prepend(int $width, $content) } /** - * @param \Closure|null $callback - * + * @param \Closure|null $callback * @return BlockForm */ public function form(\Closure $callback = null) @@ -144,8 +142,7 @@ public function form(\Closure $callback = null) /** * Build html of content. * - * @param string $add - * + * @param string $add * @return string */ public function build($add = null) diff --git a/src/Form/NestedForm.php b/src/Form/NestedForm.php index 1349e1c0a..eb3b91f91 100755 --- a/src/Form/NestedForm.php +++ b/src/Form/NestedForm.php @@ -52,8 +52,8 @@ class NestedForm extends WidgetForm * * NestedForm constructor. * - * @param string $relation - * @param null $key + * @param string $relation + * @param null $key */ public function __construct($relation = null, $key = null) { @@ -72,8 +72,7 @@ public function __construct($relation = null, $key = null) /** * Set Form. * - * @param Form|WidgetForm $form - * + * @param Form|WidgetForm $form * @return $this */ public function setForm($form = null) @@ -101,9 +100,8 @@ public function model() /** * Set original values for fields. * - * @param array $data - * @param string $relatedKeyName - * + * @param array $data + * @param string $relatedKeyName * @return $this */ public function setOriginal($data, $relatedKeyName) @@ -129,8 +127,7 @@ public function setOriginal($data, $relatedKeyName) /** * Prepare for insert or update. * - * @param array $input - * + * @param array $input * @return mixed */ public function prepare($input) @@ -169,8 +166,7 @@ public function getKey() /** * Set key for current form. * - * @param mixed $key - * + * @param mixed $key * @return $this */ public function setKey($key) @@ -183,8 +179,7 @@ public function setKey($key) /** * Set original data for each field. * - * @param string $key - * + * @param string $key * @return void */ protected function setFieldOriginalValue($key) @@ -201,8 +196,7 @@ protected function setFieldOriginalValue($key) /** * Do prepare work before store and update. * - * @param array $record - * + * @param array $record * @return array */ protected function prepareRecord($record) @@ -246,9 +240,8 @@ protected function prepareRecord($record) /** * Fetch value in input data by column name. * - * @param array $data - * @param string|array $columns - * + * @param array $data + * @param string|array $columns * @return array|mixed */ protected function fetchColumnValue($data, $columns) @@ -335,8 +328,7 @@ public function fields() /** * Fill data to all fields in form. * - * @param array $data - * + * @param array $data * @return $this */ public function fill($data) @@ -352,8 +344,7 @@ public function fill($data) /** * Set `errorKey` `elementName` `elementClass` for fields inside hasmany fields. * - * @param Field $field - * + * @param Field $field * @return Field */ protected function formatField(Field $field) @@ -396,9 +387,8 @@ protected function formatName($name = null) /** * Add nested-form fields dynamically. * - * @param string $method - * @param array $arguments - * + * @param string $method + * @param array $arguments * @return mixed */ public function __call($method, $arguments) diff --git a/src/Form/ResolveField.php b/src/Form/ResolveField.php index 2027c3e67..71598e289 100644 --- a/src/Form/ResolveField.php +++ b/src/Form/ResolveField.php @@ -11,8 +11,7 @@ trait ResolveField * ... * }); * - * @param \Closure $callback - * + * @param \Closure $callback * @return $this */ public function resolvingField(\Closure $callback) @@ -28,8 +27,7 @@ public function setResolvingFieldCallbacks(array $callbacks) } /** - * @param Field $field - * + * @param Field $field * @return void */ protected function callResolvingFieldCallbacks(Field $field) diff --git a/src/Form/Row.php b/src/Form/Row.php index e0f28ca72..f90463e68 100755 --- a/src/Form/Row.php +++ b/src/Form/Row.php @@ -10,56 +10,56 @@ /** * Class Row. * - * @method Field\Text text($column, $label = '') - * @method Field\Checkbox checkbox($column, $label = '') - * @method Field\Radio radio($column, $label = '') - * @method Field\Select select($column, $label = '') - * @method Field\MultipleSelect multipleSelect($column, $label = '') - * @method Field\Textarea textarea($column, $label = '') - * @method Field\Hidden hidden($column, $label = '') - * @method Field\Id id($column, $label = '') - * @method Field\Ip ip($column, $label = '') - * @method Field\Url url($column, $label = '') - * @method Field\Email email($column, $label = '') - * @method Field\Mobile mobile($column, $label = '') - * @method Field\Slider slider($column, $label = '') - * @method Field\Map map($latitude, $longitude, $label = '') - * @method Field\Editor editor($column, $label = '') - * @method Field\Date date($column, $label = '') - * @method Field\Datetime datetime($column, $label = '') - * @method Field\Time time($column, $label = '') - * @method Field\Year year($column, $label = '') - * @method Field\Month month($column, $label = '') - * @method Field\DateRange dateRange($start, $end, $label = '') - * @method Field\DateTimeRange datetimeRange($start, $end, $label = '') - * @method Field\TimeRange timeRange($start, $end, $label = '') - * @method Field\Number number($column, $label = '') - * @method Field\Currency currency($column, $label = '') - * @method Field\SwitchField switch ($column, $label = '') - * @method Field\Display display($column, $label = '') - * @method Field\Rate rate($column, $label = '') - * @method Field\Divide divider() - * @method Field\Password password($column, $label = '') - * @method Field\Decimal decimal($column, $label = '') - * @method Field\Html html($html, $label = '') - * @method Field\Tags tags($column, $label = '') - * @method Field\Icon icon($column, $label = '') - * @method Field\Embeds embeds($column, $label = '') - * @method Field\Captcha captcha() - * @method Field\Listbox listbox($column, $label = '') - * @method Field\File file($column, $label = '') - * @method Field\Image image($column, $label = '') - * @method Field\MultipleFile multipleFile($column, $label = '') - * @method Field\MultipleImage multipleImage($column, $label = '') - * @method Field\HasMany hasMany($column, $labelOrCallback, $callback = null) - * @method Field\Tree tree($column, $label = '') - * @method Field\Table table($column, $labelOrCallback, $callback = null) - * @method Field\ListField list($column, $label = '') - * @method Field\Timezone timezone($column, $label = '') - * @method Field\KeyValue keyValue($column, $label = '') - * @method Field\Tel tel($column, $label = '') - * @method Field\Markdown markdown($column, $label = '') - * @method Field\Range range($start, $end, $label = '') + * @method Field\Text text($column, $label = '') + * @method Field\Checkbox checkbox($column, $label = '') + * @method Field\Radio radio($column, $label = '') + * @method Field\Select select($column, $label = '') + * @method Field\MultipleSelect multipleSelect($column, $label = '') + * @method Field\Textarea textarea($column, $label = '') + * @method Field\Hidden hidden($column, $label = '') + * @method Field\Id id($column, $label = '') + * @method Field\Ip ip($column, $label = '') + * @method Field\Url url($column, $label = '') + * @method Field\Email email($column, $label = '') + * @method Field\Mobile mobile($column, $label = '') + * @method Field\Slider slider($column, $label = '') + * @method Field\Map map($latitude, $longitude, $label = '') + * @method Field\Editor editor($column, $label = '') + * @method Field\Date date($column, $label = '') + * @method Field\Datetime datetime($column, $label = '') + * @method Field\Time time($column, $label = '') + * @method Field\Year year($column, $label = '') + * @method Field\Month month($column, $label = '') + * @method Field\DateRange dateRange($start, $end, $label = '') + * @method Field\DateTimeRange datetimeRange($start, $end, $label = '') + * @method Field\TimeRange timeRange($start, $end, $label = '') + * @method Field\Number number($column, $label = '') + * @method Field\Currency currency($column, $label = '') + * @method Field\SwitchField switch ($column, $label = '') + * @method Field\Display display($column, $label = '') + * @method Field\Rate rate($column, $label = '') + * @method Field\Divide divider() + * @method Field\Password password($column, $label = '') + * @method Field\Decimal decimal($column, $label = '') + * @method Field\Html html($html, $label = '') + * @method Field\Tags tags($column, $label = '') + * @method Field\Icon icon($column, $label = '') + * @method Field\Embeds embeds($column, $label = '') + * @method Field\Captcha captcha() + * @method Field\Listbox listbox($column, $label = '') + * @method Field\File file($column, $label = '') + * @method Field\Image image($column, $label = '') + * @method Field\MultipleFile multipleFile($column, $label = '') + * @method Field\MultipleImage multipleImage($column, $label = '') + * @method Field\HasMany hasMany($column, $labelOrCallback, $callback = null) + * @method Field\Tree tree($column, $label = '') + * @method Field\Table table($column, $labelOrCallback, $callback = null) + * @method Field\ListField list($column, $label = '') + * @method Field\Timezone timezone($column, $label = '') + * @method Field\KeyValue keyValue($column, $label = '') + * @method Field\Tel tel($column, $label = '') + * @method Field\Markdown markdown($column, $label = '') + * @method Field\Range range($start, $end, $label = '') */ class Row implements Renderable { @@ -99,8 +99,8 @@ class Row implements Renderable /** * Row constructor. * - * @param \Closure $callback - * @param Form|WidgetForm $form + * @param \Closure $callback + * @param Form|WidgetForm $form */ public function __construct(\Closure $callback, $form) { @@ -125,8 +125,7 @@ public function fields() /** * If the form horizontal layout. * - * @param bool $value - * + * @param bool $value * @return $this */ public function horizontal(bool $value = true) @@ -164,8 +163,7 @@ public function model() /** * Set width for a incomming field. * - * @param int $width - * + * @param int $width * @return $this */ public function width($width = 12) @@ -188,9 +186,8 @@ public function render() /** * Add field. * - * @param string $method - * @param array $arguments - * + * @param string $method + * @param array $arguments * @return Field|void */ public function __call($method, $arguments) diff --git a/src/Form/Tab.php b/src/Form/Tab.php index 925ea811f..26339c8c1 100755 --- a/src/Form/Tab.php +++ b/src/Form/Tab.php @@ -37,7 +37,7 @@ class Tab /** * Tab constructor. * - * @param Form|WidgetForm $form + * @param Form|WidgetForm $form */ public function __construct($form) { @@ -49,11 +49,10 @@ public function __construct($form) /** * Append a tab section. * - * @param string $title - * @param \Closure $content - * @param bool $active - * @param string $id - * + * @param string $title + * @param \Closure $content + * @param bool $active + * @param string $id * @return $this */ public function append($title, \Closure $content, bool $active = false, ?string $id = null) @@ -122,8 +121,8 @@ protected function collectColumnLayout() /** * Set true for some one tab by title or id. * - * @param string $value - * @param string $field + * @param string $value + * @param string $field */ public function active(string $value, string $field = 'title') { @@ -139,7 +138,7 @@ public function active(string $value, string $field = 'title') /** * Set true for some one tab by key. * - * @param int $index + * @param int $index */ public function activeByIndex(int $index = 0) { diff --git a/src/Form/Tools.php b/src/Form/Tools.php index 9bb028008..94163cac6 100755 --- a/src/Form/Tools.php +++ b/src/Form/Tools.php @@ -38,7 +38,7 @@ class Tools implements Renderable /** * Create a new Tools instance. * - * @param Builder $builder + * @param Builder $builder */ public function __construct(Builder $builder) { @@ -50,8 +50,7 @@ public function __construct(Builder $builder) /** * Append a tools. * - * @param string|\Closure|Renderable|Htmlable|AbstractTool $tool - * + * @param string|\Closure|Renderable|Htmlable|AbstractTool $tool * @return $this */ public function append($tool) @@ -66,8 +65,7 @@ public function append($tool) /** * Prepend a tool. * - * @param string|\Closure|Renderable|Htmlable|AbstractTool $tool - * + * @param string|\Closure|Renderable|Htmlable|AbstractTool $tool * @return $this */ public function prepend($tool) @@ -80,8 +78,7 @@ public function prepend($tool) } /** - * @param mixed $tool - * + * @param mixed $tool * @return void */ protected function prepareTool($tool) @@ -226,8 +223,7 @@ protected function renderDelete() /** * Render custom tools. * - * @param Collection $tools - * + * @param Collection $tools * @return mixed */ protected function renderCustomTools($tools) diff --git a/src/Grid.php b/src/Grid.php index 1b0c362e4..253aa4217 100755 --- a/src/Grid.php +++ b/src/Grid.php @@ -194,8 +194,8 @@ class Grid * * Grid constructor. * - * @param Repository|\Illuminate\Database\Eloquent\Model|Builder|null $repository - * @param null|\Closure $builder + * @param Repository|\Illuminate\Database\Eloquent\Model|Builder|null $repository + * @param null|\Closure $builder */ public function __construct($repository = null, ?\Closure $builder = null, $request = null) { @@ -232,8 +232,7 @@ public function getTableId() /** * Set primary key name. * - * @param string|array $name - * + * @param string|array $name * @return $this */ public function setKeyName($name) @@ -256,9 +255,8 @@ public function getKeyName() /** * Add column to Grid. * - * @param string $name - * @param string $label - * + * @param string $name + * @param string $label * @return Column */ public function column($name, $label = '') @@ -269,8 +267,7 @@ public function column($name, $label = '') /** * Add number column. * - * @param null|string $label - * + * @param null|string $label * @return Column */ public function number(?string $label = null) @@ -281,8 +278,7 @@ public function number(?string $label = null) /** * 启用异步渲染功能. * - * @param bool $async - * + * @param bool $async * @return $this */ public function async(bool $async = true) @@ -326,8 +322,7 @@ public function isAsyncRequest() * 1.$grid->columns(['name' => 'Name', 'email' => 'Email' ...]); * 2.$grid->columns('name', 'email' ...) * - * @param array $columns - * + * @param array $columns * @return Collection|Column[]|void */ public function columns($columns = null) @@ -360,8 +355,7 @@ public function allColumns() /** * 删除列. * - * @param string|Column $column - * + * @param string|Column $column * @return $this */ public function dropColumn($column) @@ -379,9 +373,8 @@ public function dropColumn($column) /** * Add column to grid. * - * @param string $field - * @param string $label - * + * @param string $field + * @param string $label * @return Column */ protected function addColumn($field = '', $label = '') @@ -395,9 +388,8 @@ protected function addColumn($field = '', $label = '') } /** - * @param string $field - * @param string $label - * + * @param string $field + * @param string $label * @return Column */ public function prependColumn($field = '', $label = '') @@ -411,9 +403,8 @@ public function prependColumn($field = '', $label = '') } /** - * @param string $field - * @param string $label - * + * @param string $field + * @param string $label * @return Column */ public function newColumn($field = '', $label = '') @@ -451,8 +442,7 @@ protected function applyColumnFilter() } /** - * @param string|array $class - * + * @param string|array $class * @return $this */ public function addTableClass($class) @@ -527,8 +517,7 @@ public function callBuilder() /** * Build the grid rows. * - * @param Collection $data - * + * @param Collection $data * @return void */ protected function buildRows($data) @@ -569,8 +558,7 @@ public function getCreateUrl() } /** - * @param string $key - * + * @param string $key * @return string */ public function getEditUrl($key) @@ -579,8 +567,7 @@ public function getEditUrl($key) } /** - * @param string $url - * + * @param string $url * @return string */ public function urlWithConstraints(?string $url) @@ -595,8 +582,7 @@ public function urlWithConstraints(?string $url) } /** - * @param \Closure $closure - * + * @param \Closure $closure * @return Grid\Tools\RowSelector */ public function rowSelector() @@ -626,9 +612,8 @@ protected function prependRowSelectorColumn() } /** - * @param string $width - * @param string $height - * + * @param string $width + * @param string $height * @return $this */ public function setDialogFormDimensions(string $width, string $height) @@ -653,8 +638,7 @@ public function renderCreateButton() } /** - * @param bool $value - * + * @param bool $value * @return $this */ public function withBorder(bool $value = true) @@ -665,8 +649,7 @@ public function withBorder(bool $value = true) } /** - * @param bool $value - * + * @param bool $value * @return $this */ public function tableCollapse(bool $value = true) @@ -679,8 +662,7 @@ public function tableCollapse(bool $value = true) /** * 显示横轴滚动条. * - * @param bool $value - * + * @param bool $value * @return $this */ public function scrollbar(bool $value = true) @@ -693,8 +675,7 @@ public function scrollbar(bool $value = true) /** * Set grid header. * - * @param Closure|string|Renderable $content - * + * @param Closure|string|Renderable $content * @return $this */ public function header($content) @@ -739,8 +720,7 @@ protected function renderHeaderOrFooter($callbacks) /** * Set grid footer. * - * @param Closure|string|Renderable $content - * + * @param Closure|string|Renderable $content * @return $this */ public function footer($content) @@ -769,9 +749,8 @@ public function renderFooter() /** * Get or set option for grid. * - * @param string|array $key - * @param mixed $value - * + * @param string|array $key + * @param mixed $value * @return $this|mixed */ public function option($key, $value = null) @@ -849,8 +828,7 @@ public function allowCreateButton() } /** - * @param string $mode - * + * @param string $mode * @return $this */ public function createMode(string $mode) @@ -879,8 +857,7 @@ public function resource() /** * Create a grid instance. * - * @param mixed ...$params - * + * @param mixed ...$params * @return $this */ public static function make(...$params) @@ -889,8 +866,7 @@ public static function make(...$params) } /** - * @param Closure $closure - * + * @param Closure $closure * @return $this; */ public function wrap(\Closure $closure) @@ -911,8 +887,7 @@ public function hasWrapper() /** * Add variables to grid view. * - * @param array $variables - * + * @param array $variables * @return $this */ public function with(array $variables) @@ -936,8 +911,7 @@ protected function defaultVariables() /** * Set a view to render. * - * @param string $view - * + * @param string $view * @return $this */ public function view($view) @@ -950,8 +924,7 @@ public function view($view) /** * Set grid title. * - * @param string $title - * + * @param string $title * @return $this */ public function title($title) @@ -964,8 +937,7 @@ public function title($title) /** * Set grid description. * - * @param string $description - * + * @param string $description * @return $this */ public function description($description) @@ -978,8 +950,7 @@ public function description($description) /** * Set resource path for grid. * - * @param string $path - * + * @param string $path * @return $this */ public function setResource($path) @@ -992,8 +963,7 @@ public function setResource($path) /** * 设置是否显示. * - * @param bool $value - * + * @param bool $value * @return $this */ public function show(bool $value = true) @@ -1006,8 +976,7 @@ public function show(bool $value = true) /** * 是否显示横向滚动条. * - * @param bool $value - * + * @param bool $value * @return $this */ public function scrollbarX(bool $value = true) @@ -1102,8 +1071,7 @@ protected function doWrap() /** * Add column to grid. * - * @param string $name - * + * @param string $name * @return Column */ public function __get($name) @@ -1116,7 +1084,6 @@ public function __get($name) * * @param $method * @param $arguments - * * @return Column */ public function __call($method, $arguments) diff --git a/src/Grid/Column.php b/src/Grid/Column.php index 44093f34a..06ae7005a 100755 --- a/src/Grid/Column.php +++ b/src/Grid/Column.php @@ -185,8 +185,8 @@ class Column protected $conditions = []; /** - * @param string $name - * @param string $label + * @param string $name + * @param string $label */ public function __construct($name, $label) { @@ -224,7 +224,7 @@ public static function extensions() /** * Set grid instance for column. * - * @param Grid $grid + * @param Grid $grid */ public function setGrid(Grid $grid) { @@ -242,7 +242,7 @@ public function grid() /** * Set original data for column. * - * @param Collection $collection + * @param Collection $collection */ public static function setOriginalGridModels(Collection $collection) { @@ -258,8 +258,7 @@ public static function setOriginalGridModels(Collection $collection) /** * Set width for column. * - * @param string $width - * + * @param string $width * @return $this|string */ public function width(?string $width) @@ -298,8 +297,7 @@ public function width(?string $width) * ->end() * ->modal() * - * @param \Closure $condition - * + * @param \Closure $condition * @return Column\Condition */ public function if(\Closure $condition = null) @@ -314,8 +312,7 @@ public function if(\Closure $condition = null) /** * Set column attributes. * - * @param array $attributes - * + * @param array $attributes * @return $this */ public function setAttributes(array $attributes = []) @@ -328,8 +325,7 @@ public function setAttributes(array $attributes = []) /** * Get column attributes. * - * @param string $name - * + * @param string $name * @return mixed */ public function getAttributes() @@ -350,8 +346,7 @@ public function hide() /** * Set style of this column. * - * @param string $style - * + * @param string $style * @return Column */ public function style($style) @@ -370,7 +365,7 @@ public function getName() } /** - * @param array|Model $model + * @param array|Model $model */ public function setOriginalModel($model) { @@ -408,8 +403,7 @@ public function getValue() /** * Format label. * - * @param string $label - * + * @param string $label * @return mixed */ protected function formatLabel($label) @@ -428,8 +422,7 @@ public function getLabel() } /** - * @param string $label - * + * @param string $label * @return $this */ public function setLabel($label) @@ -442,9 +435,8 @@ public function setLabel($label) /** * Add a display callback. * - * @param \Closure|string $callback - * @param array $params - * + * @param \Closure|string $callback + * @param array $params * @return $this */ public function display($callback, ...$params) @@ -465,8 +457,7 @@ public function hasDisplayCallbacks() } /** - * @param array $callbacks - * + * @param array $callbacks * @return void */ public function setDisplayCallbacks(array $callbacks) @@ -485,8 +476,7 @@ public function getDisplayCallbacks() /** * Call all of the "display" callbacks column. * - * @param mixed $value - * + * @param mixed $value * @return mixed */ protected function callDisplayCallbacks($value) @@ -520,8 +510,7 @@ protected function callDisplayCallbacks($value) /** * Set original grid data to column. * - * @param Closure $callback - * + * @param Closure $callback * @return Closure */ protected function bindOriginalRowModel(Closure $callback) @@ -532,7 +521,7 @@ protected function bindOriginalRowModel(Closure $callback) /** * Fill all data to every column. * - * @param \Illuminate\Support\Collection $data + * @param \Illuminate\Support\Collection $data */ public function fill($data) { @@ -577,8 +566,7 @@ public function fill($data) /** * 把模型转化为数组. * - * @param array|Model $row - * + * @param array|Model $row * @return mixed */ protected function convertModelToArray(&$row) @@ -609,8 +597,7 @@ protected function processConditions() /** * Convert characters to HTML entities recursively. * - * @param array|string $item - * + * @param array|string $item * @return mixed */ protected function htmlEntityEncode($item) @@ -637,9 +624,8 @@ protected function isSorted() /** * Find a displayer to display column. * - * @param string $abstract - * @param array $arguments - * + * @param string $abstract + * @param array $arguments * @return Column */ protected function resolveDisplayer($abstract, $arguments) @@ -654,9 +640,8 @@ protected function resolveDisplayer($abstract, $arguments) /** * Call Illuminate/Support displayer. * - * @param string $abstract - * @param array $arguments - * + * @param string $abstract + * @param array $arguments * @return Column */ protected function callSupportDisplayer($abstract, $arguments) @@ -677,9 +662,8 @@ protected function callSupportDisplayer($abstract, $arguments) /** * Call Builtin displayer. * - * @param string $abstract - * @param array $arguments - * + * @param string $abstract + * @param array $arguments * @return Column */ protected function callBuiltinDisplayer($abstract, $arguments) @@ -708,8 +692,7 @@ protected function callBuiltinDisplayer($abstract, $arguments) /** * Set column title attributes. * - * @param array $attributes - * + * @param array $attributes * @return $this */ public function setHeaderAttributes(array $attributes = []) @@ -722,8 +705,7 @@ public function setHeaderAttributes(array $attributes = []) /** * Set column title default attributes. * - * @param array $attributes - * + * @param array $attributes * @return $this */ public function setDefaultHeaderAttribute(array $attributes) @@ -755,7 +737,6 @@ public function formatTitleAttributes() /** * @param mixed $value * @param callable $callback - * * @return $this|mixed */ public function when($value, $callback) @@ -772,9 +753,8 @@ public function when($value, $callback) * * Allow fluent calls on the Column object. * - * @param string $method - * @param array $arguments - * + * @param string $method + * @param array $arguments * @return $this */ public function __call($method, $arguments) diff --git a/src/Grid/Column/Filter.php b/src/Grid/Column/Filter.php index 1ef582b53..b1e2cf88e 100644 --- a/src/Grid/Column/Filter.php +++ b/src/Grid/Column/Filter.php @@ -36,7 +36,7 @@ abstract class Filter implements Renderable protected $display = true; /** - * @param Column $column + * @param Column $column */ public function setParent(Column $column) { @@ -64,8 +64,7 @@ public function parent() } /** - * @param \Closure $callback - * + * @param \Closure $callback * @return $this */ public function resolving(\Closure $callback) @@ -76,8 +75,7 @@ public function resolving(\Closure $callback) } /** - * @param string $name - * + * @param string $name * @return $this */ public function setColumnName(string $name) @@ -118,8 +116,7 @@ public function getQueryName() /** * Get filter value of this column. * - * @param string $default - * + * @param string $default * @return array|\Illuminate\Http\Request|string */ public function value($default = '') @@ -128,10 +125,9 @@ public function value($default = '') } /** - * @param mixed $model - * @param string $query + * @param mixed $model + * @param string $query * @param mixed array $params - * * @return void */ protected function withQuery($model, string $query, array $params) @@ -196,8 +192,7 @@ protected function urlWithoutFilter() } /** - * @param string $key - * + * @param string $key * @return array|null|string */ protected function trans($key) @@ -206,8 +201,7 @@ protected function trans($key) } /** - * @param bool $value - * + * @param bool $value * @return $this */ public function display(bool $value) @@ -236,8 +230,8 @@ public function shouldDisplay() /** * Add a query binding. * - * @param mixed $value - * @param Model $model + * @param mixed $value + * @param Model $model */ public function addBinding($value, Model $model) { @@ -253,8 +247,7 @@ public function render() } /** - * @param array ...$params - * + * @param array ...$params * @return static */ public static function make(...$params) diff --git a/src/Grid/Column/Filter/Between.php b/src/Grid/Column/Filter/Between.php index 47e264968..56be80254 100644 --- a/src/Grid/Column/Filter/Between.php +++ b/src/Grid/Column/Filter/Between.php @@ -66,8 +66,7 @@ public function datetime() } /** - * @param string $format - * + * @param string $format * @return $this */ protected function setDateFormat($format) @@ -82,8 +81,8 @@ protected function setDateFormat($format) /** * Add a binding to the query. * - * @param mixed $value - * @param Model $model + * @param mixed $value + * @param Model $model */ public function addBinding($value, Model $model) { diff --git a/src/Grid/Column/Filter/Equal.php b/src/Grid/Column/Filter/Equal.php index f4d5fe9a7..095aed139 100644 --- a/src/Grid/Column/Filter/Equal.php +++ b/src/Grid/Column/Filter/Equal.php @@ -18,7 +18,7 @@ class Equal extends Filter /** * InputFilter constructor. * - * @param string $type + * @param string $type */ public function __construct(?string $placeholder = null) { @@ -58,8 +58,7 @@ public function datetime(string $format = 'YYYY-MM-DD HH:mm:ss') } /** - * @param string $format - * + * @param string $format * @return $this */ protected function setDateFormat($format) @@ -88,8 +87,8 @@ protected function addDateScript() /** * Add a binding to the query. * - * @param string $value - * @param Model|null $model + * @param string $value + * @param Model|null $model */ public function addBinding($value, Model $model) { diff --git a/src/Grid/Column/Filter/Gt.php b/src/Grid/Column/Filter/Gt.php index 39e471438..f8a941c39 100644 --- a/src/Grid/Column/Filter/Gt.php +++ b/src/Grid/Column/Filter/Gt.php @@ -9,8 +9,8 @@ class Gt extends Equal /** * Add a binding to the query. * - * @param string $value - * @param Model|null $model + * @param string $value + * @param Model|null $model */ public function addBinding($value, Model $model) { diff --git a/src/Grid/Column/Filter/In.php b/src/Grid/Column/Filter/In.php index 1fec5319c..e8c1fcb4c 100644 --- a/src/Grid/Column/Filter/In.php +++ b/src/Grid/Column/Filter/In.php @@ -17,7 +17,7 @@ class In extends Filter /** * CheckFilter constructor. * - * @param array $options + * @param array $options */ public function __construct(array $options) { @@ -32,8 +32,8 @@ public function __construct(array $options) /** * Add a binding to the query. * - * @param array $value - * @param Model $model + * @param array $value + * @param Model $model */ public function addBinding($value, Model $model) { diff --git a/src/Grid/Column/Filter/Input.php b/src/Grid/Column/Filter/Input.php index 753a557c5..23af56453 100644 --- a/src/Grid/Column/Filter/Input.php +++ b/src/Grid/Column/Filter/Input.php @@ -27,8 +27,7 @@ protected function addScript() /** * Set input placeholder. * - * @param null|string $placeholder - * + * @param null|string $placeholder * @return $this */ public function placeholder(?string $placeholder) @@ -67,8 +66,7 @@ protected function renderInput() } /** - * @param string|\Closure $valueKey - * + * @param string|\Closure $valueKey * @return $this */ public function valueFilter($valueKey = null) diff --git a/src/Grid/Column/Filter/Like.php b/src/Grid/Column/Filter/Like.php index d397d4869..4f2484569 100644 --- a/src/Grid/Column/Filter/Like.php +++ b/src/Grid/Column/Filter/Like.php @@ -9,8 +9,8 @@ class Like extends Equal /** * Add a binding to the query. * - * @param string $value - * @param Model|null $model + * @param string $value + * @param Model|null $model */ public function addBinding($value, Model $model) { diff --git a/src/Grid/Column/Filter/Lt.php b/src/Grid/Column/Filter/Lt.php index 110e08031..d33aed031 100644 --- a/src/Grid/Column/Filter/Lt.php +++ b/src/Grid/Column/Filter/Lt.php @@ -9,8 +9,8 @@ class Lt extends Equal /** * Add a binding to the query. * - * @param string $value - * @param Model|null $model + * @param string $value + * @param Model|null $model */ public function addBinding($value, Model $model) { diff --git a/src/Grid/Column/Filter/Ngt.php b/src/Grid/Column/Filter/Ngt.php index f4a3c1c10..25582ccde 100644 --- a/src/Grid/Column/Filter/Ngt.php +++ b/src/Grid/Column/Filter/Ngt.php @@ -9,8 +9,8 @@ class Ngt extends Equal /** * Add a binding to the query. * - * @param string $value - * @param Model|null $model + * @param string $value + * @param Model|null $model */ public function addBinding($value, Model $model) { diff --git a/src/Grid/Column/Filter/Nlt.php b/src/Grid/Column/Filter/Nlt.php index 7dfa8644b..37216aba6 100644 --- a/src/Grid/Column/Filter/Nlt.php +++ b/src/Grid/Column/Filter/Nlt.php @@ -9,8 +9,8 @@ class Nlt extends Equal /** * Add a binding to the query. * - * @param string $value - * @param Model|null $model + * @param string $value + * @param Model|null $model */ public function addBinding($value, Model $model) { diff --git a/src/Grid/Column/Filter/StartWith.php b/src/Grid/Column/Filter/StartWith.php index 46a3c7e33..b579e5436 100644 --- a/src/Grid/Column/Filter/StartWith.php +++ b/src/Grid/Column/Filter/StartWith.php @@ -9,8 +9,8 @@ class StartWith extends Equal /** * Add a binding to the query. * - * @param string $value - * @param Model|null $model + * @param string $value + * @param Model|null $model */ public function addBinding($value, Model $model) { diff --git a/src/Grid/Column/HasDisplayers.php b/src/Grid/Column/HasDisplayers.php index f8ce921fe..bdcba649c 100644 --- a/src/Grid/Column/HasDisplayers.php +++ b/src/Grid/Column/HasDisplayers.php @@ -20,9 +20,8 @@ trait HasDisplayers /** * Display using display abstract. * - * @param string $abstract - * @param array $arguments - * + * @param string $abstract + * @param array $arguments * @return Column */ public function displayUsing($abstract, $arguments = []) @@ -42,9 +41,8 @@ public function displayUsing($abstract, $arguments = []) /** * Display column using array value map. * - * @param array $values - * @param null $default - * + * @param array $values + * @param null $default * @return $this */ public function using(array $values, $default = null) @@ -59,8 +57,7 @@ public function using(array $values, $default = null) } /** - * @param string $color - * + * @param string $color * @return $this */ public function bold($color = null) @@ -79,8 +76,7 @@ public function bold($color = null) /** * Display column with "long2ip". * - * @param null $default - * + * @param null $default * @return $this */ public function long2ip($default = null) @@ -97,8 +93,7 @@ public function long2ip($default = null) /** * Render this column with the given view. * - * @param string $view - * + * @param string $view * @return $this */ public function view($view) @@ -113,8 +108,7 @@ public function view($view) } /** - * @param string $val - * + * @param string $val * @return $this */ public function prepend($val) @@ -137,8 +131,7 @@ public function prepend($val) } /** - * @param string $val - * + * @param string $val * @return $this */ public function append($val) @@ -163,8 +156,7 @@ public function append($val) /** * Split a string by string. * - * @param string $d - * + * @param string $d * @return $this */ public function explode(string $d = ',') @@ -181,8 +173,7 @@ public function explode(string $d = ',') /** * Display the fields in the email format as gavatar. * - * @param int $size - * + * @param int $size * @return $this */ public function gravatar($size = 30) @@ -201,9 +192,8 @@ public function gravatar($size = 30) /** * Add a `dot` before column text. * - * @param array $options - * @param string $default - * + * @param array $options + * @param string $default * @return $this */ public function dot($options = [], $default = 'default') @@ -222,10 +212,9 @@ public function dot($options = [], $default = 'default') /** * Show children of current node. * - * @param bool $showAll - * @param bool $sortable - * @param mixed $defaultParentId - * + * @param bool $showAll + * @param bool $sortable + * @param mixed $defaultParentId * @return $this */ public function tree(bool $showAll = false, bool $sortable = true, $defaultParentId = null) @@ -249,8 +238,7 @@ public function tree(bool $showAll = false, bool $sortable = true, $defaultParen /** * Display column using a grid row action. * - * @param string $action - * + * @param string $action * @return $this */ public function action($action) @@ -275,9 +263,8 @@ public function action($action) /** * Display column as boolean , `✓` for true, and `✗` for false. * - * @param array $map - * @param bool $default - * + * @param array $map + * @param bool $default * @return $this */ public function bool(array $map = [], $default = false) diff --git a/src/Grid/Column/HasHeader.php b/src/Grid/Column/HasHeader.php index 5084e796a..58a70f096 100644 --- a/src/Grid/Column/HasHeader.php +++ b/src/Grid/Column/HasHeader.php @@ -27,8 +27,7 @@ trait HasHeader /** * Add contents to column header. * - * @param string|Renderable|Htmlable $header - * + * @param string|Renderable|Htmlable $header * @return $this */ public function addHeader($header) @@ -46,9 +45,8 @@ public function addHeader($header) /** * Add a column sortable to column header. * - * @param string $columnName - * @param string $cast - * + * @param string $columnName + * @param string $cast * @return $this */ public function sortable($columnName = null, $cast = null) @@ -78,8 +76,7 @@ public function sortable($columnName = null, $cast = null) * Grid\Column\Filter\Equal::make(__('admin.created_at'))->date() * ); * - * @param Grid\Column\Filter|string $filter - * + * @param Grid\Column\Filter|string $filter * @return $this */ public function filter($filter = null) @@ -98,8 +95,7 @@ public function filter($filter = null) } /** - * @param string|\Closure $valueKey - * + * @param string|\Closure $valueKey * @return $this */ public function filterByValue($valueKey = null) @@ -114,10 +110,9 @@ public function filterByValue($valueKey = null) /** * Add a help tooltip to column header. * - * @param string|\Closure $message - * @param null|string $style 'green', 'blue', 'red', 'purple' - * @param null|string $placement 'bottom', 'left', 'right', 'top' - * + * @param string|\Closure $message + * @param null|string $style 'green', 'blue', 'red', 'purple' + * @param null|string $placement 'bottom', 'left', 'right', 'top' * @return $this */ public function help($message, ?string $style = null, ?string $placement = null) @@ -128,7 +123,7 @@ public function help($message, ?string $style = null, ?string $placement = null) /** * Add a binding based on filter to the model query. * - * @param Model $model + * @param Model $model */ public function bindFilterQuery(Model $model) { diff --git a/src/Grid/Column/Help.php b/src/Grid/Column/Help.php index 68261f9fe..cc97cfa71 100644 --- a/src/Grid/Column/Help.php +++ b/src/Grid/Column/Help.php @@ -26,7 +26,7 @@ class Help implements Renderable /** * Help constructor. * - * @param string $message + * @param string $message */ public function __construct($message = '', ?string $style = null, ?string $placement = null) { diff --git a/src/Grid/Column/Sorter.php b/src/Grid/Column/Sorter.php index ee46ca7a5..20525e773 100644 --- a/src/Grid/Column/Sorter.php +++ b/src/Grid/Column/Sorter.php @@ -34,9 +34,9 @@ class Sorter implements Renderable /** * Sorter constructor. * - * @param Grid $grid - * @param string $columnName - * @param string $cast + * @param Grid $grid + * @param string $columnName + * @param string $cast */ public function __construct(Grid $grid, $columnName, $cast) { diff --git a/src/Grid/ComplexHeader.php b/src/Grid/ComplexHeader.php index 99e286654..d03e48e22 100644 --- a/src/Grid/ComplexHeader.php +++ b/src/Grid/ComplexHeader.php @@ -85,8 +85,7 @@ public function getLabel() } /** - * @param string $html - * + * @param string $html * @return $this */ public function append($html) @@ -97,10 +96,9 @@ public function append($html) } /** - * @param string|\Closure $message - * @param null|string $style 'green', 'blue', 'red', 'purple' - * @param null|string $placement 'bottom', 'left', 'right', 'top' - * + * @param string|\Closure $message + * @param null|string $style 'green', 'blue', 'red', 'purple' + * @param null|string $placement 'bottom', 'left', 'right', 'top' * @return $this */ public function help($message, ?string $style = null, ?string $placement = null) diff --git a/src/Grid/Concerns/CanFixColumns.php b/src/Grid/Concerns/CanFixColumns.php index 1f9f3d167..108b5dcc1 100644 --- a/src/Grid/Concerns/CanFixColumns.php +++ b/src/Grid/Concerns/CanFixColumns.php @@ -15,9 +15,8 @@ trait CanFixColumns protected $fixColumns; /** - * @param int $head - * @param int $tail - * + * @param int $head + * @param int $tail * @return FixColumns */ public function fixColumns(int $head, int $tail = -1) diff --git a/src/Grid/Concerns/CanHidesColumns.php b/src/Grid/Concerns/CanHidesColumns.php index a2b057706..82fcde5d7 100644 --- a/src/Grid/Concerns/CanHidesColumns.php +++ b/src/Grid/Concerns/CanHidesColumns.php @@ -25,8 +25,7 @@ trait CanHidesColumns /** * Remove column selector on grid. * - * @param bool $disable - * + * @param bool $disable * @return $this|mixed */ public function disableColumnSelector(bool $disable = true) @@ -65,8 +64,7 @@ public function renderColumnSelector() /** * Setting default shown columns on grid. * - * @param array|string $columns - * + * @param array|string $columns * @return $this */ public function hideColumns($columns) diff --git a/src/Grid/Concerns/HasActions.php b/src/Grid/Concerns/HasActions.php index 53479099b..a366a78ca 100644 --- a/src/Grid/Concerns/HasActions.php +++ b/src/Grid/Concerns/HasActions.php @@ -16,8 +16,7 @@ trait HasActions protected $actionsCallback = []; /** - * @param string $actionClass - * + * @param string $actionClass * @return $this */ public function setActionClass(string $actionClass) @@ -48,8 +47,7 @@ public function getActionClass() /** * Set grid action callback or add actions. * - * @param Closure|array|string|Renderable|Grid\RowAction $callback - * + * @param Closure|array|string|Renderable|Grid\RowAction $callback * @return $this */ public function actions($callback) @@ -115,8 +113,7 @@ public function showActions(bool $val = true) /** * Disable edit. * - * @param bool $disable - * + * @param bool $disable * @return $this */ public function disableEditButton(bool $disable = true) @@ -129,8 +126,7 @@ public function disableEditButton(bool $disable = true) /** * Show edit. * - * @param bool $val - * + * @param bool $val * @return $this */ public function showEditButton(bool $val = true) @@ -163,8 +159,7 @@ public function showQuickEditButton(bool $val = true) /** * Disable view action. * - * @param bool $disable - * + * @param bool $disable * @return $this */ public function disableViewButton(bool $disable = true) @@ -177,8 +172,7 @@ public function disableViewButton(bool $disable = true) /** * Show view action. * - * @param bool $disable - * + * @param bool $disable * @return $this */ public function showViewButton(bool $val = true) @@ -189,8 +183,7 @@ public function showViewButton(bool $val = true) /** * Disable delete. * - * @param bool $disable - * + * @param bool $disable * @return $this */ public function disableDeleteButton(bool $disable = true) @@ -203,8 +196,7 @@ public function disableDeleteButton(bool $disable = true) /** * Show delete button. * - * @param bool $disable - * + * @param bool $disable * @return $this */ public function showDeleteButton(bool $val = true) diff --git a/src/Grid/Concerns/HasComplexHeaders.php b/src/Grid/Concerns/HasComplexHeaders.php index 66c3a12df..daac6ce17 100644 --- a/src/Grid/Concerns/HasComplexHeaders.php +++ b/src/Grid/Concerns/HasComplexHeaders.php @@ -17,10 +17,9 @@ trait HasComplexHeaders /** * Merge cells. * - * @param string $column - * @param array $columnNames - * @param string $label - * + * @param string $column + * @param array $columnNames + * @param string $label * @return ComplexHeader */ public function combine(string $column, array $columnNames, string $label = null) diff --git a/src/Grid/Concerns/HasEvents.php b/src/Grid/Concerns/HasEvents.php index 09a540253..8d895092f 100644 --- a/src/Grid/Concerns/HasEvents.php +++ b/src/Grid/Concerns/HasEvents.php @@ -15,9 +15,8 @@ trait HasEvents /** * 监听事件. * - * @param string $class - * - * @param \Closure $callback + * @param string $class + * @param \Closure $callback */ public function listen(string $class, \Closure $callback) { @@ -33,7 +32,7 @@ public function listen(string $class, \Closure $callback) /** * 触发事件. * - * @param \Dcat\Admin\Grid\Events\Event $event + * @param \Dcat\Admin\Grid\Events\Event $event */ public function fire(Events\Event $event) { @@ -47,7 +46,7 @@ public function fire(Events\Event $event) /** * 只触发一次. * - * @param \Dcat\Admin\Grid\Events\Event $event + * @param \Dcat\Admin\Grid\Events\Event $event */ public function fireOnce(Events\Event $event) { diff --git a/src/Grid/Concerns/HasExporter.php b/src/Grid/Concerns/HasExporter.php index 12bd33de5..f6588eb21 100644 --- a/src/Grid/Concerns/HasExporter.php +++ b/src/Grid/Concerns/HasExporter.php @@ -27,8 +27,7 @@ trait HasExporter /** * Set exporter driver for Grid to export. * - * @param string|Grid\Exporters\AbstractExporter|array $exporterDriver - * + * @param string|Grid\Exporters\AbstractExporter|array $exporterDriver * @return Exporter */ public function export($exporterDriver = null) @@ -54,8 +53,7 @@ public function export($exporterDriver = null) /** * Handle export request. * - * @param bool $forceExport - * + * @param bool $forceExport * @return mixed */ public function handleExportRequest($forceExport = false) @@ -96,8 +94,7 @@ public function exporter() } /** - * @param string $scope - * + * @param string $scope * @return AbstractExporter */ protected function resolveExportDriver($scope) @@ -108,9 +105,8 @@ protected function resolveExportDriver($scope) /** * Get the export url. * - * @param int $scope - * @param null $args - * + * @param int $scope + * @param null $args * @return string */ public function exportUrl($scope = 1, $args = null) diff --git a/src/Grid/Concerns/HasFilter.php b/src/Grid/Concerns/HasFilter.php index 39dcf33f9..5da78f73a 100644 --- a/src/Grid/Concerns/HasFilter.php +++ b/src/Grid/Concerns/HasFilter.php @@ -30,8 +30,7 @@ protected function setUpFilter() /** * Process the grid filter. * - * @param bool $toArray - * + * @param bool $toArray * @return Collection */ public function processFilter() @@ -49,8 +48,7 @@ public function processFilter() /** * Get or set the grid filter. * - * @param Closure $callback - * + * @param Closure $callback * @return $this|Grid\Filter */ public function filter(Closure $callback = null) @@ -105,8 +103,7 @@ public function disableFilter(bool $disable = true) /** * Show grid filter. * - * @param bool $val - * + * @param bool $val * @return $this */ public function showFilter(bool $val = true) @@ -117,8 +114,7 @@ public function showFilter(bool $val = true) /** * Disable filter button. * - * @param bool $disable - * + * @param bool $disable * @return $this */ public function disableFilterButton(bool $disable = true) @@ -131,8 +127,7 @@ public function disableFilterButton(bool $disable = true) /** * Show filter button. * - * @param bool $val - * + * @param bool $val * @return $this */ public function showFilterButton(bool $val = true) diff --git a/src/Grid/Concerns/HasNames.php b/src/Grid/Concerns/HasNames.php index 4d3ae2c1d..abf2836cc 100644 --- a/src/Grid/Concerns/HasNames.php +++ b/src/Grid/Concerns/HasNames.php @@ -19,8 +19,7 @@ trait HasNames /** * Set name to grid. * - * @param string $name - * + * @param string $name * @return $this */ public function setName($name) @@ -44,8 +43,7 @@ public function getName() /** * Retrieve an input item from the request. * - * @param string $key - * + * @param string $key * @return mixed */ public function getRequestInput($key) @@ -54,8 +52,7 @@ public function getRequestInput($key) } /** - * @param string $key - * + * @param string $key * @return string */ public function makeName($key) diff --git a/src/Grid/Concerns/HasPaginator.php b/src/Grid/Concerns/HasPaginator.php index 0b2b97841..406252392 100644 --- a/src/Grid/Concerns/HasPaginator.php +++ b/src/Grid/Concerns/HasPaginator.php @@ -28,8 +28,7 @@ trait HasPaginator /** * Paginate the grid. * - * @param int $perPage - * + * @param int $perPage * @return void */ public function paginate(int $perPage = 20) @@ -42,8 +41,7 @@ public function paginate(int $perPage = 20) /** * 是否使用 simplePaginate 方法分页. * - * @param bool $value - * + * @param bool $value * @return $this */ public function simplePaginate(bool $value = true) @@ -62,8 +60,7 @@ public function getPerPage() } /** - * @param string $paginator - * + * @param string $paginator * @return $this */ public function setPaginatorClass(string $paginator) @@ -102,7 +99,7 @@ public function allowPagination() /** * Set per-page options. * - * @param array $perPages + * @param array $perPages */ public function perPages(array $perPages) { @@ -144,8 +141,7 @@ public function disablePagination(bool $disable = true) /** * Show grid pagination. * - * @param bool $val - * + * @param bool $val * @return $this */ public function showPagination(bool $val = true) diff --git a/src/Grid/Concerns/HasQuickCreate.php b/src/Grid/Concerns/HasQuickCreate.php index ff80f3141..9ce843eab 100644 --- a/src/Grid/Concerns/HasQuickCreate.php +++ b/src/Grid/Concerns/HasQuickCreate.php @@ -13,8 +13,7 @@ trait HasQuickCreate protected $quickCreate; /** - * @param Closure $callback - * + * @param Closure $callback * @return $this */ public function quickCreate(\Closure $callback) diff --git a/src/Grid/Concerns/HasQuickSearch.php b/src/Grid/Concerns/HasQuickSearch.php index 952132f46..6676ace5a 100644 --- a/src/Grid/Concerns/HasQuickSearch.php +++ b/src/Grid/Concerns/HasQuickSearch.php @@ -15,7 +15,7 @@ * @property Collection $columns * @property Tools $tools * - * @method Model model() + * @method Model model() */ trait HasQuickSearch { @@ -31,7 +31,6 @@ trait HasQuickSearch /** * @param array|string|\Closure - * * @return Tools\QuickSearch */ public function quickSearch($search = null) @@ -135,7 +134,7 @@ public function applyQuickSearch() /** * Add where bindings. * - * @param string $query + * @param string $query */ protected function addWhereBindings($query) { @@ -189,8 +188,7 @@ protected function addWhereBindings($query) /** * Parse quick query bindings. * - * @param array $queries - * + * @param array $queries * @return array */ protected function parseQueryBindings(array $queries) @@ -229,10 +227,10 @@ protected function parseQueryBindings(array $queries) /** * Add where like binding to model query. * - * @param mixed $query - * @param string $column - * @param bool $or - * @param string $pattern + * @param mixed $query + * @param string $column + * @param bool $or + * @param string $pattern */ protected function addWhereLikeBinding($query, ?string $column, ?bool $or, ?string $pattern) { @@ -245,11 +243,11 @@ protected function addWhereLikeBinding($query, ?string $column, ?bool $or, ?stri /** * Add where date time function binding to model query. * - * @param mixed $query - * @param string $column - * @param bool $or - * @param string $function - * @param string $value + * @param mixed $query + * @param string $column + * @param bool $or + * @param string $function + * @param string $value */ protected function addWhereDatetimeBinding($query, ?string $column, ?bool $or, ?string $function, ?string $value) { @@ -261,11 +259,11 @@ protected function addWhereDatetimeBinding($query, ?string $column, ?bool $or, ? /** * Add where in binding to the model query. * - * @param mixed $query - * @param string $column - * @param bool $or - * @param bool $not - * @param string $values + * @param mixed $query + * @param string $column + * @param bool $or + * @param bool $not + * @param string $values */ protected function addWhereInBinding($query, ?string $column, ?bool $or, ?bool $not, ?string $values) { @@ -286,11 +284,11 @@ protected function addWhereInBinding($query, ?string $column, ?bool $or, ?bool $ /** * Add where between binding to the model query. * - * @param mixed $query - * @param string $column - * @param bool $or - * @param string $start - * @param string $end + * @param mixed $query + * @param string $column + * @param bool $or + * @param string $start + * @param string $end */ protected function addWhereBetweenBinding($query, ?string $column, ?bool $or, ?string $start, ?string $end) { @@ -302,11 +300,11 @@ protected function addWhereBetweenBinding($query, ?string $column, ?bool $or, ?s /** * Add where basic binding to the model query. * - * @param mixed $query - * @param string $column - * @param bool $or - * @param string $operator - * @param string $value + * @param mixed $query + * @param string $column + * @param bool $or + * @param string $operator + * @param string $value */ protected function addWhereBasicBinding($query, ?string $column, ?bool $or, ?string $operator, ?string $value) { diff --git a/src/Grid/Concerns/HasSelector.php b/src/Grid/Concerns/HasSelector.php index 9159df051..3c75b122b 100644 --- a/src/Grid/Concerns/HasSelector.php +++ b/src/Grid/Concerns/HasSelector.php @@ -17,8 +17,7 @@ trait HasSelector protected $_selector; /** - * @param \Closure $closure - * + * @param \Closure $closure * @return $this|Selector */ public function selector(\Closure $closure = null) diff --git a/src/Grid/Concerns/HasTools.php b/src/Grid/Concerns/HasTools.php index ad92e11ce..88404a13a 100644 --- a/src/Grid/Concerns/HasTools.php +++ b/src/Grid/Concerns/HasTools.php @@ -27,8 +27,7 @@ public function setUpTools() } /** - * @param bool $value - * + * @param bool $value * @return $this */ public function toolsWithOutline(bool $value = true) @@ -41,8 +40,7 @@ public function toolsWithOutline(bool $value = true) /** * Get or setup grid tools. * - * @param Closure|array|Action|Tools\AbstractTool|Renderable|Htmlable|string $value - * + * @param Closure|array|Action|Tools\AbstractTool|Renderable|Htmlable|string $value * @return $this|Tools */ public function tools($value = null) @@ -71,8 +69,7 @@ public function tools($value = null) /** * Set grid batch-action callback. * - * @param Closure|BatchAction|BatchAction[] $value - * + * @param Closure|BatchAction|BatchAction[] $value * @return $this */ public function batchActions($value) @@ -95,8 +92,7 @@ public function renderTools() } /** - * @param bool $val - * + * @param bool $val * @return mixed */ public function disableToolbar(bool $val = true) @@ -105,8 +101,7 @@ public function disableToolbar(bool $val = true) } /** - * @param bool $val - * + * @param bool $val * @return mixed */ public function showToolbar(bool $val = true) @@ -117,8 +112,7 @@ public function showToolbar(bool $val = true) /** * Disable batch actions. * - * @param bool $disable - * + * @param bool $disable * @return $this */ public function disableBatchActions(bool $disable = true) @@ -131,8 +125,7 @@ public function disableBatchActions(bool $disable = true) /** * Show batch actions. * - * @param bool $val - * + * @param bool $val * @return $this */ public function showBatchActions(bool $val = true) @@ -143,8 +136,7 @@ public function showBatchActions(bool $val = true) /** * Disable batch delete. * - * @param bool $disable - * + * @param bool $disable * @return $this */ public function disableBatchDelete(bool $disable = true) @@ -159,8 +151,7 @@ public function disableBatchDelete(bool $disable = true) /** * Show batch delete. * - * @param bool $val - * + * @param bool $val * @return $this */ public function showBatchDelete(bool $val = true) @@ -171,8 +162,7 @@ public function showBatchDelete(bool $val = true) /** * Disable refresh button. * - * @param bool $disable - * + * @param bool $disable * @return $this */ public function disableRefreshButton(bool $disable = true) @@ -185,8 +175,7 @@ public function disableRefreshButton(bool $disable = true) /** * Show refresh button. * - * @param bool $val - * + * @param bool $val * @return $this */ public function showRefreshButton(bool $val = true) diff --git a/src/Grid/Concerns/HasTree.php b/src/Grid/Concerns/HasTree.php index 4b5645de9..266419959 100644 --- a/src/Grid/Concerns/HasTree.php +++ b/src/Grid/Concerns/HasTree.php @@ -50,10 +50,9 @@ trait HasTree /** * 开启树形表格功能. * - * @param bool $showAll - * @param bool $sortable - * @param mixed $defaultParentId - * + * @param bool $showAll + * @param bool $sortable + * @param mixed $defaultParentId * @return void */ public function enableTree(bool $showAll, bool $sortable, $defaultParentId = null) @@ -124,8 +123,7 @@ public function disableBindTreeQuery() /** * 设置子节点查询链接需要忽略的字段. * - * @param string|array $keys - * + * @param string|array $keys * @return $this */ public function treeUrlWithoutQuery($keys) @@ -191,8 +189,7 @@ public function getChildrenQueryNamePrefix() } /** - * @param mixed $parentId - * + * @param mixed $parentId * @return string */ public function getChildrenPageName($parentId) @@ -233,8 +230,7 @@ public function getParentIdFromRequest() /** * 移除树相关参数. * - * @param string $url - * + * @param string $url * @return string */ public function withoutTreeQuery($url) diff --git a/src/Grid/Displayers/AbstractDisplayer.php b/src/Grid/Displayers/AbstractDisplayer.php index 461a38673..816cba82c 100755 --- a/src/Grid/Displayers/AbstractDisplayer.php +++ b/src/Grid/Displayers/AbstractDisplayer.php @@ -42,10 +42,10 @@ abstract class AbstractDisplayer /** * Create a new displayer instance. * - * @param mixed $value - * @param Grid $grid - * @param Column $column - * @param \stdClass $row + * @param mixed $value + * @param Grid $grid + * @param Column $column + * @param \stdClass $row */ public function __construct($value, Grid $grid, Column $column, $row) { @@ -119,8 +119,7 @@ public function resource() /** * Get translation. * - * @param string $text - * + * @param string $text * @return string|\Symfony\Component\Translation\TranslatorInterface */ protected function trans($text) diff --git a/src/Grid/Displayers/Actions.php b/src/Grid/Displayers/Actions.php index e3cc91602..0773f91f2 100755 --- a/src/Grid/Displayers/Actions.php +++ b/src/Grid/Displayers/Actions.php @@ -47,8 +47,7 @@ class Actions extends AbstractDisplayer /** * Append a action. * - * @param string|Renderable|Action|Htmlable $action - * + * @param string|Renderable|Action|Htmlable $action * @return $this */ public function append($action) @@ -63,8 +62,7 @@ public function append($action) /** * Prepend a action. * - * @param string|Renderable|Action|Htmlable $action - * + * @param string|Renderable|Action|Htmlable $action * @return $this */ public function prepend($action) @@ -77,8 +75,7 @@ public function prepend($action) } /** - * @param mixed $action - * + * @param mixed $action * @return mixed */ protected function prepareAction(&$action) @@ -100,8 +97,7 @@ public function view(bool $value = true) /** * Disable view action. * - * @param bool $disable - * + * @param bool $disable * @return $this */ public function disableView(bool $disable = true) @@ -117,8 +113,7 @@ public function delete(bool $value = true) /** * Disable delete. * - * @param bool $disable - * + * @param bool $disable * @return $this. */ public function disableDelete(bool $disable = true) @@ -134,8 +129,7 @@ public function edit(bool $value = true) /** * Disable edit. * - * @param bool $disable - * + * @param bool $disable * @return $this. */ public function disableEdit(bool $disable = true) @@ -151,8 +145,7 @@ public function quickEdit(bool $value = true) /** * Disable quick edit. * - * @param bool $disable - * + * @param bool $disable * @return $this. */ public function disableQuickEdit(bool $disable = true) @@ -161,9 +154,8 @@ public function disableQuickEdit(bool $disable = true) } /** - * @param string $key - * @param bool $disable - * + * @param string $key + * @param bool $disable * @return $this */ protected function setAction(string $key, bool $value) @@ -177,7 +169,6 @@ protected function setAction(string $key, bool $value) * Set resource of current resource. * * @param $resource - * * @return $this */ public function setResource($resource) @@ -209,8 +200,7 @@ protected function resetDefaultActions() } /** - * @param array $callbacks - * + * @param array $callbacks * @return void */ protected function call(array $callbacks = []) diff --git a/src/Grid/Displayers/DialogTree.php b/src/Grid/Displayers/DialogTree.php index 30f653b06..0da4b0002 100644 --- a/src/Grid/Displayers/DialogTree.php +++ b/src/Grid/Displayers/DialogTree.php @@ -47,15 +47,14 @@ class DialogTree extends AbstractDisplayer protected $rootParentId = 0; /** - * @param array $data exp: - * { - * "id": "1", - * "parent": "#", - * "text": "Dashboard", - * // "state": {"selected": true} - * } - * @param array $data - * + * @param array $data exp: + * { + * "id": "1", + * "parent": "#", + * "text": "Dashboard", + * // "state": {"selected": true} + * } + * @param array $data * @return $this */ public function nodes($data) @@ -91,8 +90,7 @@ public function checkAll() } /** - * @param array $options - * + * @param array $options * @return $this */ public function options($options = []) @@ -114,9 +112,8 @@ public function title($title) } /** - * @param string $width - * @param string $height - * + * @param string $width + * @param string $height * @return $this */ public function area(string $width, string $height) diff --git a/src/Grid/Displayers/DropdownActions.php b/src/Grid/Displayers/DropdownActions.php index e38b950a6..94cec8692 100644 --- a/src/Grid/Displayers/DropdownActions.php +++ b/src/Grid/Displayers/DropdownActions.php @@ -19,8 +19,7 @@ public function prepend($action) } /** - * @param mixed $action - * + * @param mixed $action * @return mixed */ protected function prepareAction(&$action) @@ -31,8 +30,7 @@ protected function prepareAction(&$action) } /** - * @param mixed $action - * + * @param mixed $action * @return string */ protected function wrapCustomAction($action) @@ -61,8 +59,7 @@ protected function prependDefaultActions() } /** - * @param \Closure[] $callback - * + * @param \Closure[] $callback * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function display(array $callbacks = []) diff --git a/src/Grid/Exporter.php b/src/Grid/Exporter.php index 8b7956a5d..a16a371e3 100755 --- a/src/Grid/Exporter.php +++ b/src/Grid/Exporter.php @@ -7,6 +7,7 @@ /** * @mixin Grid\Exporters\AbstractExporter + * * @method mixed export */ class Exporter @@ -55,7 +56,7 @@ class Exporter /** * Create a new Exporter instance. * - * @param Grid $grid + * @param Grid $grid */ public function __construct(Grid $grid) { @@ -65,9 +66,8 @@ public function __construct(Grid $grid) /** * Get or set option for exporter. * - * @param string $key - * @param mixed|null $value - * + * @param string $key + * @param mixed|null $value * @return $this|mixed|null */ public function option($key, $value = null) @@ -84,8 +84,7 @@ public function option($key, $value = null) /** * Disable export all. * - * @param bool $value - * + * @param bool $value * @return $this */ public function disableExportAll(bool $value = true) @@ -96,8 +95,7 @@ public function disableExportAll(bool $value = true) /** * Disable export current page. * - * @param bool $value - * + * @param bool $value * @return $this */ public function disableExportCurrentPage(bool $value = true) @@ -108,8 +106,7 @@ public function disableExportCurrentPage(bool $value = true) /** * Disable export selected rows. * - * @param bool $value - * + * @param bool $value * @return $this */ public function disableExportSelectedRow(bool $value = true) @@ -118,8 +115,7 @@ public function disableExportSelectedRow(bool $value = true) } /** - * @param int $value - * + * @param int $value * @return $this */ public function chunkSize(int $value) @@ -151,8 +147,7 @@ public static function extend($driver, $extend) /** * Resolve export driver. * - * @param string $driver - * + * @param string $driver * @return Grid\Exporters\AbstractExporter */ public function resolve($driver = null) @@ -183,8 +178,7 @@ public function driver() /** * Get export driver. * - * @param string $driver - * + * @param string $driver * @return Grid\Exporters\AbstractExporter */ protected function newDriver($driver): ExporterInterface @@ -215,9 +209,8 @@ public function makeDefaultDriver() /** * Format query for export url. * - * @param int $scope - * @param null $args - * + * @param int $scope + * @param null $args * @return array */ public function formatExportQuery($scope = '', $args = null) @@ -242,7 +235,6 @@ public function formatExportQuery($scope = '', $args = null) /** * @param $method * @param $arguments - * * @return mixed */ public function __call($method, $arguments) diff --git a/src/Grid/Exporters/AbstractExporter.php b/src/Grid/Exporters/AbstractExporter.php index f506b8409..a61b8c34c 100755 --- a/src/Grid/Exporters/AbstractExporter.php +++ b/src/Grid/Exporters/AbstractExporter.php @@ -51,7 +51,7 @@ abstract class AbstractExporter implements ExporterInterface /** * Create a new exporter instance. * - * @param array $titles + * @param array $titles */ public function __construct($titles = []) { @@ -63,8 +63,7 @@ public function __construct($titles = []) /** * Set the headings of excel sheet. * - * @param array|false $titles - * + * @param array|false $titles * @return $this|array */ public function titles($titles = null) @@ -102,8 +101,7 @@ protected function defaultTitles() /** * Set filename. * - * @param string|\Closure $filename - * + * @param string|\Closure $filename * @return $this */ public function filename($filename) @@ -116,8 +114,7 @@ public function filename($filename) /** * Set export data callback function. * - * @param \Closure $builder - * + * @param \Closure $builder * @return $this */ public function rows(\Closure $builder) @@ -152,8 +149,7 @@ public function ods() } /** - * @param string $ext e.g. csv/xlsx/ods - * + * @param string $ext e.g. csv/xlsx/ods * @return $this */ public function extension(string $ext) @@ -166,8 +162,7 @@ public function extension(string $ext) /** * Set grid for exporter. * - * @param Grid $grid - * + * @param Grid $grid * @return $this */ public function setGrid(Grid $grid) @@ -189,9 +184,8 @@ public function getFilename() /** * Get data with export query. * - * @param int $page - * @param int $perPage - * + * @param int $page + * @param int $perPage * @return array|\Illuminate\Support\Collection|mixed */ public function buildData(?int $page = null, ?int $perPage = null) @@ -222,8 +216,7 @@ public function buildData(?int $page = null, ?int $perPage = null) /** * 格式化待导出数据. * - * @param array $data - * + * @param array $data * @return array */ protected function normalize(array $data) @@ -260,8 +253,7 @@ protected function getGridModel() } /** - * @param array $data - * + * @param array $data * @return array */ protected function callBuilder(array &$data) @@ -284,8 +276,7 @@ protected function getChunkSize() /** * Export data with scope. * - * @param string $scope - * + * @param string $scope * @return $this */ public function withScope($scope) @@ -313,7 +304,6 @@ abstract public function export(); /** * @param $method * @param $arguments - * * @return mixed */ public function __call($method, $arguments) @@ -326,7 +316,7 @@ public function __call($method, $arguments) /** * Create a new exporter instance. * - * @param \Closure|array $closure + * @param \Closure|array $closure */ public static function make($builder = null) { diff --git a/src/Grid/Filter.php b/src/Grid/Filter.php index 95ded3558..514c586c5 100755 --- a/src/Grid/Filter.php +++ b/src/Grid/Filter.php @@ -44,28 +44,28 @@ /** * Class Filter. * - * @method Equal equal($column, $label = '') - * @method NotEqual notEqual($column, $label = '') - * @method Like like($column, $label = '') - * @method Ilike ilike($column, $label = '') - * @method StartWith startWith($column, $label = '') - * @method EndWith endWith($column, $label = '') - * @method Gt gt($column, $label = '') - * @method Lt lt($column, $label = '') - * @method Ngt ngt($column, $label = '') - * @method Nlt nlt($column, $label = '') - * @method Between between($column, $label = '') - * @method In in($column, $label = '') - * @method NotIn notIn($column, $label = '') - * @method Where where($colum, $callback, $label = '') + * @method Equal equal($column, $label = '') + * @method NotEqual notEqual($column, $label = '') + * @method Like like($column, $label = '') + * @method Ilike ilike($column, $label = '') + * @method StartWith startWith($column, $label = '') + * @method EndWith endWith($column, $label = '') + * @method Gt gt($column, $label = '') + * @method Lt lt($column, $label = '') + * @method Ngt ngt($column, $label = '') + * @method Nlt nlt($column, $label = '') + * @method Between between($column, $label = '') + * @method In in($column, $label = '') + * @method NotIn notIn($column, $label = '') + * @method Where where($colum, $callback, $label = '') * @method WhereBetween whereBetween($colum, $callback, $label = '') - * @method Date date($column, $label = '') - * @method Day day($column, $label = '') - * @method Month month($column, $label = '') - * @method Year year($column, $label = '') - * @method Hidden hidden($name, $value) - * @method Group group($column, $builder = null, $label = '') - * @method Newline newline() + * @method Date date($column, $label = '') + * @method Day day($column, $label = '') + * @method Month month($column, $label = '') + * @method Year year($column, $label = '') + * @method Hidden hidden($name, $value) + * @method Group group($column, $builder = null, $label = '') + * @method Newline newline() */ class Filter implements Renderable { @@ -203,7 +203,7 @@ class Filter implements Renderable /** * Create a new filter instance. * - * @param Model $model + * @param Model $model */ public function __construct(Model $model) { @@ -239,8 +239,7 @@ protected function formatFilterId() /** * Set action of search form. * - * @param string $action - * + * @param string $action * @return $this */ public function setAction($action) @@ -261,8 +260,7 @@ public function withoutInputBorder() } /** - * @param bool $disabled - * + * @param bool $disabled * @return $this */ public function disableCollapse(bool $disabled = true) @@ -273,8 +271,7 @@ public function disableCollapse(bool $disabled = true) } /** - * @param bool $disabled - * + * @param bool $disabled * @return $this */ public function disableResetButton(bool $disabled = true) @@ -287,9 +284,8 @@ public function disableResetButton(bool $disabled = true) /** * Get input data. * - * @param string $key - * @param null $value - * + * @param string $key + * @param null $value * @return array|mixed */ public function input($key = null, $default = null) @@ -326,8 +322,7 @@ public function grid() /** * Set ID of search form. * - * @param string $filterID - * + * @param string $filterID * @return $this */ public function setFilterID($filterID) @@ -354,8 +349,7 @@ public function rightSide() } /** - * @param string|null $mode - * + * @param string|null $mode * @return $this|string */ public function mode(string $mode = null) @@ -400,7 +394,7 @@ public function withBorder($border = null) /** * Remove filter by column. * - * @param string|array $column + * @param string|array $column */ public function removeFilter($column) { @@ -478,8 +472,7 @@ public function getConditions() } /** - * @param array $inputs - * + * @param array $inputs * @return void */ protected function sanitizeInputs(&$inputs) @@ -500,8 +493,7 @@ protected function sanitizeInputs(&$inputs) /** * Add a filter to grid. * - * @param AbstractFilter $filter - * + * @param AbstractFilter $filter * @return AbstractFilter */ protected function addFilter(AbstractFilter $filter) @@ -516,8 +508,7 @@ protected function addFilter(AbstractFilter $filter) /** * Use a custom filter. * - * @param AbstractFilter $filter - * + * @param AbstractFilter $filter * @return AbstractFilter */ public function use(AbstractFilter $filter) @@ -547,9 +538,8 @@ public function countConditions() } /** - * @param string $key - * @param string $label - * + * @param string $key + * @param string $label * @return Scope */ public function scope($key, $label = '') @@ -620,8 +610,7 @@ protected function getScopeConditions() /** * Expand filter container. * - * @param bool $value - * + * @param bool $value * @return $this */ public function expand(bool $value = true) @@ -655,11 +644,10 @@ public function execute() } /** - * @param string $top - * @param string $right - * @param string $bottom - * @param string $left - * + * @param string $top + * @param string $right + * @param string $bottom + * @param string $left * @return Filter */ public function padding($top = '15px', $right = '15px', $bottom = '5px', $left = '') @@ -668,8 +656,7 @@ public function padding($top = '15px', $right = '15px', $bottom = '5px', $left = } /** - * @param string $style - * + * @param string $style * @return $this */ public function style(?string $style) @@ -780,9 +767,8 @@ public function urlWithoutScopes() /** * Generate a filter object and add to grid. * - * @param string $method - * @param array $arguments - * + * @param string $method + * @param array $arguments * @return AbstractFilter|$this */ public function __call($method, $arguments) @@ -804,8 +790,8 @@ public function __call($method, $arguments) } /** - * @param string $name - * @param string $filterClass + * @param string $name + * @param string $filterClass */ public static function extend($name, $filterClass) { diff --git a/src/Grid/Filter/AbstractFilter.php b/src/Grid/Filter/AbstractFilter.php index 54065b342..9bd7a0da5 100755 --- a/src/Grid/Filter/AbstractFilter.php +++ b/src/Grid/Filter/AbstractFilter.php @@ -114,7 +114,7 @@ abstract class AbstractFilter * AbstractFilter constructor. * * @param $column - * @param string $label + * @param string $label */ public function __construct($column, $label = '') { @@ -135,8 +135,7 @@ protected function setupDefaultPresenter() /** * Format label. * - * @param string $label - * + * @param string $label * @return string */ protected function formatLabel($label) @@ -153,8 +152,7 @@ protected function formatLabel($label) /** * Set the column width. * - * @param int|string $width - * + * @param int|string $width * @return $this */ public function width($width) @@ -180,8 +178,7 @@ public function getElementName() /** * Format name. * - * @param string $column - * + * @param string $column * @return string */ protected function formatName($column) @@ -203,8 +200,7 @@ protected function formatName($column) /** * Format id. * - * @param string|array $columns - * + * @param string|array $columns * @return array|string */ protected function formatId($columns) @@ -221,7 +217,7 @@ protected function formatId($columns) } /** - * @param Filter $filter + * @param Filter $filter */ public function setParent(Filter $filter) { @@ -241,8 +237,7 @@ public function parent() /** * Get siblings of current filter. * - * @param null $index - * + * @param null $index * @return AbstractFilter[]|mixed */ public function siblings($index = null) @@ -257,8 +252,7 @@ public function siblings($index = null) /** * Get previous filter. * - * @param int $step - * + * @param int $step * @return AbstractFilter[]|mixed */ public function previous($step = 1) @@ -271,8 +265,7 @@ public function previous($step = 1) /** * Get next filter. * - * @param int $step - * + * @param int $step * @return AbstractFilter[]|mixed */ public function next($step = 1) @@ -285,8 +278,7 @@ public function next($step = 1) /** * Get query condition from filter. * - * @param array $inputs - * + * @param array $inputs * @return array|mixed|null */ public function condition($inputs) @@ -317,8 +309,7 @@ public function ignore() /** * Select filter. * - * @param array $options - * + * @param array $options * @return Select */ public function select($options = []) @@ -327,8 +318,7 @@ public function select($options = []) } /** - * @param array $options - * + * @param array $options * @return MultipleSelect */ public function multipleSelect($options = []) @@ -337,8 +327,7 @@ public function multipleSelect($options = []) } /** - * @param LazyRenderable $table - * + * @param LazyRenderable $table * @return Filter\Presenter\SelectTable */ public function selectTable(LazyRenderable $table) @@ -347,8 +336,7 @@ public function selectTable(LazyRenderable $table) } /** - * @param LazyRenderable $table - * + * @param LazyRenderable $table * @return Filter\Presenter\MultipleSelectTable */ public function multipleSelectTable(LazyRenderable $table) @@ -357,8 +345,7 @@ public function multipleSelectTable(LazyRenderable $table) } /** - * @param array $options - * + * @param array $options * @return Radio */ public function radio($options = []) @@ -367,8 +354,7 @@ public function radio($options = []) } /** - * @param array $options - * + * @param array $options * @return Checkbox */ public function checkbox($options = []) @@ -379,8 +365,7 @@ public function checkbox($options = []) /** * Datetime filter. * - * @param array $options - * + * @param array $options * @return DateTime */ public function datetime($options = []) @@ -441,8 +426,7 @@ public function year() /** * Set presenter object of filter. * - * @param Presenter $presenter - * + * @param Presenter $presenter * @return mixed */ public function setPresenter(Presenter $presenter) @@ -471,8 +455,7 @@ protected function presenter() /** * Set default value for filter. * - * @param null $default - * + * @param null $default * @return $this */ public function default($default = null) @@ -502,8 +485,7 @@ public function getId() /** * Set element id. * - * @param string $id - * + * @param string $id * @return $this */ public function setId($id) @@ -529,8 +511,7 @@ public function originalColumn() } /** - * @param string $column - * + * @param string $column * @return string */ public function formatColumnClass($column) @@ -557,8 +538,7 @@ public function getValue() } /** - * @param mixed $value - * + * @param mixed $value * @return $this */ public function setValue($value) @@ -589,9 +569,8 @@ protected function buildCondition(...$params) } /** - * @param string|callable $relColumn + * @param string|callable $relColumn * @param mixed ...$params - * * @return array */ protected function buildRelationQuery($relColumn, ...$params) @@ -676,10 +655,9 @@ public function __toString() /** * @param $method * @param $params + * @return mixed * * @throws \Exception - * - * @return mixed */ public function __call($method, $params) { diff --git a/src/Grid/Filter/Between.php b/src/Grid/Filter/Between.php index 5ff297ae4..9e912d378 100755 --- a/src/Grid/Filter/Between.php +++ b/src/Grid/Filter/Between.php @@ -37,8 +37,7 @@ public function toTimestamp() /** * Format id. * - * @param string $column - * + * @param string $column * @return array|string */ public function formatId($column) @@ -52,8 +51,7 @@ public function formatId($column) /** * Format two field names of this filter. * - * @param string $column - * + * @param string $column * @return array */ protected function formatName($column) @@ -76,8 +74,7 @@ protected function formatName($column) /** * Get condition of this filter. * - * @param array $inputs - * + * @param array $inputs * @return mixed */ public function condition($inputs) @@ -118,8 +115,7 @@ public function condition($inputs) } /** - * @param array $options - * + * @param array $options * @return $this */ public function datetime($options = []) diff --git a/src/Grid/Filter/EndWith.php b/src/Grid/Filter/EndWith.php index 928e4daae..f4dbc152d 100755 --- a/src/Grid/Filter/EndWith.php +++ b/src/Grid/Filter/EndWith.php @@ -11,8 +11,7 @@ class EndWith extends AbstractFilter /** * Get condition of this filter. * - * @param array $inputs - * + * @param array $inputs * @return array|mixed|void */ public function condition($inputs) diff --git a/src/Grid/Filter/Group.php b/src/Grid/Filter/Group.php index 7a62cefac..d982759fa 100755 --- a/src/Grid/Filter/Group.php +++ b/src/Grid/Filter/Group.php @@ -29,9 +29,9 @@ class Group extends AbstractFilter /** * Group constructor. * - * @param string $column - * @param string $label - * @param \Closure|null $builder + * @param string $column + * @param string $label + * @param \Closure|null $builder */ public function __construct($column, \Closure $builder = null, $label = '') { @@ -41,7 +41,7 @@ public function __construct($column, \Closure $builder = null, $label = '') } /** - * @param Filter $filter + * @param Filter $filter */ public function setParent(Filter $filter) { @@ -62,9 +62,8 @@ protected function initialize() /** * Join a query to group. * - * @param string $label - * @param array $condition - * + * @param string $label + * @param array $condition * @return $this */ protected function joinGroup($label, array $condition) @@ -79,9 +78,8 @@ protected function joinGroup($label, array $condition) /** * Filter out `equal` records. * - * @param string $label - * @param string $operator - * + * @param string $label + * @param string $operator * @return Group */ public function equal($label = '', $operator = '=') @@ -96,8 +94,7 @@ public function equal($label = '', $operator = '=') /** * Filter out `not equal` records. * - * @param string $label - * + * @param string $label * @return Group */ public function notEqual($label = '') @@ -108,8 +105,7 @@ public function notEqual($label = '') /** * Filter out `greater then` records. * - * @param string $label - * + * @param string $label * @return Group */ public function gt($label = '') @@ -120,8 +116,7 @@ public function gt($label = '') /** * Filter out `less then` records. * - * @param string $label - * + * @param string $label * @return Group */ public function lt($label = '') @@ -132,8 +127,7 @@ public function lt($label = '') /** * Filter out `not less then` records. * - * @param string $label - * + * @param string $label * @return Group */ public function nlt($label = '') @@ -144,8 +138,7 @@ public function nlt($label = '') /** * Filter out `not greater than` records. * - * @param string $label - * + * @param string $label * @return Group */ public function ngt($label = '') @@ -156,8 +149,7 @@ public function ngt($label = '') /** * Filter out records that match the regex. * - * @param string $label - * + * @param string $label * @return Group */ public function match($label = '') @@ -170,9 +162,8 @@ public function match($label = '') /** * Specify a where query. * - * @param string $label - * @param \Closure $builder - * + * @param string $label + * @param \Closure $builder * @return Group */ public function where($label, \Closure $builder) @@ -187,9 +178,8 @@ public function where($label, \Closure $builder) /** * Specify a where like query. * - * @param string $label - * @param string $operator - * + * @param string $label + * @param string $operator * @return Group */ public function like($label = '', $operator = 'like') @@ -204,8 +194,7 @@ public function like($label = '', $operator = 'like') /** * Alias of `like` method. * - * @param string $label - * + * @param string $label * @return Group */ public function contains($label = '') @@ -216,8 +205,7 @@ public function contains($label = '') /** * Specify a where ilike query. * - * @param string $label - * + * @param string $label * @return Group */ public function ilike($label = '') @@ -228,8 +216,7 @@ public function ilike($label = '') /** * Filter out records which starts with input query. * - * @param string $label - * + * @param string $label * @return Group */ public function startWith($label = '') @@ -244,8 +231,7 @@ public function startWith($label = '') /** * Filter out records which ends with input query. * - * @param string $label - * + * @param string $label * @return Group */ public function endWith($label = '') diff --git a/src/Grid/Filter/Gt.php b/src/Grid/Filter/Gt.php index 179ce5f15..4055e67ef 100755 --- a/src/Grid/Filter/Gt.php +++ b/src/Grid/Filter/Gt.php @@ -14,8 +14,7 @@ class Gt extends AbstractFilter /** * Get condition of this filter. * - * @param array $inputs - * + * @param array $inputs * @return array|mixed|void */ public function condition($inputs) diff --git a/src/Grid/Filter/Hidden.php b/src/Grid/Filter/Hidden.php index 6991f9bea..9e3e6d6bb 100755 --- a/src/Grid/Filter/Hidden.php +++ b/src/Grid/Filter/Hidden.php @@ -17,8 +17,8 @@ class Hidden extends AbstractFilter /** * Hidden constructor. * - * @param string $name - * @param string $value + * @param string $name + * @param string $value */ public function __construct($name, $value) { diff --git a/src/Grid/Filter/Ilike.php b/src/Grid/Filter/Ilike.php index 3ca335aa5..bb88f39ac 100755 --- a/src/Grid/Filter/Ilike.php +++ b/src/Grid/Filter/Ilike.php @@ -9,8 +9,7 @@ class Ilike extends AbstractFilter /** * Get condition of this filter. * - * @param array $inputs - * + * @param array $inputs * @return array|mixed|void */ public function condition($inputs) diff --git a/src/Grid/Filter/In.php b/src/Grid/Filter/In.php index 2b9999afb..a53e59758 100755 --- a/src/Grid/Filter/In.php +++ b/src/Grid/Filter/In.php @@ -19,8 +19,7 @@ class In extends AbstractFilter /** * Get condition of this filter. * - * @param array $inputs - * + * @param array $inputs * @return mixed */ public function condition($inputs) diff --git a/src/Grid/Filter/Layout/Column.php b/src/Grid/Filter/Layout/Column.php index fdfeb90e0..c8154011e 100755 --- a/src/Grid/Filter/Layout/Column.php +++ b/src/Grid/Filter/Layout/Column.php @@ -20,7 +20,7 @@ class Column /** * Column constructor. * - * @param int $width + * @param int $width */ public function __construct($width = 12) { @@ -31,7 +31,7 @@ public function __construct($width = 12) /** * Add a filter to this column. * - * @param AbstractFilter $filter + * @param AbstractFilter $filter */ public function addFilter(AbstractFilter $filter) { diff --git a/src/Grid/Filter/Layout/Layout.php b/src/Grid/Filter/Layout/Layout.php index 31b4c4ec9..1a30dc8ad 100755 --- a/src/Grid/Filter/Layout/Layout.php +++ b/src/Grid/Filter/Layout/Layout.php @@ -25,7 +25,7 @@ class Layout /** * Layout constructor. * - * @param Filter $filter + * @param Filter $filter */ public function __construct(Filter $filter) { @@ -39,7 +39,7 @@ public function __construct(Filter $filter) /** * Add a filter to layout column. * - * @param Filter\AbstractFilter $filter + * @param Filter\AbstractFilter $filter */ public function addFilter(Filter\AbstractFilter $filter) { @@ -49,8 +49,8 @@ public function addFilter(Filter\AbstractFilter $filter) /** * Add a new column in layout. * - * @param int $width - * @param \Closure $closure + * @param int $width + * @param \Closure $closure */ public function column($width, \Closure $closure) { diff --git a/src/Grid/Filter/Like.php b/src/Grid/Filter/Like.php index ec81ebd07..c7da40361 100755 --- a/src/Grid/Filter/Like.php +++ b/src/Grid/Filter/Like.php @@ -9,8 +9,7 @@ class Like extends AbstractFilter /** * Get condition of this filter. * - * @param array $inputs - * + * @param array $inputs * @return array|mixed|void */ public function condition($inputs) diff --git a/src/Grid/Filter/Lt.php b/src/Grid/Filter/Lt.php index 3834bf020..be5fec079 100755 --- a/src/Grid/Filter/Lt.php +++ b/src/Grid/Filter/Lt.php @@ -14,8 +14,7 @@ class Lt extends AbstractFilter /** * Get condition of this filter. * - * @param array $inputs - * + * @param array $inputs * @return array|mixed|void */ public function condition($inputs) diff --git a/src/Grid/Filter/Ngt.php b/src/Grid/Filter/Ngt.php index 52942e6d3..b6d90b573 100755 --- a/src/Grid/Filter/Ngt.php +++ b/src/Grid/Filter/Ngt.php @@ -14,8 +14,7 @@ class Ngt extends AbstractFilter /** * Get condition of this filter. * - * @param array $inputs - * + * @param array $inputs * @return array|mixed|void */ public function condition($inputs) diff --git a/src/Grid/Filter/Nlt.php b/src/Grid/Filter/Nlt.php index 21ec7f14b..c3285add0 100755 --- a/src/Grid/Filter/Nlt.php +++ b/src/Grid/Filter/Nlt.php @@ -14,8 +14,7 @@ class Nlt extends AbstractFilter /** * Get condition of this filter. * - * @param array $inputs - * + * @param array $inputs * @return array|mixed|void */ public function condition($inputs) diff --git a/src/Grid/Filter/Presenter/DateTime.php b/src/Grid/Filter/Presenter/DateTime.php index 69516d905..dc46694e2 100755 --- a/src/Grid/Filter/Presenter/DateTime.php +++ b/src/Grid/Filter/Presenter/DateTime.php @@ -19,7 +19,7 @@ class DateTime extends Presenter /** * DateTime constructor. * - * @param array $options + * @param array $options */ public function __construct($options = []) { @@ -27,8 +27,7 @@ public function __construct($options = []) } /** - * @param array $options - * + * @param array $options * @return mixed */ protected function getOptions(array $options): array diff --git a/src/Grid/Filter/Presenter/MultipleSelect.php b/src/Grid/Filter/Presenter/MultipleSelect.php index dea5c0d7b..17b8c32d6 100755 --- a/src/Grid/Filter/Presenter/MultipleSelect.php +++ b/src/Grid/Filter/Presenter/MultipleSelect.php @@ -9,11 +9,10 @@ class MultipleSelect extends Select /** * Load options for other select when change. * - * @param string $target - * @param string $resourceUrl - * @param string $idField - * @param string $textField - * + * @param string $target + * @param string $resourceUrl + * @param string $idField + * @param string $textField * @return $this */ public function loadMore($target, $resourceUrl, $idField = 'id', $textField = 'text'): self diff --git a/src/Grid/Filter/Presenter/MultipleSelectTable.php b/src/Grid/Filter/Presenter/MultipleSelectTable.php index b491e446c..96c675725 100644 --- a/src/Grid/Filter/Presenter/MultipleSelectTable.php +++ b/src/Grid/Filter/Presenter/MultipleSelectTable.php @@ -20,8 +20,7 @@ class MultipleSelectTable extends SelectTable /** * 设置最大选择数量. * - * @param int $max - * + * @param int $max * @return $this */ public function max(int $max) diff --git a/src/Grid/Filter/Presenter/Presenter.php b/src/Grid/Filter/Presenter/Presenter.php index 12ce859e8..0c7300705 100755 --- a/src/Grid/Filter/Presenter/Presenter.php +++ b/src/Grid/Filter/Presenter/Presenter.php @@ -38,7 +38,7 @@ abstract class Presenter /** * Set parent filter. * - * @param AbstractFilter $filter + * @param AbstractFilter $filter */ public function setParent(AbstractFilter $filter) { @@ -50,8 +50,7 @@ public function setParent(AbstractFilter $filter) } /** - * @param int $width - * + * @param int $width * @return $this */ public function width($width) @@ -85,7 +84,6 @@ public function view(): string * Set default value for filter. * * @param $default - * * @return $this */ public function default($default) diff --git a/src/Grid/Filter/Presenter/Radio.php b/src/Grid/Filter/Presenter/Radio.php index 5000314ed..fa4856d0b 100755 --- a/src/Grid/Filter/Presenter/Radio.php +++ b/src/Grid/Filter/Presenter/Radio.php @@ -26,7 +26,7 @@ class Radio extends Presenter /** * Radio constructor. * - * @param array $options + * @param array $options */ public function __construct($options = []) { diff --git a/src/Grid/Filter/Presenter/Select.php b/src/Grid/Filter/Presenter/Select.php index a65670cbf..d853e98c7 100755 --- a/src/Grid/Filter/Presenter/Select.php +++ b/src/Grid/Filter/Presenter/Select.php @@ -45,7 +45,7 @@ class Select extends Presenter /** * Select constructor. * - * @param mixed $options + * @param mixed $options */ public function __construct($options) { @@ -57,9 +57,8 @@ public function __construct($options) * * all configurations see https://select2.org/configuration/options-api * - * @param string|array $key - * @param mixed $val - * + * @param string|array $key + * @param mixed $val * @return $this */ public function config($key, $val = null) @@ -116,10 +115,9 @@ protected function buildOptions(): array /** * Load options from current selected resource(s). * - * @param string $model - * @param string $idField - * @param string $textField - * + * @param string $model + * @param string $idField + * @param string $textField * @return $this */ public function model($model, string $idField = 'id', string $textField = 'name') @@ -156,10 +154,9 @@ public function model($model, string $idField = 'id', string $textField = 'name' /** * Load options from remote. * - * @param string $url - * @param array $parameters - * @param array $options - * + * @param string $url + * @param array $parameters + * @param array $options * @return $this */ protected function loadRemoteOptions(string $url, array $parameters = [], array $options = []) @@ -185,9 +182,8 @@ protected function loadRemoteOptions(string $url, array $parameters = [], array } /** - * @param string|array $key - * @param mixed $value - * + * @param string|array $key + * @param mixed $value * @return $this */ public function addDefaultConfig($key, $value = null) @@ -210,8 +206,7 @@ public function addDefaultConfig($key, $value = null) /** * Set input placeholder. * - * @param string $placeholder - * + * @param string $placeholder * @return $this|string */ public function placeholder(string $placeholder = null) @@ -228,10 +223,9 @@ public function placeholder(string $placeholder = null) /** * Load options from ajax. * - * @param string $resourceUrl + * @param string $resourceUrl * @param $idField * @param $textField - * * @return $this */ public function ajax(string $resourceUrl, string $idField = 'id', string $textField = 'text') @@ -278,11 +272,10 @@ public function getElementClass(): string /** * Load options for other select when change. * - * @param string $target - * @param string $resourceUrl - * @param string $idField - * @param string $textField - * + * @param string $target + * @param string $resourceUrl + * @param string $idField + * @param string $textField * @return $this */ public function load($target, string $resourceUrl, string $idField = 'id', string $textField = 'text'): self @@ -293,11 +286,10 @@ public function load($target, string $resourceUrl, string $idField = 'id', strin /** * 联动加载多个字段. * - * @param array|string $fields - * @param array|string $sourceUrls - * @param string $idField - * @param string $textField - * + * @param array|string $fields + * @param array|string $sourceUrls + * @param string $idField + * @param string $textField * @return $this */ public function loads($fields = [], $sourceUrls = [], string $idField = 'id', string $textField = 'text') @@ -321,8 +313,7 @@ public function loads($fields = [], $sourceUrls = [], string $idField = 'id', st /** * Get form element class. * - * @param string $target - * + * @param string $target * @return mixed */ protected function getClass($target): string diff --git a/src/Grid/Filter/Presenter/SelectTable.php b/src/Grid/Filter/Presenter/SelectTable.php index 32f92c2c3..f5fb47688 100644 --- a/src/Grid/Filter/Presenter/SelectTable.php +++ b/src/Grid/Filter/Presenter/SelectTable.php @@ -40,8 +40,7 @@ public function __construct(LazyRenderable $table) /** * 设置选中的选项. * - * @param \Closure $options - * + * @param \Closure $options * @return $this */ public function options(\Closure $options) @@ -54,10 +53,9 @@ public function options(\Closure $options) /** * 设置选中数据显示. * - * @param string $model - * @param string $id - * @param string $text - * + * @param string $model + * @param string $id + * @param string $text * @return $this */ public function model(string $model, string $id = 'id', string $text = 'title') @@ -76,7 +74,6 @@ public function model(string $model, string $id = 'id', string $text = 'title') * * @param $visibleColumn * @param $key - * * @return $this */ public function pluck(?string $visibleColumn, ?string $key = 'id') @@ -94,8 +91,7 @@ public function pluck(?string $visibleColumn, ?string $key = 'id') * $this->width('500px'); * $this->width('50%'); * - * @param string $width - * + * @param string $width * @return $this */ public function dialogWidth(string $width) @@ -108,8 +104,7 @@ public function dialogWidth(string $width) /** * 设置弹窗标题. * - * @param string $title - * + * @param string $title * @return $this */ public function title($title) @@ -120,8 +115,7 @@ public function title($title) } /** - * @param string $placeholder - * + * @param string $placeholder * @return $this|string */ public function placeholder(string $placeholder = null) diff --git a/src/Grid/Filter/Presenter/Text.php b/src/Grid/Filter/Presenter/Text.php index 10e7157e4..3eece5352 100755 --- a/src/Grid/Filter/Presenter/Text.php +++ b/src/Grid/Filter/Presenter/Text.php @@ -24,7 +24,7 @@ class Text extends Presenter /** * Text constructor. * - * @param string $placeholder + * @param string $placeholder */ public function __construct($placeholder = '') { @@ -49,8 +49,7 @@ public function defaultVariables(): array /** * Set input placeholder. * - * @param string $placeholder - * + * @param string $placeholder * @return $this */ public function placeholder($placeholder = '') @@ -85,7 +84,7 @@ public function integer() } /** - * @param array $options + * @param array $options * * @see https://github.com/RobinHerbots/Inputmask/blob/4.x/README_numeric.md * @@ -97,7 +96,7 @@ public function decimal($options = []) } /** - * @param array $options + * @param array $options * * @see https://github.com/RobinHerbots/Inputmask/blob/4.x/README_numeric.md * @@ -113,7 +112,7 @@ public function currency($options = []) } /** - * @param array $options + * @param array $options * * @see https://github.com/RobinHerbots/Inputmask/blob/4.x/README_numeric.md * @@ -143,8 +142,7 @@ public function mac() } /** - * @param string $mask - * + * @param string $mask * @return Text */ public function mobile($mask = '19999999999') @@ -153,9 +151,8 @@ public function mobile($mask = '19999999999') } /** - * @param array $options - * @param string $icon - * + * @param array $options + * @param string $icon * @return $this */ public function inputmask($options = [], $icon = 'pencil') diff --git a/src/Grid/Filter/Scope.php b/src/Grid/Filter/Scope.php index dfb1eca60..d9bf5dc90 100755 --- a/src/Grid/Filter/Scope.php +++ b/src/Grid/Filter/Scope.php @@ -38,9 +38,9 @@ class Scope implements Renderable /** * Scope constructor. * - * @param Filter $filter - * @param string $key - * @param string $label + * @param Filter $filter + * @param string $key + * @param string $label */ public function __construct(Filter $filter, $key, $label = '') { @@ -87,9 +87,8 @@ public function render() } /** - * @param string $method - * @param array $arguments - * + * @param string $method + * @param array $arguments * @return $this */ public function __call($method, $arguments) diff --git a/src/Grid/Filter/StartWith.php b/src/Grid/Filter/StartWith.php index b3efd0c5e..2093dc618 100755 --- a/src/Grid/Filter/StartWith.php +++ b/src/Grid/Filter/StartWith.php @@ -11,8 +11,7 @@ class StartWith extends AbstractFilter /** * Get condition of this filter. * - * @param array $inputs - * + * @param array $inputs * @return array|mixed|void */ public function condition($inputs) diff --git a/src/Grid/Filter/Where.php b/src/Grid/Filter/Where.php index 7d732985d..ee55e020b 100755 --- a/src/Grid/Filter/Where.php +++ b/src/Grid/Filter/Where.php @@ -23,9 +23,9 @@ class Where extends AbstractFilter /** * Where constructor. * - * @param string $column - * @param \Closure $query - * @param string $label + * @param string $column + * @param \Closure $query + * @param string $label */ public function __construct($column, \Closure $query, $label = '') { @@ -37,8 +37,7 @@ public function __construct($column, \Closure $query, $label = '') /** * Get condition of this filter. * - * @param array $inputs - * + * @param array $inputs * @return array|mixed|void */ public function condition($inputs) diff --git a/src/Grid/Filter/WhereBetween.php b/src/Grid/Filter/WhereBetween.php index edcd423cc..0ceba18c3 100644 --- a/src/Grid/Filter/WhereBetween.php +++ b/src/Grid/Filter/WhereBetween.php @@ -28,9 +28,9 @@ class WhereBetween extends Between /** * Where constructor. * - * @param string $column - * @param \Closure $query - * @param string $label + * @param string $column + * @param \Closure $query + * @param string $label */ public function __construct($column, \Closure $query, $label = '') { @@ -42,8 +42,7 @@ public function __construct($column, \Closure $query, $label = '') /** * Get condition of this filter. * - * @param array $inputs - * + * @param array $inputs * @return array|mixed|void */ public function condition($inputs) diff --git a/src/Grid/FixColumns.php b/src/Grid/FixColumns.php index d427acf83..712166c4d 100644 --- a/src/Grid/FixColumns.php +++ b/src/Grid/FixColumns.php @@ -56,9 +56,9 @@ class FixColumns /** * FixColumns constructor. * - * @param Grid $grid - * @param int $head - * @param int $tail + * @param Grid $grid + * @param int $head + * @param int $tail */ public function __construct(Grid $grid, $head, $tail = -1) { @@ -105,8 +105,7 @@ public function rightComplexColumns() } /** - * @param int $height px - * + * @param int $height px * @return $this */ public function height(int $height) diff --git a/src/Grid/GridAction.php b/src/Grid/GridAction.php index 6d01cd49b..0d82f9d9f 100644 --- a/src/Grid/GridAction.php +++ b/src/Grid/GridAction.php @@ -16,8 +16,7 @@ abstract class GridAction extends Action protected $parent; /** - * @param Grid $grid - * + * @param Grid $grid * @return $this */ public function setGrid(Grid $grid) diff --git a/src/Grid/LazyRenderable.php b/src/Grid/LazyRenderable.php index 8e82caf65..60017ad3b 100644 --- a/src/Grid/LazyRenderable.php +++ b/src/Grid/LazyRenderable.php @@ -48,8 +48,7 @@ protected function addStyle() /** * 是否启用简化模式. * - * @param bool $value - * + * @param bool $value * @return $this */ public function simple(bool $value = true) @@ -58,8 +57,7 @@ public function simple(bool $value = true) } /** - * @param Grid $grid - * + * @param Grid $grid * @return Grid */ protected function prepare(Grid $grid) diff --git a/src/Grid/Model.php b/src/Grid/Model.php index dc5cd5989..d39584dca 100755 --- a/src/Grid/Model.php +++ b/src/Grid/Model.php @@ -129,8 +129,8 @@ class Model /** * Create a new grid model instance. * - * @param Repository|\Illuminate\Database\Eloquent\Model $repository - * @param Request $request + * @param Repository|\Illuminate\Database\Eloquent\Model $repository + * @param Request $request */ public function __construct(Request $request, $repository = null) { @@ -167,8 +167,7 @@ public function getQueries() } /** - * @param Collection $query - * + * @param Collection $query * @return void */ public function setQueries(Collection $query) @@ -189,8 +188,7 @@ public function paginator(): ?AbstractPaginator /** * 是否使用 simplePaginate方法进行分页. * - * @param bool $value - * + * @param bool $value * @return $this */ public function simple(bool $value = true) @@ -209,9 +207,8 @@ public function getPaginateMethod() } /** - * @param int $total - * @param Collection|array $data - * + * @param int $total + * @param Collection|array $data * @return LengthAwarePaginator|Paginator */ public function makePaginator($total, $data, string $url = null) @@ -245,7 +242,7 @@ public function getKeyName() /** * Enable or disable pagination. * - * @param bool $use + * @param bool $use * * @reutrn $this; */ @@ -275,7 +272,7 @@ public function getPerPageName() } /** - * @param int $perPage + * @param int $perPage */ public function setPerPage(int $perPage) { @@ -293,8 +290,7 @@ public function getPageName() } /** - * @param string $name - * + * @param string $name * @return $this */ public function setPageName($name) @@ -315,8 +311,7 @@ public function getSortName() } /** - * @param string $name - * + * @param string $name * @return $this */ public function setSortName($name) @@ -329,8 +324,7 @@ public function setSortName($name) /** * Set parent grid instance. * - * @param Grid $grid - * + * @param Grid $grid * @return $this */ public function setGrid(Grid $grid) @@ -371,8 +365,7 @@ public function getConstraints() } /** - * @param array $constraints - * + * @param array $constraints * @return $this */ public function setConstraints(array $constraints) @@ -397,8 +390,7 @@ public function buildData() } /** - * @param Collection|callable|array|AbstractPaginator $data - * + * @param Collection|callable|array|AbstractPaginator $data * @return $this */ public function setData($data) @@ -432,8 +424,7 @@ public function setData($data) /** * Add conditions to grid model. * - * @param array $conditions - * + * @param array $conditions * @return $this */ public function addConditions(array $conditions) @@ -446,9 +437,9 @@ public function addConditions(array $conditions) } /** - * @throws \Exception - * * @return Collection|array + * + * @throws \Exception */ protected function fetch() { @@ -476,8 +467,7 @@ protected function fetch() } /** - * @param AbstractPaginator $paginator - * + * @param AbstractPaginator $paginator * @return void */ protected function setPaginator(AbstractPaginator $paginator) @@ -496,8 +486,7 @@ protected function setPaginator(AbstractPaginator $paginator) } /** - * @param Collection $collection - * + * @param Collection $collection * @return Collection */ protected function stdObjToArray(Collection $collection) @@ -526,7 +515,7 @@ public function getCurrentPage() } /** - * @param int $currentPage + * @param int $currentPage */ public function setCurrentPage(int $currentPage) { @@ -553,7 +542,6 @@ public function getPerPage() * Find query by method name. * * @param $method - * * @return Collection */ public function findQueryByMethod($method) @@ -562,8 +550,7 @@ public function findQueryByMethod($method) } /** - * @param string|callable $method - * + * @param string|callable $method * @return $this */ public function filterQueryBy($method) @@ -605,8 +592,7 @@ public function getSort() } /** - * @param string|array $method - * + * @param string|array $method * @return void */ public function rejectQuery($method) @@ -631,9 +617,8 @@ public function resetOrderBy() } /** - * @param string $method - * @param array $arguments - * + * @param string $method + * @param array $arguments * @return $this */ public function __call($method, $arguments) @@ -642,9 +627,8 @@ public function __call($method, $arguments) } /** - * @param string $method - * @param array $arguments - * + * @param string $method + * @param array $arguments * @return $this */ public function addQuery(string $method, array $arguments = []) @@ -671,10 +655,9 @@ public function getSortDescMethods() } /** - * @param Builder $query - * @param bool $fetch - * @param string[] $columns - * + * @param Builder $query + * @param bool $fetch + * @param string[] $columns * @return Builder|Paginator|Collection */ public function apply($query, bool $fetch = false, $columns = null) @@ -701,8 +684,7 @@ public function apply($query, bool $fetch = false, $columns = null) /** * Set the relationships that should be eager loaded. * - * @param mixed $relations - * + * @param mixed $relations * @return $this|Model */ public function with($relations) diff --git a/src/Grid/Row.php b/src/Grid/Row.php index 8690a8471..8030e3d4f 100755 --- a/src/Grid/Row.php +++ b/src/Grid/Row.php @@ -63,8 +63,7 @@ public function rowAttributes() /** * Get column attributes. * - * @param string $column - * + * @param string $column * @return string */ public function columnAttributes($column) @@ -82,8 +81,7 @@ public function columnAttributes($column) /** * Format attributes to html. * - * @param array $attributes - * + * @param array $attributes * @return string */ private function formatHtmlAttributes($attributes = []) @@ -94,7 +92,7 @@ private function formatHtmlAttributes($attributes = []) /** * Set attributes. * - * @param array $attributes + * @param array $attributes */ public function setAttributes(array $attributes) { @@ -106,7 +104,7 @@ public function setAttributes(array $attributes) /** * Set style of the row. * - * @param array|string $style + * @param array|string $style */ public function style($style) { @@ -134,8 +132,7 @@ public function model() /** * Getter. * - * @param mixed $attr - * + * @param mixed $attr * @return mixed */ public function __get($attr) @@ -146,9 +143,8 @@ public function __get($attr) /** * Setter. * - * @param mixed $attr - * @param mixed $value - * + * @param mixed $attr + * @param mixed $value * @return void */ public function __set($attr, $value) @@ -159,9 +155,8 @@ public function __set($attr, $value) /** * Get or set value of column in this row. * - * @param string $name - * @param mixed $value - * + * @param string $name + * @param mixed $value * @return $this|mixed */ public function column($name, $value = null) @@ -192,8 +187,7 @@ public function toArray() /** * Output column value. * - * @param mixed $value - * + * @param mixed $value * @return mixed|string */ protected function output($value) diff --git a/src/Grid/RowAction.php b/src/Grid/RowAction.php index 02d1c81df..60e91f4c9 100644 --- a/src/Grid/RowAction.php +++ b/src/Grid/RowAction.php @@ -33,8 +33,7 @@ public function getKey() /** * Set row model. * - * @param mixed $key - * + * @param mixed $key * @return \Illuminate\Database\Eloquent\Model|mixed */ public function row($key = null) @@ -49,8 +48,7 @@ public function row($key = null) /** * Set row model. * - * @param Fluent|\Illuminate\Database\Eloquent\Model $row - * + * @param Fluent|\Illuminate\Database\Eloquent\Model $row * @return $this */ public function setRow($row) @@ -66,8 +64,7 @@ public function getRow() } /** - * @param Column $column - * + * @param Column $column * @return $this */ public function setColumn(Column $column) diff --git a/src/Grid/Tools.php b/src/Grid/Tools.php index 7ab735c9f..e53f0cc0d 100755 --- a/src/Grid/Tools.php +++ b/src/Grid/Tools.php @@ -41,7 +41,7 @@ class Tools implements Renderable /** * Create a new Tools instance. * - * @param Grid $grid + * @param Grid $grid */ public function __construct(Grid $grid) { @@ -72,8 +72,7 @@ protected function makeBatchActions() /** * Append tools. * - * @param AbstractTool|string|\Closure|Renderable|Htmlable $tool - * + * @param AbstractTool|string|\Closure|Renderable|Htmlable $tool * @return $this */ public function append($tool) @@ -88,8 +87,7 @@ public function append($tool) /** * Prepend a tool. * - * @param AbstractTool|string|\Closure|Renderable|Htmlable $tool - * + * @param AbstractTool|string|\Closure|Renderable|Htmlable $tool * @return $this */ public function prepend($tool) @@ -102,8 +100,7 @@ public function prepend($tool) } /** - * @param mixed $tool - * + * @param mixed $tool * @return void */ protected function prepareAction($tool) @@ -138,8 +135,7 @@ public function disableFilterButton(bool $disable = true) } /** - * @param bool $value - * + * @param bool $value * @return $this */ public function withOutline(bool $value) @@ -182,7 +178,7 @@ public function disableBatchActions(bool $disable = true) } /** - * @param \Closure|BatchAction|BatchAction[] $value + * @param \Closure|BatchAction|BatchAction[] $value */ public function batch($value) { @@ -225,8 +221,7 @@ public function render() } /** - * @param string $value - * + * @param string $value * @return string */ public function format(string $value) @@ -235,8 +230,7 @@ public function format(string $value) } /** - * @param string $value - * + * @param string $value * @return string */ protected function addButtonOutline($value) diff --git a/src/Grid/Tools/BatchActions.php b/src/Grid/Tools/BatchActions.php index a39553371..f1ed0fd26 100755 --- a/src/Grid/Tools/BatchActions.php +++ b/src/Grid/Tools/BatchActions.php @@ -91,9 +91,8 @@ public function disableDeleteAndHideSelectAll() /** * Add a batch action. * - * @param BatchAction $action - * @param ?string $key - * + * @param BatchAction $action + * @param ?string $key * @return $this */ public function add(BatchAction $action, ?string $key = null) diff --git a/src/Grid/Tools/ColumnSelector.php b/src/Grid/Tools/ColumnSelector.php index d1dca0572..18f39cbc2 100644 --- a/src/Grid/Tools/ColumnSelector.php +++ b/src/Grid/Tools/ColumnSelector.php @@ -27,7 +27,7 @@ class ColumnSelector extends AbstractTool /** * Create a new Export button instance. * - * @param Grid $grid + * @param Grid $grid */ public function __construct(Grid $grid) { @@ -106,8 +106,7 @@ protected function getGridColumns() /** * Is column ignored in column selector. * - * @param string $name - * + * @param string $name * @return bool */ protected function isColumnIgnored($name) @@ -118,8 +117,7 @@ protected function isColumnIgnored($name) /** * Ignore a column to display in column selector. * - * @param string|array $name - * + * @param string|array $name * @return $this */ public function ignore($name) diff --git a/src/Grid/Tools/ExportButton.php b/src/Grid/Tools/ExportButton.php index fde2f1a28..299b557a8 100755 --- a/src/Grid/Tools/ExportButton.php +++ b/src/Grid/Tools/ExportButton.php @@ -16,7 +16,7 @@ class ExportButton implements Renderable /** * Create a new Export button instance. * - * @param Grid $grid + * @param Grid $grid */ public function __construct(Grid $grid) { diff --git a/src/Grid/Tools/Paginator.php b/src/Grid/Tools/Paginator.php index 515be995d..caeb77b5f 100755 --- a/src/Grid/Tools/Paginator.php +++ b/src/Grid/Tools/Paginator.php @@ -22,7 +22,7 @@ class Paginator implements Renderable /** * Create a new Paginator instance. * - * @param Grid $grid + * @param Grid $grid */ public function __construct(Grid $grid) { diff --git a/src/Grid/Tools/PerPageSelector.php b/src/Grid/Tools/PerPageSelector.php index d20ae9894..e03f7365d 100755 --- a/src/Grid/Tools/PerPageSelector.php +++ b/src/Grid/Tools/PerPageSelector.php @@ -27,7 +27,7 @@ class PerPageSelector implements Renderable /** * Create a new PerPageSelector instance. * - * @param Grid $grid + * @param Grid $grid */ public function __construct(Grid $grid) { diff --git a/src/Grid/Tools/QuickCreate.php b/src/Grid/Tools/QuickCreate.php index 1d09cfc4b..240896f53 100644 --- a/src/Grid/Tools/QuickCreate.php +++ b/src/Grid/Tools/QuickCreate.php @@ -39,7 +39,7 @@ class QuickCreate implements Renderable /** * QuickCreate constructor. * - * @param Grid $grid + * @param Grid $grid */ public function __construct(Grid $grid) { @@ -54,9 +54,8 @@ protected function formatPlaceholder($placeholder) } /** - * @param string $column - * @param string $placeholder - * + * @param string $column + * @param string $placeholder * @return Text */ public function text($column, $placeholder = '') @@ -69,8 +68,7 @@ public function text($column, $placeholder = '') } /** - * @param string $column - * + * @param string $column * @return Text */ public function hidden($column) @@ -80,9 +78,8 @@ public function hidden($column) } /** - * @param string $column - * @param string $placeholder - * + * @param string $column + * @param string $placeholder * @return Text */ public function email($column, $placeholder = '') @@ -92,9 +89,8 @@ public function email($column, $placeholder = '') } /** - * @param string $column - * @param string $placeholder - * + * @param string $column + * @param string $placeholder * @return Text */ public function ip($column, $placeholder = '') @@ -105,9 +101,8 @@ public function ip($column, $placeholder = '') } /** - * @param string $column - * @param string $placeholder - * + * @param string $column + * @param string $placeholder * @return Text */ public function url($column, $placeholder = '') @@ -117,9 +112,8 @@ public function url($column, $placeholder = '') } /** - * @param string $column - * @param string $placeholder - * + * @param string $column + * @param string $placeholder * @return Text */ public function password($column, $placeholder = '') @@ -130,9 +124,8 @@ public function password($column, $placeholder = '') } /** - * @param string $column - * @param string $placeholder - * + * @param string $column + * @param string $placeholder * @return Text */ public function mobile($column, $placeholder = '') @@ -143,9 +136,8 @@ public function mobile($column, $placeholder = '') } /** - * @param string $column - * @param string $placeholder - * + * @param string $column + * @param string $placeholder * @return Text */ public function integer($column, $placeholder = '') @@ -156,9 +148,8 @@ public function integer($column, $placeholder = '') } /** - * @param string $column - * @param string $placeholder - * + * @param string $column + * @param string $placeholder * @return Select */ public function select($column, $placeholder = '') @@ -171,9 +162,8 @@ public function select($column, $placeholder = '') } /** - * @param string $column - * @param string $placeholder - * + * @param string $column + * @param string $placeholder * @return Field\Tags */ public function tags($column, $placeholder = '') @@ -186,9 +176,8 @@ public function tags($column, $placeholder = '') } /** - * @param string $column - * @param string $placeholder - * + * @param string $column + * @param string $placeholder * @return MultipleSelect */ public function multipleSelect($column, $placeholder = '') @@ -201,9 +190,8 @@ public function multipleSelect($column, $placeholder = '') } /** - * @param string $column - * @param string $placeholder - * + * @param string $column + * @param string $placeholder * @return Field\Date */ public function datetime($column, $placeholder = '') @@ -212,9 +200,8 @@ public function datetime($column, $placeholder = '') } /** - * @param string $column - * @param string $placeholder - * + * @param string $column + * @param string $placeholder * @return Field\Date */ public function time($column, $placeholder = '') @@ -223,9 +210,8 @@ public function time($column, $placeholder = '') } /** - * @param string $column - * @param string $placeholder - * + * @param string $column + * @param string $placeholder * @return Field\Date */ public function date($column, $placeholder = '') @@ -238,8 +224,7 @@ public function date($column, $placeholder = '') } /** - * @param Field $field - * + * @param Field $field * @return Field */ protected function addField(Field $field) @@ -258,8 +243,7 @@ protected function addField(Field $field) } /** - * @param string $class - * + * @param string $class * @return string */ protected function resolveView($class) @@ -272,8 +256,7 @@ protected function resolveView($class) } /** - * @param string $action - * + * @param string $action * @return $this */ public function action(?string $action) @@ -284,8 +267,7 @@ public function action(?string $action) } /** - * @param string $method - * + * @param string $method * @return $this */ public function method(?string $method = 'POST') @@ -301,8 +283,7 @@ public function getElementClass() } /** - * @param int $columnCount - * + * @param int $columnCount * @return array|string */ public function render($columnCount = 0) diff --git a/src/Grid/Tools/QuickSearch.php b/src/Grid/Tools/QuickSearch.php index aeeeabb12..cdf6aef51 100755 --- a/src/Grid/Tools/QuickSearch.php +++ b/src/Grid/Tools/QuickSearch.php @@ -44,8 +44,7 @@ public function getQueryName() } /** - * @param int $width - * + * @param int $width * @return $this */ public function width(int $width) @@ -58,8 +57,7 @@ public function width(int $width) /** * Set placeholder. * - * @param string $text - * + * @param string $text * @return $this */ public function placeholder(?string $text = '') @@ -90,8 +88,7 @@ public function formAction() } /** - * @param bool $value - * + * @param bool $value * @return $this */ public function auto(bool $value = true) diff --git a/src/Grid/Tools/Selector.php b/src/Grid/Tools/Selector.php index 61aff715f..c5d2411c0 100644 --- a/src/Grid/Tools/Selector.php +++ b/src/Grid/Tools/Selector.php @@ -46,11 +46,10 @@ public function __construct(Grid $grid) } /** - * @param string $column - * @param string|array $label - * @param array|\Closure $options - * @param null|\Closure $query - * + * @param string $column + * @param string|array $label + * @param array|\Closure $options + * @param null|\Closure $query * @return $this */ public function select(string $column, $label, $options = [], ?\Closure $query = null) @@ -59,11 +58,10 @@ public function select(string $column, $label, $options = [], ?\Closure $query = } /** - * @param string $column - * @param string|array $label - * @param array $options - * @param null|\Closure $query - * + * @param string $column + * @param string|array $label + * @param array $options + * @param null|\Closure $query * @return $this */ public function selectOne(string $column, $label, $options = [], ?\Closure $query = null) @@ -72,12 +70,11 @@ public function selectOne(string $column, $label, $options = [], ?\Closure $quer } /** - * @param string $column - * @param string $label - * @param array $options - * @param null $query - * @param string $type - * + * @param string $column + * @param string $label + * @param array $options + * @param null $query + * @param string $type * @return $this */ protected function addSelector(string $column, $label, $options = [], ?\Closure $query = null, $type = 'many') @@ -112,8 +109,7 @@ public function getQueryName() /** * Get all selectors. * - * @param bool $formatKey - * + * @param bool $formatKey * @return array|Collection */ public function all(bool $formatKey = false) @@ -162,10 +158,9 @@ public function formatKey($column) } /** - * @param string $column - * @param mixed $value - * @param bool $add - * + * @param string $column + * @param mixed $value + * @param bool $add * @return string */ public function url($column, $value = null, $add = false) diff --git a/src/Http/Auth/Permission.php b/src/Http/Auth/Permission.php index 81cae9d31..1e37c2f8d 100644 --- a/src/Http/Auth/Permission.php +++ b/src/Http/Auth/Permission.php @@ -15,8 +15,7 @@ class Permission /** * Check permission. * - * @param string|array|Arrayable $permission - * + * @param string|array|Arrayable $permission * @return true|void */ public static function check($permission) @@ -41,8 +40,7 @@ public static function check($permission) /** * Roles allowed to access. * - * @param string|array|Arrayable $roles - * + * @param string|array|Arrayable $roles * @return true|void */ public static function allow($roles) @@ -69,8 +67,7 @@ public static function free() /** * Roles denied to access. * - * @param string|array|Arrayable $roles - * + * @param string|array|Arrayable $roles * @return true|void */ public static function deny($roles) @@ -117,8 +114,7 @@ public static function isAdministrator() } /** - * @param \Closure $callback - * + * @param \Closure $callback * @return void */ public static function registerErrorHandler(\Closure $callback) diff --git a/src/Http/Controllers/AdminController.php b/src/Http/Controllers/AdminController.php index 2579434e2..5a4989861 100644 --- a/src/Http/Controllers/AdminController.php +++ b/src/Http/Controllers/AdminController.php @@ -66,8 +66,7 @@ protected function translation() /** * Index interface. * - * @param Content $content - * + * @param Content $content * @return Content */ public function index(Content $content) @@ -82,9 +81,8 @@ public function index(Content $content) /** * Show interface. * - * @param mixed $id - * @param Content $content - * + * @param mixed $id + * @param Content $content * @return Content */ public function show($id, Content $content) @@ -99,9 +97,8 @@ public function show($id, Content $content) /** * Edit interface. * - * @param mixed $id - * @param Content $content - * + * @param mixed $id + * @param Content $content * @return Content */ public function edit($id, Content $content) @@ -116,8 +113,7 @@ public function edit($id, Content $content) /** * Create interface. * - * @param Content $content - * + * @param Content $content * @return Content */ public function create(Content $content) @@ -132,8 +128,7 @@ public function create(Content $content) /** * Update the specified resource in storage. * - * @param int $id - * + * @param int $id * @return \Illuminate\Http\Response */ public function update($id) @@ -154,8 +149,7 @@ public function store() /** * Remove the specified resource from storage. * - * @param int $id - * + * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) diff --git a/src/Http/Controllers/AuthController.php b/src/Http/Controllers/AuthController.php index c7e14d08c..dd47ef216 100644 --- a/src/Http/Controllers/AuthController.php +++ b/src/Http/Controllers/AuthController.php @@ -45,8 +45,7 @@ public function getLogin(Content $content) /** * Handle a login request. * - * @param Request $request - * + * @param Request $request * @return mixed */ public function postLogin(Request $request) @@ -95,8 +94,7 @@ public function getLogout(Request $request) /** * User setting page. * - * @param Content $content - * + * @param Content $content * @return Content */ public function getSetting(Content $content) @@ -233,8 +231,7 @@ protected function getRedirectPath() /** * Send the response after the user was authenticated. * - * @param \Illuminate\Http\Request $request - * + * @param \Illuminate\Http\Request $request * @return \Symfony\Component\HttpFoundation\Response */ protected function sendLoginResponse(Request $request) diff --git a/src/Http/Controllers/HandleActionController.php b/src/Http/Controllers/HandleActionController.php index 31e4ca3f0..9adab31ad 100644 --- a/src/Http/Controllers/HandleActionController.php +++ b/src/Http/Controllers/HandleActionController.php @@ -10,8 +10,7 @@ class HandleActionController { /** - * @param Request $request - * + * @param Request $request * @return $this|\Illuminate\Http\JsonResponse */ public function handle(Request $request) @@ -30,11 +29,10 @@ public function handle(Request $request) } /** - * @param Request $request + * @param Request $request + * @return Action * * @throws AdminException - * - * @return Action */ protected function resolveActionInstance(Request $request): Action { diff --git a/src/Http/Controllers/HandleFormController.php b/src/Http/Controllers/HandleFormController.php index 2e02e64c2..5afc80b9e 100644 --- a/src/Http/Controllers/HandleFormController.php +++ b/src/Http/Controllers/HandleFormController.php @@ -3,7 +3,6 @@ namespace Dcat\Admin\Http\Controllers; use Dcat\Admin\Exception\AdminException; -use Dcat\Admin\Form\Field\Embeds; use Dcat\Admin\Form\Field\File; use Dcat\Admin\Form\Field\HasMany; use Dcat\Admin\Http\JsonResponse; @@ -44,9 +43,8 @@ public function uploadFile(Request $request) } /** - * @param Request $request + * @param Request $request * @param $form - * * @return File */ protected function getField(Request $request, $form) @@ -84,11 +82,10 @@ public function destroyFile(Request $request) } /** - * @param Request $request + * @param Request $request + * @return Form * * @throws AdminException - * - * @return Form */ protected function resolveForm(Request $request) { diff --git a/src/Http/Controllers/HasResourceActions.php b/src/Http/Controllers/HasResourceActions.php index 83be972e0..e0112e28b 100644 --- a/src/Http/Controllers/HasResourceActions.php +++ b/src/Http/Controllers/HasResourceActions.php @@ -7,8 +7,7 @@ trait HasResourceActions /** * Update the specified resource in storage. * - * @param int $id - * + * @param int $id * @return \Illuminate\Http\Response */ public function update($id) @@ -29,8 +28,7 @@ public function store() /** * Remove the specified resource from storage. * - * @param int $id - * + * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) diff --git a/src/Http/Controllers/ValueController.php b/src/Http/Controllers/ValueController.php index 70768f3d8..63b940a99 100644 --- a/src/Http/Controllers/ValueController.php +++ b/src/Http/Controllers/ValueController.php @@ -8,8 +8,7 @@ class ValueController { /** - * @param Request $request - * + * @param Request $request * @return mixed */ public function handle(Request $request) @@ -32,11 +31,10 @@ public function handle(Request $request) } /** - * @param Request $request + * @param Request $request + * @return \Dcat\Admin\Traits\InteractsWithApi * * @throws Exception - * - * @return \Dcat\Admin\Traits\InteractsWithApi */ protected function resolve(Request $request) { diff --git a/src/Http/JsonResponse.php b/src/Http/JsonResponse.php index 71fe89fa6..05a4e0769 100644 --- a/src/Http/JsonResponse.php +++ b/src/Http/JsonResponse.php @@ -48,8 +48,7 @@ public function __construct(array $data = []) /** * 设置请求结果是否成功. * - * @param bool $status - * + * @param bool $status * @return $this */ public function status(bool $status) @@ -62,8 +61,7 @@ public function status(bool $status) /** * 设置 HTTP 状态码. * - * @param int $statusCode - * + * @param int $statusCode * @return $this */ public function statusCode(int $statusCode) @@ -76,8 +74,7 @@ public function statusCode(int $statusCode) /** * 设置提示信息. * - * @param string $message - * + * @param string $message * @return $this */ public function message(?string $message) @@ -90,8 +87,7 @@ public function message(?string $message) /** * 显示 成功 提示弹窗. * - * @param string $message - * + * @param string $message * @return $this */ public function success(?string $message) @@ -102,8 +98,7 @@ public function success(?string $message) } /** - * @param string $message - * + * @param string $message * @return $this */ public function info(?string $message) @@ -112,8 +107,7 @@ public function info(?string $message) } /** - * @param string $message - * + * @param string $message * @return $this */ public function warning(?string $message) @@ -124,9 +118,8 @@ public function warning(?string $message) /** * 显示 错误 信息弹窗. * - * @param string $message - * @param bool $alert - * + * @param string $message + * @param bool $alert * @return $this */ public function error(?string $message) @@ -140,7 +133,6 @@ public function error(?string $message) * 设置 toastr 显示时长. * * @param $seconds - * * @return $this */ public function timeout($seconds) @@ -151,8 +143,7 @@ public function timeout($seconds) /** * 显示确认弹窗. * - * @param bool $alert - * + * @param bool $alert * @return $this */ public function alert(bool $alert = true) @@ -163,8 +154,7 @@ public function alert(bool $alert = true) /** * 显示弹窗描述信息. * - * @param string $detail - * + * @param string $detail * @return $this */ public function detail(?string $detail) @@ -175,9 +165,8 @@ public function detail(?string $detail) /** * 显示弹窗信息. * - * @param string $type - * @param string $message - * + * @param string $type + * @param string $message * @return $this */ protected function show(?string $type, ?string $message = null) @@ -192,8 +181,7 @@ protected function show(?string $type, ?string $message = null) /** * 跳转. * - * @param string $url - * + * @param string $url * @return $this */ public function redirect(?string $url) @@ -202,8 +190,7 @@ public function redirect(?string $url) } /** - * @param string|null $url - * + * @param string|null $url * @return $this */ public function redirectToIntended(?string $url) @@ -216,8 +203,7 @@ public function redirectToIntended(?string $url) /** * Location 跳转. * - * @param string $location 不传则刷新当前页面 - * + * @param string $location 不传则刷新当前页面 * @return $this */ public function location(?string $location = null) @@ -226,8 +212,7 @@ public function location(?string $location = null) } /** - * @param string|null $url - * + * @param string|null $url * @return $this */ public function locationToIntended(?string $url) @@ -240,8 +225,7 @@ public function locationToIntended(?string $url) /** * 下载. * - * @param string $url - * + * @param string $url * @return $this */ public function download($url) @@ -262,8 +246,7 @@ public function refresh() /** * 执行JS代码. * - * @param string $script - * + * @param string $script * @return $this */ public function script($script) @@ -272,8 +255,7 @@ public function script($script) } /** - * @param array $value - * + * @param array $value * @return $this */ protected function then(array $value) @@ -286,8 +268,7 @@ protected function then(array $value) /** * 设置返回数据. * - * @param array $value - * + * @param array $value * @return $this */ public function data(array $value) @@ -300,8 +281,7 @@ public function data(array $value) /** * 返回 HTML. * - * @param string $html - * + * @param string $html * @return $this */ public function html($html) @@ -314,8 +294,7 @@ public function html($html) /** * 设置其他字段. * - * @param array $options - * + * @param array $options * @return $this */ public function options(array $options) @@ -329,7 +308,6 @@ public function options(array $options) * 设置字段验证错误信息. * * @param $errors - * * @return $this */ public function withValidation($errors) @@ -351,8 +329,7 @@ public function withValidation($errors) /** * 响应异常. * - * @param \Throwable $exception - * + * @param \Throwable $exception * @return $this */ public function withException(\Throwable $exception) @@ -424,8 +401,7 @@ public function __call($method, $arguments) } /** - * @param mixed ...$params - * + * @param mixed ...$params * @return $this */ public static function make(...$params) diff --git a/src/Http/Middleware/Authenticate.php b/src/Http/Middleware/Authenticate.php index 67c0be119..98a5235ea 100644 --- a/src/Http/Middleware/Authenticate.php +++ b/src/Http/Middleware/Authenticate.php @@ -12,9 +12,8 @@ class Authenticate /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure $next - * + * @param \Illuminate\Http\Request $request + * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) @@ -43,8 +42,7 @@ public function handle($request, Closure $next) /** * Determine if the request has a URI that should pass through verification. * - * @param \Illuminate\Http\Request $request - * + * @param \Illuminate\Http\Request $request * @return bool */ public static function shouldPassThrough($request) diff --git a/src/Http/Middleware/Bootstrap.php b/src/Http/Middleware/Bootstrap.php index 27d8d3eae..3952cd2d9 100644 --- a/src/Http/Middleware/Bootstrap.php +++ b/src/Http/Middleware/Bootstrap.php @@ -56,7 +56,6 @@ protected function fireEvents() /** * @param \Illuminate\Http\Request - * * @return void */ protected function storeCurrentUrl(Request $request) @@ -76,8 +75,7 @@ protected function storeCurrentUrl(Request $request) } /** - * @param \Illuminate\Http\Request $request - * + * @param \Illuminate\Http\Request $request * @return bool */ public function prefetch($request) diff --git a/src/Http/Middleware/Permission.php b/src/Http/Middleware/Permission.php index adaf0de78..413d44bc5 100644 --- a/src/Http/Middleware/Permission.php +++ b/src/Http/Middleware/Permission.php @@ -19,10 +19,9 @@ class Permission /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure $next - * @param array $args - * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @param array $args * @return mixed */ public function handle(Request $request, \Closure $next, ...$args) @@ -53,8 +52,7 @@ public function handle(Request $request, \Closure $next, ...$args) * If the route of current request contains a middleware prefixed with 'admin.permission:', * then it has a manually set permission middleware, we need to handle it first. * - * @param Request $request - * + * @param Request $request * @return bool */ public function checkRoutePermission(Request $request) @@ -79,8 +77,7 @@ public function checkRoutePermission(Request $request) } /** - * @param \Illuminate\Http\Request $request - * + * @param \Illuminate\Http\Request $request * @return bool */ protected function isApiRoute($request) @@ -91,8 +88,7 @@ protected function isApiRoute($request) /** * Determine if the request has a URI that should pass through verification. * - * @param \Illuminate\Http\Request $request - * + * @param \Illuminate\Http\Request $request * @return bool */ public function shouldPassThrough($request) diff --git a/src/Http/Middleware/Pjax.php b/src/Http/Middleware/Pjax.php index 64b675bf8..c6d89df6c 100644 --- a/src/Http/Middleware/Pjax.php +++ b/src/Http/Middleware/Pjax.php @@ -13,9 +13,8 @@ class Pjax /** * Handle an incoming request. * - * @param Request $request - * @param Closure $next - * + * @param Request $request + * @param Closure $next * @return Response */ public function handle($request, Closure $next) @@ -41,8 +40,7 @@ public function handle($request, Closure $next) /** * Handle Response with exceptions. * - * @param Response $response - * + * @param Response $response * @return \Illuminate\Http\RedirectResponse */ protected function handleErrorResponse(Response $response) @@ -66,8 +64,8 @@ protected function handleErrorResponse(Response $response) /** * Set the PJAX-URL header to the current uri. * - * @param Response $response - * @param Request $request + * @param Response $response + * @param Request $request */ protected function setUriHeader(Response $response, Request $request) { diff --git a/src/Http/Repositories/Extension.php b/src/Http/Repositories/Extension.php index 38a6a163f..8a323f265 100644 --- a/src/Http/Repositories/Extension.php +++ b/src/Http/Repositories/Extension.php @@ -22,8 +22,7 @@ public function get(Grid\Model $model) } /** - * @param AbstractExtension $extension - * + * @param AbstractExtension $extension * @return array */ protected function each(AbstractExtension $extension) @@ -63,8 +62,7 @@ public function update(Form $form) /** * Get data before update. * - * @param Form $form - * + * @param Form $form * @return array */ public function updating(Form $form): array diff --git a/src/Layout/Asset.php b/src/Layout/Asset.php index ef962119d..1421055df 100644 --- a/src/Layout/Asset.php +++ b/src/Layout/Asset.php @@ -286,9 +286,8 @@ protected function setUpTheme() /** * 设置或获取别名. * - * @param string|array $name - * @param string|array $value - * + * @param string|array $name + * @param string|array $value * @return void|array */ public function alias($name, $value = null) @@ -315,9 +314,8 @@ public function alias($name, $value = null) /** * 获取别名. * - * @param string $name - * @param array $params - * + * @param string $name + * @param array $params * @return array|string */ public function getAlias($name, array $params = []) @@ -344,9 +342,8 @@ public function getAlias($name, array $params = []) } /** - * @param array $files - * @param array $params - * + * @param array $files + * @param array $params * @return array */ protected function normalizeAliasPaths($files, array $params) @@ -369,8 +366,7 @@ protected function normalizeAliasPaths($files, array $params) /** * 解析参数. * - * @param string $name - * + * @param string $name * @return array */ protected function parseParams($name) @@ -389,9 +385,8 @@ protected function parseParams($name) /** * 根据别名设置需要载入的js和css脚本. * - * @param string|array $alias - * @param array $params - * + * @param string|array $alias + * @param array $params * @return void */ public function require($alias, array $params = []) @@ -413,7 +408,7 @@ public function require($alias, array $params = []) /** * 设置需要载入的css脚本. * - * @param string|array $css + * @param string|array $css */ public function css($css) { @@ -429,7 +424,7 @@ public function css($css) /** * 设置需要载入的基础css脚本. * - * @param array $css + * @param array $css */ public function baseCss(array $css, bool $merge = false) { @@ -443,7 +438,7 @@ public function baseCss(array $css, bool $merge = false) /** * 设置需要载入的js脚本. * - * @param string|array $js + * @param string|array $js */ public function js($js) { @@ -459,9 +454,8 @@ public function js($js) /** * 根据别名获取资源路径. * - * @param string $path - * @param string $type - * + * @param string $path + * @param string $type * @return string|array|null */ public function get($path, string $type = 'js') @@ -486,8 +480,7 @@ public function get($path, string $type = 'js') /** * 获取静态资源完整URL. * - * @param string $path - * + * @param string $path * @return string */ public function url($path) @@ -508,8 +501,7 @@ public function url($path) /** * 获取真实路径. * - * @param string|null $path - * + * @param string|null $path * @return string|null */ public function getRealPath(?string $path) @@ -536,8 +528,7 @@ function ($v) { /** * 判断是否是路径别名. * - * @param mixed $value - * + * @param mixed $value * @return bool */ public function isPathAlias($value) @@ -549,7 +540,6 @@ public function isPathAlias($value) * 判断别名是否存在. * * @param $value - * * @return bool */ public function hasAlias($value) @@ -560,8 +550,7 @@ public function hasAlias($value) /** * 判断是否含有别名. * - * @param string $value - * + * @param string $value * @return bool */ protected function containsAlias($value) @@ -572,7 +561,7 @@ protected function containsAlias($value) /** * 设置在head标签内加载的js. * - * @param string|array $js + * @param string|array $js */ public function headerJs($js, bool $merge = true) { @@ -586,8 +575,8 @@ public function headerJs($js, bool $merge = true) /** * 设置基础js脚本. * - * @param array $js - * @param bool $merge + * @param array $js + * @param bool $merge */ public function baseJs(array $js, bool $merge = true) { @@ -601,8 +590,8 @@ public function baseJs(array $js, bool $merge = true) /** * 设置js代码. * - * @param string|array $script - * @param bool $direct + * @param string|array $script + * @param bool $direct */ public function script($script, bool $direct = false) { @@ -619,7 +608,7 @@ public function script($script, bool $direct = false) /** * 设置css代码. * - * @param string $style + * @param string $style */ public function style($style) { @@ -684,8 +673,7 @@ public function cssToHtml() } /** - * @param string $url - * + * @param string $url * @return string */ public function withVersionQuery($url) diff --git a/src/Layout/Column.php b/src/Layout/Column.php index ab91b6ba4..8630057d7 100755 --- a/src/Layout/Column.php +++ b/src/Layout/Column.php @@ -25,7 +25,7 @@ class Column implements Renderable * Column constructor. * * @param $content - * @param int $width + * @param int $width */ public function __construct($content, $width = 12) { @@ -59,7 +59,6 @@ protected function normalizeWidth($width) * Append content to column. * * @param $content - * * @return $this */ public function append($content) @@ -73,7 +72,6 @@ public function append($content) * Add a row for column. * * @param $content - * * @return Column */ public function row($content) diff --git a/src/Layout/Content.php b/src/Layout/Content.php index 1fb054522..003e27865 100755 --- a/src/Layout/Content.php +++ b/src/Layout/Content.php @@ -58,7 +58,7 @@ class Content implements Renderable /** * Content constructor. * - * @param Closure|null $callback + * @param Closure|null $callback */ public function __construct(\Closure $callback = null) { @@ -72,8 +72,7 @@ public function __construct(\Closure $callback = null) /** * Create a content instance. * - * @param mixed ...$params - * + * @param mixed ...$params * @return $this */ public static function make(...$params) @@ -82,8 +81,7 @@ public static function make(...$params) } /** - * @param string $header - * + * @param string $header * @return $this */ public function header($header = '') @@ -94,8 +92,7 @@ public function header($header = '') /** * Set title of content. * - * @param string $title - * + * @param string $title * @return $this */ public function title($title) @@ -108,8 +105,7 @@ public function title($title) /** * Set description of content. * - * @param string $description - * + * @param string $description * @return $this */ public function description($description = '') @@ -122,8 +118,7 @@ public function description($description = '') /** * 设置翻译文件路径. * - * @param string|null $translation - * + * @param string|null $translation * @return $this */ public function translation(?string $translation) @@ -152,8 +147,7 @@ public function full() * ['text' => 'Menu', 'url' => 'auth/menu', 'icon' => 'fa fa-align-justify'] * ]); * - * @param array ...$breadcrumb - * + * @param array ...$breadcrumb * @return $this */ public function breadcrumb(...$breadcrumb) @@ -166,11 +160,10 @@ public function breadcrumb(...$breadcrumb) } /** - * @param array $breadcrumb + * @param array $breadcrumb + * @return void * * @throws \Exception - * - * @return void */ protected function formatBreadcrumb(array &$breadcrumb) { @@ -205,8 +198,7 @@ protected function formatBreadcrumb(array &$breadcrumb) /** * Alias of method row. * - * @param mixed $content - * + * @param mixed $content * @return Content */ public function body($content) @@ -218,7 +210,6 @@ public function body($content) * Add one row for content body. * * @param $content - * * @return $this */ public function row($content) @@ -236,7 +227,6 @@ public function row($content) /** * @param $content - * * @return $this */ public function prepend($content) @@ -260,7 +250,7 @@ protected function prependRow(Row $row) /** * Add Row. * - * @param Row $row + * @param Row $row */ protected function addRow(Row $row) { @@ -288,8 +278,7 @@ public function build() } /** - * @param \Throwable $e - * + * @param \Throwable $e * @return mixed|string */ protected function handleException(\Throwable $e) @@ -308,9 +297,8 @@ protected function handleException(\Throwable $e) /** * Set success message for content. * - * @param string $title - * @param string $message - * + * @param string $title + * @param string $message * @return $this */ public function withSuccess($title = '', $message = '') @@ -323,9 +311,8 @@ public function withSuccess($title = '', $message = '') /** * Set error message for content. * - * @param string $title - * @param string $message - * + * @param string $title + * @param string $message * @return $this */ public function withError($title = '', $message = '') @@ -338,9 +325,8 @@ public function withError($title = '', $message = '') /** * Set warning message for content. * - * @param string $title - * @param string $message - * + * @param string $title + * @param string $message * @return $this */ public function withWarning($title = '', $message = '') @@ -353,9 +339,8 @@ public function withWarning($title = '', $message = '') /** * Set info message for content. * - * @param string $title - * @param string $message - * + * @param string $title + * @param string $message * @return $this */ public function withInfo($title = '', $message = '') @@ -368,8 +353,7 @@ public function withInfo($title = '', $message = '') /** * Set content view. * - * @param null|string $view - * + * @param null|string $view * @return $this */ public function view(?string $view) @@ -380,9 +364,8 @@ public function view(?string $view) } /** - * @param string|array $key - * @param mixed $value - * + * @param string|array $key + * @param mixed $value * @return $this */ public function with($key, $value = null) @@ -397,9 +380,8 @@ public function with($key, $value = null) } /** - * @param string|array $key - * @param mixed $value - * + * @param string|array $key + * @param mixed $value * @return $this */ public function withConfig($key, $value = null) @@ -545,8 +527,8 @@ public function render() /** * Register a composed event. * - * @param callable $callback - * @param bool $once + * @param callable $callback + * @param bool $once */ public static function composed(callable $callback, bool $once = false) { @@ -556,7 +538,7 @@ public static function composed(callable $callback, bool $once = false) /** * Call the composed callbacks. * - * @param array ...$params + * @param array ...$params */ protected function callComposed(...$params) { diff --git a/src/Layout/Menu.php b/src/Layout/Menu.php index a34cf209c..c0690668b 100755 --- a/src/Layout/Menu.php +++ b/src/Layout/Menu.php @@ -59,9 +59,8 @@ public function register() /** * 增加菜单节点. * - * @param array $nodes - * @param int $priority - * + * @param array $nodes + * @param int $priority * @return void */ public function add(array $nodes = [], int $priority = 10) @@ -74,11 +73,10 @@ public function add(array $nodes = [], int $priority = 10) /** * 转化为HTML. * - * @param array $nodes + * @param array $nodes + * @return string * * @throws \Throwable - * - * @return string */ public function toHtml($nodes) { @@ -94,8 +92,7 @@ public function toHtml($nodes) /** * 设置菜单视图. * - * @param string $view - * + * @param string $view * @return $this */ public function view(string $view) @@ -108,8 +105,7 @@ public function view(string $view) /** * 渲染视图. * - * @param array $item - * + * @param array $item * @return string */ public function render($item) @@ -120,9 +116,8 @@ public function render($item) /** * 判断是否选中. * - * @param array $item - * @param null|string $path - * + * @param array $item + * @param null|string $path * @return bool */ public function isActive($item, ?string $path = null) @@ -156,8 +151,7 @@ public function isActive($item, ?string $path = null) /** * 判断节点是否可见. * - * @param array $item - * + * @param array $item * @return bool */ public function visible($item) @@ -182,7 +176,6 @@ public function visible($item) * 判断扩展是否启用. * * @param $item - * * @return bool */ protected function checkExtension($item) @@ -203,8 +196,7 @@ protected function checkExtension($item) /** * 判断用户. * - * @param array|\Dcat\Admin\Models\Menu $item - * + * @param array|\Dcat\Admin\Models\Menu $item * @return bool */ protected function userCanSeeMenu($item) @@ -222,7 +214,6 @@ protected function userCanSeeMenu($item) * 判断权限. * * @param $item - * * @return bool */ protected function checkPermission($item) @@ -251,8 +242,7 @@ protected function checkPermission($item) } /** - * @param string $text - * + * @param string $text * @return string */ public function translate($text) @@ -267,8 +257,7 @@ public function translate($text) } /** - * @param string $uri - * + * @param string $uri * @return string */ public function getPath($uri) @@ -279,8 +268,7 @@ public function getPath($uri) } /** - * @param string $uri - * + * @param string $uri * @return string */ public function getUrl($uri) diff --git a/src/Layout/Navbar.php b/src/Layout/Navbar.php index 54d25374f..192493ec7 100755 --- a/src/Layout/Navbar.php +++ b/src/Layout/Navbar.php @@ -30,8 +30,7 @@ public function __construct() } /** - * @param string|\Closure|Renderable|Htmlable $element - * + * @param string|\Closure|Renderable|Htmlable $element * @return $this */ public function left($element) @@ -42,8 +41,7 @@ public function left($element) } /** - * @param string|\Closure|Renderable|Htmlable $element - * + * @param string|\Closure|Renderable|Htmlable $element * @return $this */ public function right($element) @@ -54,8 +52,7 @@ public function right($element) } /** - * @param string $part - * + * @param string $part * @return mixed */ public function render($part = 'right') diff --git a/src/Layout/Row.php b/src/Layout/Row.php index aae2b6231..fe4e7342f 100755 --- a/src/Layout/Row.php +++ b/src/Layout/Row.php @@ -16,7 +16,7 @@ class Row implements Renderable /** * Row constructor. * - * @param string $content + * @param string $content */ public function __construct($content = '') { @@ -32,7 +32,7 @@ public function __construct($content = '') /** * Add a column. * - * @param int $width + * @param int $width * @param $content */ public function column($width, $content) @@ -43,7 +43,7 @@ public function column($width, $content) } /** - * @param Column $column + * @param Column $column */ protected function addColumn(Column $column) { @@ -51,8 +51,7 @@ protected function addColumn(Column $column) } /** - * @param bool $value - * + * @param bool $value * @return $this */ public function noGutters(bool $value = true) diff --git a/src/Layout/SectionManager.php b/src/Layout/SectionManager.php index 8ff9e0d1f..25167c50f 100755 --- a/src/Layout/SectionManager.php +++ b/src/Layout/SectionManager.php @@ -25,11 +25,10 @@ class SectionManager /** * Inject content into a section. * - * @param string $section - * @param string|Renderable|Htmlable|callable $content - * @param bool $append - * @param int $priority - * + * @param string $section + * @param string|Renderable|Htmlable|callable $content + * @param bool $append + * @param int $priority * @return void */ public function inject($section, $content, bool $append = true, int $priority = 10) @@ -38,9 +37,8 @@ public function inject($section, $content, bool $append = true, int $priority = } /** - * @param string $section - * @param string|Renderable|Htmlable|callable $content - * + * @param string $section + * @param string|Renderable|Htmlable|callable $content * @return void */ public function injectDefault(string $section, $content) @@ -55,11 +53,10 @@ public function injectDefault(string $section, $content) /** * Set content to a given section. * - * @param string $section - * @param string|Renderable|Htmlable|callable $content - * @param bool $append - * @param int $priority - * + * @param string $section + * @param string|Renderable|Htmlable|callable $content + * @param bool $append + * @param int $priority * @return void */ protected function put(string $section, $content, bool $append = false, int $priority = 10) @@ -87,10 +84,9 @@ protected function put(string $section, $content, bool $append = false, int $pri /** * Get the string contents of a section. * - * @param string $section - * @param mixed $default - * @param array $options - * + * @param string $section + * @param mixed $default + * @param array $options * @return string */ public function yieldContent(string $section, $default = '', array $options = []) @@ -109,8 +105,7 @@ public function yieldContent(string $section, $default = '', array $options = [] /** * Get all of the sections for a given name. * - * @param string $name - * + * @param string $name * @return array */ public function getSections(string $name) @@ -121,8 +116,7 @@ public function getSections(string $name) /** * Sort the listeners for a given event by priority. * - * @param string $name - * + * @param string $name * @return array */ protected function sortSections(string $name) @@ -141,8 +135,7 @@ protected function sortSections(string $name) /** * Check if section exists. * - * @param string $name - * + * @param string $name * @return bool */ public function hasSection(string $name) @@ -153,8 +146,7 @@ public function hasSection(string $name) /** * Check if default section exists. * - * @param string $name - * + * @param string $name * @return bool */ public function hasDefaultSection(string $name) @@ -163,10 +155,9 @@ public function hasDefaultSection(string $name) } /** - * @param string $name - * @param mixed $content - * @param array $options - * + * @param string $name + * @param mixed $content + * @param array $options * @return string */ protected function resolveContent(string $name, &$content, array &$options) diff --git a/src/Models/Administrator.php b/src/Models/Administrator.php index a508e7a04..fe026993a 100755 --- a/src/Models/Administrator.php +++ b/src/Models/Administrator.php @@ -29,7 +29,7 @@ class Administrator extends Model implements AuthenticatableContract /** * Create a new Eloquent model instance. * - * @param array $attributes + * @param array $attributes */ public function __construct(array $attributes = []) { @@ -84,8 +84,7 @@ public function roles(): BelongsToMany /** * 判断是否允许查看菜单. * - * @param array|Menu $menu - * + * @param array|Menu $menu * @return bool */ public function canSeeMenu($menu) diff --git a/src/Models/Menu.php b/src/Models/Menu.php index 8ba74b973..9cdff45c6 100755 --- a/src/Models/Menu.php +++ b/src/Models/Menu.php @@ -41,7 +41,7 @@ class Menu extends Model implements Sortable /** * Create a new Eloquent model instance. * - * @param array $attributes + * @param array $attributes */ public function __construct(array $attributes = []) { @@ -85,8 +85,7 @@ public function permissions(): BelongsToMany /** * Get all elements. * - * @param bool $force - * + * @param bool $force * @return static[]|\Illuminate\Support\Collection */ public function allNodes(bool $force = false) diff --git a/src/Models/MenuCache.php b/src/Models/MenuCache.php index 23451b4d0..404ee315e 100755 --- a/src/Models/MenuCache.php +++ b/src/Models/MenuCache.php @@ -12,8 +12,7 @@ trait MenuCache /** * Get an item from the cache, or execute the given Closure and store the result. * - * @param \Closure $builder - * + * @param \Closure $builder * @return mixed */ protected function remember(\Closure $builder) diff --git a/src/Models/Permission.php b/src/Models/Permission.php index 8387034ab..f2529330d 100755 --- a/src/Models/Permission.php +++ b/src/Models/Permission.php @@ -80,8 +80,7 @@ public function menus(): BelongsToMany /** * If request should pass through the current permission. * - * @param Request $request - * + * @param Request $request * @return bool */ public function shouldPassThrough(Request $request): bool @@ -115,8 +114,7 @@ public function shouldPassThrough(Request $request): bool /** * Get options for Select field in form. * - * @param \Closure|null $closure - * + * @param \Closure|null $closure * @return array */ public static function selectOptions(\Closure $closure = null) @@ -127,8 +125,7 @@ public static function selectOptions(\Closure $closure = null) } /** - * @param string $path - * + * @param string $path * @return mixed */ public function getHttpPathAttribute($path) @@ -151,9 +148,8 @@ public function setHttpPathAttribute($path) /** * If a request match the specific HTTP method and path. * - * @param array $match - * @param Request $request - * + * @param array $match + * @param Request $request * @return bool */ protected function matchRequest(array $match, Request $request): bool @@ -185,7 +181,6 @@ public function setHttpMethodAttribute($method) /** * @param $method - * * @return array */ public function getHttpMethodAttribute($method) diff --git a/src/Models/Role.php b/src/Models/Role.php index 980571500..bb729c64a 100755 --- a/src/Models/Role.php +++ b/src/Models/Role.php @@ -80,7 +80,6 @@ public function menus(): BelongsToMany * Check user has permission. * * @param $permission - * * @return bool */ public function can(?string $permission): bool @@ -92,7 +91,6 @@ public function can(?string $permission): bool * Check user has no permission. * * @param $permission - * * @return bool */ public function cannot(?string $permission): bool @@ -103,8 +101,7 @@ public function cannot(?string $permission): bool /** * Get id of the permission by id. * - * @param array $roleIds - * + * @param array $roleIds * @return \Illuminate\Support\Collection */ public static function getPermissionId(array $roleIds) @@ -130,8 +127,7 @@ public static function getPermissionId(array $roleIds) } /** - * @param string $slug - * + * @param string $slug * @return bool */ public static function isAdministrator(?string $slug) diff --git a/src/Repositories/EloquentRepository.php b/src/Repositories/EloquentRepository.php index ff968020e..4e201b50f 100755 --- a/src/Repositories/EloquentRepository.php +++ b/src/Repositories/EloquentRepository.php @@ -52,7 +52,7 @@ class EloquentRepository extends Repository implements TreeRepository /** * EloquentRepository constructor. * - * @param EloquentModel|array|string $modelOrRelations $modelOrRelations + * @param EloquentModel|array|string $modelOrRelations $modelOrRelations */ public function __construct($modelOrRelations = []) { @@ -62,7 +62,7 @@ public function __construct($modelOrRelations = []) /** * 初始化模型. * - * @param EloquentModel|Builder|array|string $modelOrRelations + * @param EloquentModel|Builder|array|string $modelOrRelations */ protected function initModel($modelOrRelations) { @@ -138,8 +138,7 @@ public function getDetailColumns() /** * 设置关联关系. * - * @param mixed $relations - * + * @param mixed $relations * @return $this */ public function setRelations($relations) @@ -152,8 +151,7 @@ public function setRelations($relations) /** * 查询Grid表格数据. * - * @param Grid\Model $model - * + * @param Grid\Model $model * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator|Collection|array */ public function get(Grid\Model $model) @@ -173,8 +171,7 @@ public function get(Grid\Model $model) /** * 设置表格数据排序. * - * @param Grid\Model $model - * + * @param Grid\Model $model * @return void */ protected function setSort(Grid\Model $model) @@ -203,10 +200,10 @@ protected function setSort(Grid\Model $model) } /** - * @param Grid\Model $model - * @param string $column - * @param string $type - * @param string $cast + * @param Grid\Model $model + * @param string $column + * @param string $type + * @param string $cast * * @throws \Exception */ @@ -229,10 +226,9 @@ protected function addOrderBy(Grid\Model $model, $column, $type, $cast) } /** - * @param Grid\Model $model + * @param Grid\Model $model * @param $column * @param $type - * * @param $cast */ protected function setOrderBy(Grid\Model $model, $column, $type, $cast) @@ -266,8 +262,7 @@ protected function setOrderBy(Grid\Model $model, $column, $type, $cast) } /** - * @param string $column - * + * @param string $column * @return string */ protected function wrapMySqlColumn($column) @@ -290,10 +285,10 @@ protected function wrapMySqlColumn($column) /** * 设置关联数据排序. * - * @param Grid\Model $model - * @param string $column - * @param string $type - * @param string $cast + * @param Grid\Model $model + * @param string $column + * @param string $type + * @param string $cast * * @throws \Exception */ @@ -318,11 +313,10 @@ protected function setRelationSort(Grid\Model $model, $column, $type, $cast) /** * 关联模型 join 连接查询. * - * @param Relation $relation + * @param Relation $relation + * @return array * * @throws \Exception - * - * @return array */ protected function joinParameters(Relation $relation) { @@ -354,8 +348,7 @@ protected function joinParameters(Relation $relation) /** * 设置分页参数. * - * @param Grid\Model $model - * + * @param Grid\Model $model * @return void */ protected function setPaginate(Grid\Model $model) @@ -376,9 +369,8 @@ protected function setPaginate(Grid\Model $model) /** * 获取分页参数. * - * @param Grid\Model $model - * @param array|null $paginate - * + * @param Grid\Model $model + * @param array|null $paginate * @return array */ protected function resolvePerPage(Grid\Model $model, $paginate) @@ -402,8 +394,7 @@ protected function resolvePerPage(Grid\Model $model, $paginate) /** * 查询编辑页面数据. * - * @param Form $form - * + * @param Form $form * @return array|\Illuminate\Contracts\Support\Arrayable */ public function edit(Form $form) @@ -424,8 +415,7 @@ public function edit(Form $form) /** * 查询详情页面数据. * - * @param Show $show - * + * @param Show $show * @return array|\Illuminate\Contracts\Support\Arrayable */ public function detail(Show $show) @@ -446,8 +436,7 @@ public function detail(Show $show) /** * 新增记录. * - * @param Form $form - * + * @param Form $form * @return mixed */ public function store(Form $form) @@ -480,8 +469,7 @@ public function store(Form $form) /** * 查询更新前的行数据. * - * @param Form $form - * + * @param Form $form * @return array|\Illuminate\Contracts\Support\Arrayable */ public function updating(Form $form) @@ -492,8 +480,7 @@ public function updating(Form $form) /** * 更新数据. * - * @param Form $form - * + * @param Form $form * @return bool */ public function update(Form $form) @@ -578,9 +565,8 @@ public function moveOrderDown() /** * 删除数据. * - * @param Form $form - * @param array $originalData - * + * @param Form $form + * @param array $originalData * @return bool */ public function delete(Form $form, array $originalData) @@ -614,8 +600,7 @@ public function delete(Form $form, array $originalData) /** * 查询删除前的行数据. * - * @param Form $form - * + * @param Form $form * @return array */ public function deleting(Form $form) @@ -683,8 +668,8 @@ public function getOrderColumn() /** * 保存层级数据排序. * - * @param array $tree - * @param int $parentId + * @param array $tree + * @param int $parentId */ public function saveOrder($tree = [], $parentId = 0) { @@ -694,8 +679,7 @@ public function saveOrder($tree = [], $parentId = 0) /** * 设置数据查询回调. * - * @param \Closure|null $query - * + * @param \Closure|null $query * @return $this */ public function withQuery($queryCallback) @@ -744,8 +728,7 @@ public function model() } /** - * @param array $data - * + * @param array $data * @return EloquentModel */ public function createModel(array $data = []) @@ -760,8 +743,7 @@ public function createModel(array $data = []) } /** - * @param array $relations - * + * @param array $relations * @return $this */ public static function with($relations = []) @@ -782,9 +764,8 @@ public function getRelations() /** * 获取模型关联关系的表单数据. * - * @param EloquentModel $model - * @param array $inputs - * + * @param EloquentModel $model + * @param array $inputs * @return array */ protected function getRelationInputs($model, $inputs = []) @@ -820,10 +801,10 @@ protected function getRelationInputs($model, $inputs = []) /** * 更新关联关系数据. * - * @param Form $form - * @param EloquentModel $model - * @param array $relationsData - * @param array $relationKeyMap + * @param Form $form + * @param EloquentModel $model + * @param array $relationsData + * @param array $relationKeyMap * * @throws \Exception */ diff --git a/src/Repositories/QueryBuilderRepository.php b/src/Repositories/QueryBuilderRepository.php index 38183addd..94a854e83 100644 --- a/src/Repositories/QueryBuilderRepository.php +++ b/src/Repositories/QueryBuilderRepository.php @@ -114,8 +114,7 @@ public function getDetailColumns() /** * 查询Grid表格数据. * - * @param Grid\Model $model - * + * @param Grid\Model $model * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator|Collection|array */ public function get(Grid\Model $model) @@ -141,8 +140,7 @@ public function get(Grid\Model $model) /** * 设置表格数据排序. * - * @param Grid\Model $model - * + * @param Grid\Model $model * @return void */ protected function setSort(Grid\Model $model) @@ -165,10 +163,9 @@ protected function setSort(Grid\Model $model) /** * 设置关联数据排序. * - * @param Grid\Model $model - * @param string $column - * @param string $type - * + * @param Grid\Model $model + * @param string $column + * @param string $type * @return void */ protected function setRelationSort(Grid\Model $model, $column, $type) @@ -192,8 +189,7 @@ protected function setRelationSort(Grid\Model $model, $column, $type) /** * 设置分页参数. * - * @param Grid\Model $model - * + * @param Grid\Model $model * @return void */ protected function setPaginate(Grid\Model $model) @@ -212,9 +208,8 @@ protected function setPaginate(Grid\Model $model) /** * 获取分页参数. * - * @param Grid\Model $model - * @param array|null $paginate - * + * @param Grid\Model $model + * @param array|null $paginate * @return array */ protected function resolvePerPage(Grid\Model $model, $paginate) @@ -238,8 +233,7 @@ protected function resolvePerPage(Grid\Model $model, $paginate) /** * 查询编辑页面数据. * - * @param Form $form - * + * @param Form $form * @return array */ public function edit(Form $form): array @@ -258,8 +252,7 @@ public function edit(Form $form): array /** * 查询详情页面数据. * - * @param Show $show - * + * @param Show $show * @return array */ public function detail(Show $show): array @@ -278,8 +271,7 @@ public function detail(Show $show): array /** * 新增记录. * - * @param Form $form - * + * @param Form $form * @return mixed */ public function store(Form $form) @@ -297,8 +289,7 @@ public function store(Form $form) /** * 查询更新前的行数据. * - * @param Form $form - * + * @param Form $form * @return array */ public function updating(Form $form): array @@ -309,8 +300,7 @@ public function updating(Form $form): array /** * 更新数据. * - * @param Form $form - * + * @param Form $form * @return bool */ public function update(Form $form) @@ -350,8 +340,7 @@ public function moveOrderDown() /** * 删除数据. * - * @param Form $form - * + * @param Form $form * @return bool */ public function delete(Form $form, array $deletingData) @@ -381,8 +370,7 @@ public function delete(Form $form, array $deletingData) /** * 查询删除前的行数据. * - * @param Form $form - * + * @param Form $form * @return array */ public function deleting(Form $form): array @@ -436,8 +424,8 @@ public function getOrderColumn() /** * 保存层级数据排序. * - * @param array $tree - * @param int $parentId + * @param array $tree + * @param int $parentId */ public function saveOrder($tree = [], $parentId = 0) { @@ -447,8 +435,7 @@ public function saveOrder($tree = [], $parentId = 0) /** * 设置数据查询回调. * - * @param \Closure|null $query - * + * @param \Closure|null $query * @return $this */ public function withQuery($queryCallback) diff --git a/src/Repositories/Repository.php b/src/Repositories/Repository.php index 1a8f70b22..58b18dd32 100755 --- a/src/Repositories/Repository.php +++ b/src/Repositories/Repository.php @@ -38,7 +38,7 @@ public function getKeyName() /** * 设置主键名称. * - * @param string|array $keyName + * @param string|array $keyName */ public function setKeyName($keyName) { @@ -76,7 +76,7 @@ public function isSoftDeletes() } /** - * @param bool $isSoftDeletes + * @param bool $isSoftDeletes */ public function setIsSoftDeletes(?bool $isSoftDeletes) { @@ -86,8 +86,7 @@ public function setIsSoftDeletes(?bool $isSoftDeletes) /** * 获取Grid表格数据. * - * @param Grid\Model $model - * + * @param Grid\Model $model * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator|Collection|array */ public function get(Grid\Model $model) @@ -98,8 +97,7 @@ public function get(Grid\Model $model) /** * 获取编辑页面数据. * - * @param Form $form - * + * @param Form $form * @return array|\Illuminate\Contracts\Support\Arrayable */ public function edit(Form $form) @@ -110,8 +108,7 @@ public function edit(Form $form) /** * 获取详情页面数据. * - * @param Show $show - * + * @param Show $show * @return array|\Illuminate\Contracts\Support\Arrayable */ public function detail(Show $show) @@ -122,8 +119,7 @@ public function detail(Show $show) /** * 新增记录. * - * @param Form $form - * + * @param Form $form * @return int|bool|\Dcat\Admin\Http\JsonResponse */ public function store(Form $form) @@ -134,8 +130,7 @@ public function store(Form $form) /** * 查询更新前的行数据. * - * @param Form $form - * + * @param Form $form * @return array|\Illuminate\Contracts\Support\Arrayable */ public function updating(Form $form) @@ -146,8 +141,7 @@ public function updating(Form $form) /** * 更新数据. * - * @param Form $form - * + * @param Form $form * @return bool|\Dcat\Admin\Http\JsonResponse */ public function update(Form $form) @@ -158,9 +152,8 @@ public function update(Form $form) /** * 删除数据. * - * @param Form $form - * @param array $deletingData - * + * @param Form $form + * @param array $deletingData * @return bool|int|\Dcat\Admin\Http\JsonResponse */ public function delete(Form $form, array $deletingData) @@ -171,8 +164,7 @@ public function delete(Form $form, array $deletingData) /** * 查询删除前的行数据. * - * @param Form $form - * + * @param Form $form * @return array */ public function deleting(Form $form) @@ -223,8 +215,8 @@ public function getOrderColumn() /** * 保存层级数据排序. * - * @param array $tree - * @param int $parentId + * @param array $tree + * @param int $parentId */ public function saveOrder($tree = [], $parentId = 0) { @@ -234,8 +226,7 @@ public function saveOrder($tree = [], $parentId = 0) /** * 设置数据查询回调. * - * @param \Closure|null $query - * + * @param \Closure|null $query * @return $this */ public function withQuery($queryCallback) @@ -254,8 +245,7 @@ public function toTree() } /** - * @param mixed ...$params - * + * @param mixed ...$params * @return $this */ public static function make(...$params) diff --git a/src/Scaffold/ControllerCreator.php b/src/Scaffold/ControllerCreator.php index b0a510121..067726532 100755 --- a/src/Scaffold/ControllerCreator.php +++ b/src/Scaffold/ControllerCreator.php @@ -26,8 +26,8 @@ class ControllerCreator /** * ControllerCreator constructor. * - * @param string $name - * @param null $files + * @param string $name + * @param null $files */ public function __construct($name, $files = null) { @@ -39,11 +39,10 @@ public function __construct($name, $files = null) /** * Create a controller. * - * @param string $model + * @param string $model + * @return string * * @throws \Exception - * - * @return string */ public function create($model) { @@ -71,10 +70,9 @@ public function create($model) } /** - * @param string $stub - * @param string $name - * @param string $model - * + * @param string $stub + * @param string $name + * @param string $model * @return string */ protected function replace($stub, $name, $model, $slug) @@ -107,8 +105,7 @@ class_basename($model), /** * Get controller namespace from giving name. * - * @param string $name - * + * @param string $name * @return string */ protected function getNamespace($name) @@ -119,9 +116,8 @@ protected function getNamespace($name) /** * Replace the class name for the given stub. * - * @param string $stub - * @param string $name - * + * @param string $stub + * @param string $name * @return string */ protected function replaceClass($stub, $name) @@ -134,8 +130,7 @@ protected function replaceClass($stub, $name) /** * Get file path from giving controller name. * - * @param string $name - * + * @param string $name * @return string */ public function getPath($name) diff --git a/src/Scaffold/FormCreator.php b/src/Scaffold/FormCreator.php index ab4a1cbfa..8e108814d 100755 --- a/src/Scaffold/FormCreator.php +++ b/src/Scaffold/FormCreator.php @@ -5,10 +5,9 @@ trait FormCreator { /** - * @param string $primaryKey - * @param array $fields - * @param bool $timestamps - * + * @param string $primaryKey + * @param array $fields + * @param bool $timestamps * @return string */ protected function generateForm(string $primaryKey = null, array $fields = [], $timestamps = null) diff --git a/src/Scaffold/GridCreator.php b/src/Scaffold/GridCreator.php index 231a80ee9..7a902f2a2 100755 --- a/src/Scaffold/GridCreator.php +++ b/src/Scaffold/GridCreator.php @@ -5,9 +5,8 @@ trait GridCreator { /** - * @param string $primaryKey - * @param array $fields - * + * @param string $primaryKey + * @param array $fields * @return string */ protected function generateGrid(string $primaryKey = null, array $fields = [], $timestamps = null) diff --git a/src/Scaffold/LangCreator.php b/src/Scaffold/LangCreator.php index 88eaeb6a4..914ec26c7 100755 --- a/src/Scaffold/LangCreator.php +++ b/src/Scaffold/LangCreator.php @@ -17,9 +17,8 @@ public function __construct(array $fields) /** * 生成语言包. * - * @param string $controller - * @param string $title - * + * @param string $controller + * @param string $title * @return string */ public function create(string $controller, ?string $title) @@ -60,8 +59,7 @@ public function create(string $controller, ?string $title) /** * 获取语言包路径. * - * @param string $controller - * + * @param string $controller * @return string */ protected function getLangPath(string $controller) diff --git a/src/Scaffold/MigrationCreator.php b/src/Scaffold/MigrationCreator.php index bc94233a9..e217539ee 100755 --- a/src/Scaffold/MigrationCreator.php +++ b/src/Scaffold/MigrationCreator.php @@ -18,7 +18,6 @@ class MigrationCreator extends BaseMigrationCreator * Create a new migration creator instance. * * @param \Illuminate\Filesystem\Filesystem $files - * * @return void */ public function __construct(Filesystem $files) @@ -29,11 +28,10 @@ public function __construct(Filesystem $files) /** * Create a new model. * - * @param string $name - * @param string $path - * @param null $table - * @param bool|true $create - * + * @param string $name + * @param string $path + * @param null $table + * @param bool|true $create * @return string */ public function create($name, $path, $table = null, $create = true) @@ -55,10 +53,9 @@ public function create($name, $path, $table = null, $create = true) /** * Populate stub. * - * @param string $name - * @param string $stub - * @param string $table - * + * @param string $name + * @param string $stub + * @param string $table * @return mixed */ protected function populateStub($name, $stub, $table) @@ -73,14 +70,13 @@ protected function populateStub($name, $stub, $table) /** * Build the table blueprint. * - * @param array $fields - * @param string $keyName - * @param bool|true $useTimestamps - * @param bool|false $softDeletes + * @param array $fields + * @param string $keyName + * @param bool|true $useTimestamps + * @param bool|false $softDeletes + * @return $this * * @throws \Exception - * - * @return $this */ public function buildBluePrint($fields = [], $keyName = 'id', $useTimestamps = true, $softDeletes = false) { diff --git a/src/Scaffold/ModelCreator.php b/src/Scaffold/ModelCreator.php index 3b333a8fc..0d5f138ae 100755 --- a/src/Scaffold/ModelCreator.php +++ b/src/Scaffold/ModelCreator.php @@ -32,9 +32,9 @@ class ModelCreator /** * ModelCreator constructor. * - * @param string $tableName - * @param string $name - * @param null $files + * @param string $tableName + * @param string $name + * @param null $files */ public function __construct($tableName, $name, $files = null) { @@ -48,13 +48,12 @@ public function __construct($tableName, $name, $files = null) /** * Create a new migration file. * - * @param string $keyName - * @param bool|true $timestamps - * @param bool|false $softDeletes + * @param string $keyName + * @param bool|true $timestamps + * @param bool|false $softDeletes + * @return string * * @throws \Exception - * - * @return string */ public function create($keyName = 'id', $timestamps = true, $softDeletes = false) { @@ -89,8 +88,7 @@ public function create($keyName = 'id', $timestamps = true, $softDeletes = false /** * Get path for migration file. * - * @param string $name - * + * @param string $name * @return string */ public function getPath($name) @@ -101,8 +99,7 @@ public function getPath($name) /** * Get namespace of giving class full name. * - * @param string $name - * + * @param string $name * @return string */ protected function getNamespace($name) @@ -113,9 +110,8 @@ protected function getNamespace($name) /** * Replace class dummy. * - * @param string $stub - * @param string $name - * + * @param string $stub + * @param string $name * @return $this */ protected function replaceClass(&$stub, $name) @@ -130,9 +126,8 @@ protected function replaceClass(&$stub, $name) /** * Replace namespace dummy. * - * @param string $stub - * @param string $name - * + * @param string $stub + * @param string $name * @return $this */ protected function replaceNamespace(&$stub, $name) @@ -149,9 +144,8 @@ protected function replaceNamespace(&$stub, $name) /** * Replace soft-deletes dummy. * - * @param string $stub - * @param bool $softDeletes - * + * @param string $stub + * @param bool $softDeletes * @return $this */ protected function replaceSoftDeletes(&$stub, $softDeletes) @@ -171,9 +165,8 @@ protected function replaceSoftDeletes(&$stub, $softDeletes) /** * Replace datetimeFormatter dummy. * - * @param string $stub - * @param bool $softDeletes - * + * @param string $stub + * @param bool $softDeletes * @return $this */ protected function replaceDatetimeFormatter(&$stub) @@ -193,9 +186,8 @@ protected function replaceDatetimeFormatter(&$stub) /** * Replace primarykey dummy. * - * @param string $stub - * @param string $keyName - * + * @param string $stub + * @param string $keyName * @return $this */ protected function replacePrimaryKey(&$stub, $keyName) @@ -210,9 +202,8 @@ protected function replacePrimaryKey(&$stub, $keyName) /** * Replace Table name dummy. * - * @param string $stub - * @param string $name - * + * @param string $stub + * @param string $name * @return $this */ protected function replaceTable(&$stub, $name) @@ -229,9 +220,8 @@ protected function replaceTable(&$stub, $name) /** * Replace timestamps dummy. * - * @param string $stub - * @param bool $timestamps - * + * @param string $stub + * @param bool $timestamps * @return $this */ protected function replaceTimestamp(&$stub, $timestamps) @@ -246,8 +236,7 @@ protected function replaceTimestamp(&$stub, $timestamps) /** * Replace spaces. * - * @param string $stub - * + * @param string $stub * @return mixed */ public function replaceSpace($stub) diff --git a/src/Scaffold/RepositoryCreator.php b/src/Scaffold/RepositoryCreator.php index aaca2eb11..30526d487 100755 --- a/src/Scaffold/RepositoryCreator.php +++ b/src/Scaffold/RepositoryCreator.php @@ -7,9 +7,8 @@ class RepositoryCreator { /** - * @param string $modelClass - * @param string $repositoryClass - * + * @param string $modelClass + * @param string $repositoryClass * @return string */ public function create(?string $modelClass, ?string $repositoryClass) diff --git a/src/Scaffold/ShowCreator.php b/src/Scaffold/ShowCreator.php index cdaf5326d..29d3d3e6f 100755 --- a/src/Scaffold/ShowCreator.php +++ b/src/Scaffold/ShowCreator.php @@ -5,9 +5,8 @@ trait ShowCreator { /** - * @param string $primaryKey - * @param array $fields - * + * @param string $primaryKey + * @param array $fields * @return string */ protected function generateShow(string $primaryKey = null, array $fields = [], $timestamps = null) diff --git a/src/Show.php b/src/Show.php index 1c1cedafb..b80e2f5fc 100755 --- a/src/Show.php +++ b/src/Show.php @@ -96,9 +96,9 @@ class Show implements Renderable /** * Show constructor. * - * @param mixed $id $id - * @param Model|Builder|Repository|array|Arrayable $model - * @param \Closure $builder + * @param mixed $id $id + * @param Model|Builder|Repository|array|Arrayable $model + * @param \Closure $builder */ public function __construct($id = null, $model = null, ?\Closure $builder = null) { @@ -154,8 +154,7 @@ protected function initModel($model) /** * Create a show instance. * - * @param mixed ...$params - * + * @param mixed ...$params * @return $this */ public static function make(...$params) @@ -164,8 +163,7 @@ public static function make(...$params) } /** - * @param string $value - * + * @param string $value * @return $this */ public function setKeyName(string $value) @@ -190,8 +188,7 @@ public function getKeyName() } /** - * @param mixed $id - * + * @param mixed $id * @return mixed */ public function setKey($id) @@ -210,8 +207,7 @@ public function getKey() } /** - * @param Fluent|\Illuminate\Database\Eloquent\Model|null $model - * + * @param Fluent|\Illuminate\Database\Eloquent\Model|null $model * @return Fluent|$this|\Illuminate\Database\Eloquent\Model */ public function model($model = null) @@ -232,8 +228,7 @@ public function model($model = null) /** * Set a view to render. * - * @param string $view - * + * @param string $view * @return $this */ public function view($view) @@ -246,8 +241,7 @@ public function view($view) /** * Add variables to show view. * - * @param array $variables - * + * @param array $variables * @return $this */ public function with($variables = []) @@ -295,8 +289,7 @@ public function panel() } /** - * @param \Closure|array|AbstractTool|Renderable|Htmlable|string $callback - * + * @param \Closure|array|AbstractTool|Renderable|Htmlable|string $callback * @return $this|Tools */ public function tools($callback = null) @@ -325,9 +318,8 @@ public function tools($callback = null) /** * Add a model field to show. * - * @param string $name - * @param string $label - * + * @param string $name + * @param string $label * @return Field */ public function field($name, $label = '') @@ -338,8 +330,7 @@ public function field($name, $label = '') /** * Get fields or add multiple fields. * - * @param array $fields - * + * @param array $fields * @return $this|Collection */ public function fields(array $fields = null) @@ -382,10 +373,9 @@ public function all() /** * Add a relation to show. * - * @param string $name - * @param string|\Closure $label - * @param null|\Closure $builder - * + * @param string $name + * @param string|\Closure $label + * @param null|\Closure $builder * @return Relation */ public function relation($name, $label, $builder = null) @@ -401,9 +391,8 @@ public function relation($name, $label, $builder = null) /** * Add a model field to show. * - * @param string $name - * @param string $label - * + * @param string $name + * @param string $label * @return Field */ protected function addField($name, $label = '') @@ -422,10 +411,9 @@ protected function addField($name, $label = '') /** * Add a relation panel to show. * - * @param string $name - * @param \Closure $builder - * @param string $label - * + * @param string $name + * @param \Closure $builder + * @param string $label * @return Relation */ protected function addRelation($name, $builder, $label = '') @@ -444,7 +432,7 @@ protected function addRelation($name, $builder, $label = '') /** * Overwrite existing field. * - * @param string $name + * @param string $name */ protected function overwriteExistingField($name) { @@ -462,7 +450,7 @@ function (Field $field) use ($name) { /** * Overwrite existing relation. * - * @param string $name + * @param string $name */ protected function overwriteExistingRelation($name) { @@ -504,7 +492,7 @@ public function newline() /** * Show the content of html. * - * @param string $html + * @param string $html */ public function html($html = '') { @@ -550,9 +538,8 @@ public function disableEditButton(bool $disable = true) /** * Show quick edit tool. * - * @param null|string $width - * @param null|string $height - * + * @param null|string $width + * @param null|string $height * @return $this */ public function showQuickEdit(?string $width = null, ?string $height = null) @@ -594,8 +581,7 @@ public function resource() /** * Set resource path. * - * @param string $path - * + * @param string $path * @return $this */ public function setResource($path) @@ -610,9 +596,8 @@ public function setResource($path) /** * Add field and relation dynamically. * - * @param string $method - * @param array $arguments - * + * @param string $method + * @param array $arguments * @return Field */ public function __call($method, $arguments = []) @@ -626,8 +611,7 @@ public function __call($method, $arguments = []) /** * @param $method - * @param array $arguments - * + * @param array $arguments * @return bool|Show|Field|Relation */ protected function call($method, $arguments = []) @@ -644,9 +628,8 @@ protected function call($method, $arguments = []) /** * Handle relation field. * - * @param string $method - * @param array $arguments - * + * @param string $method + * @param array $arguments * @return $this|bool|Relation|Field */ protected function handleRelationField($method, $arguments) @@ -697,8 +680,7 @@ public function render() /** * Add a row in Show. * - * @param Closure $callback - * + * @param Closure $callback * @return $this */ public function row(Closure $callback) @@ -719,8 +701,7 @@ public function rows() /** * Add a model field to show. * - * @param string $name - * + * @param string $name * @return Field|Collection */ public function __get($name) diff --git a/src/Show/AbstractField.php b/src/Show/AbstractField.php index fac22b1d5..37b383b63 100755 --- a/src/Show/AbstractField.php +++ b/src/Show/AbstractField.php @@ -36,8 +36,7 @@ abstract class AbstractField implements Renderable public $escape = false; /** - * @param mixed $value - * + * @param mixed $value * @return AbstractField $this */ public function setValue($value) @@ -48,8 +47,7 @@ public function setValue($value) } /** - * @param Fluent $model - * + * @param Fluent $model * @return AbstractField $this */ public function setModel($model) diff --git a/src/Show/AbstractTool.php b/src/Show/AbstractTool.php index 4e0069781..50462a519 100644 --- a/src/Show/AbstractTool.php +++ b/src/Show/AbstractTool.php @@ -18,8 +18,7 @@ abstract class AbstractTool extends Action protected $style = 'btn btn-sm btn-primary'; /** - * @param Show $show - * + * @param Show $show * @return void */ public function setParent(Show $show) diff --git a/src/Show/Field.php b/src/Show/Field.php index 55a013b5e..37f780a0c 100755 --- a/src/Show/Field.php +++ b/src/Show/Field.php @@ -97,8 +97,8 @@ class Field implements Renderable /** * Field constructor. * - * @param string $name - * @param string $label + * @param string $name + * @param string $label */ public function __construct($name = '', $label = '') { @@ -112,8 +112,7 @@ public function __construct($name = '', $label = '') /** * Set parent show instance. * - * @param Show $show - * + * @param Show $show * @return $this */ public function setParent(Show $show) @@ -134,8 +133,7 @@ public function getName() } /** - * @param int $width - * + * @param int $width * @return $this|array */ public function width(int $field, int $label = 2) @@ -152,7 +150,6 @@ public function width(int $field, int $label = 2) * Format label. * * @param $label - * * @return mixed */ protected function formatLabel($label) @@ -179,8 +176,7 @@ public function getLabel() /** * Field display callback. * - * @param mixed $callable - * + * @param mixed $callable * @return $this */ public function as($callable, ...$params) @@ -193,9 +189,8 @@ public function as($callable, ...$params) /** * Display field using array value map. * - * @param array $values - * @param null $default - * + * @param array $values + * @param null $default * @return $this */ public function using(array $values, $default = null) @@ -212,10 +207,9 @@ public function using(array $values, $default = null) /** * Show field as a image. * - * @param string $server - * @param int $width - * @param int $height - * + * @param string $server + * @param int $width + * @param int $height * @return $this */ public function image($server = '', $width = 200, $height = 200) @@ -250,9 +244,8 @@ public function image($server = '', $width = 200, $height = 200) /** * Show field as a file. * - * @param string $server - * @param bool $download - * + * @param string $server + * @param bool $download * @return Field */ public function file($server = '', $download = true) @@ -314,9 +307,8 @@ public function file($server = '', $download = true) /** * Show field as a link. * - * @param string $href - * @param string $target - * + * @param string $href + * @param string $target * @return Field */ public function link($href = '', $target = '_blank') @@ -331,8 +323,7 @@ public function link($href = '', $target = '_blank') /** * Show field as labels. * - * @param string $style - * + * @param string $style * @return Field */ public function label($style = 'primary') @@ -351,9 +342,8 @@ public function label($style = 'primary') /** * Add a `dot` before column text. * - * @param array $options - * @param string $default - * + * @param array $options + * @param string $default * @return $this */ public function dot($options = [], $default = 'default') @@ -372,8 +362,7 @@ public function dot($options = [], $default = 'default') /** * Show field as badges. * - * @param string $style - * + * @param string $style * @return Field */ public function badge($style = 'blue') @@ -391,7 +380,6 @@ public function badge($style = 'blue') /** * @param $style - * * @return array */ public function formatStyle($style) @@ -428,8 +416,7 @@ public function json() } /** - * @param string $val - * + * @param string $val * @return $this */ public function prepend($val) @@ -454,8 +441,7 @@ public function prepend($val) } /** - * @param string $val - * + * @param string $val * @return $this */ public function append($val) @@ -482,8 +468,7 @@ public function append($val) /** * Split a string by string. * - * @param string $d - * + * @param string $d * @return $this */ public function explode(string $d = ',') @@ -500,9 +485,8 @@ public function explode(string $d = ',') /** * Render this column with the given view. * - * @param string $view - * @param array $data - * + * @param string $view + * @param array $data * @return $this */ public function view($view, array $data = []) @@ -519,8 +503,7 @@ public function view($view, array $data = []) /** * Set escape or not for this field. * - * @param bool $escape - * + * @param bool $escape * @return $this */ public function escape($escape = true) @@ -541,8 +524,7 @@ public function unescape() } /** - * @param Fluent|\Illuminate\Database\Eloquent\Model $model - * + * @param Fluent|\Illuminate\Database\Eloquent\Model $model * @return void */ public function fill($model) @@ -553,8 +535,7 @@ public function fill($model) /** * Get or set value for this field. * - * @param mixed $value - * + * @param mixed $value * @return $this|mixed */ public function value($value = null) @@ -579,8 +560,7 @@ public function wrap(bool $wrap = true) } /** - * @param string $color - * + * @param string $color * @return $this */ public function bold($color = null) @@ -599,9 +579,8 @@ public function bold($color = null) /** * Display field as boolean , `✓` for true, and `✗` for false. * - * @param array $map - * @param bool $default - * + * @param array $map + * @param bool $default * @return $this */ public function bool(array $map = [], $default = false) @@ -616,7 +595,6 @@ public function bool(array $map = [], $default = false) /** * @param mixed $value * @param callable $callback - * * @return $this|mixed */ public function when($value, $callback) @@ -629,9 +607,8 @@ public function when($value, $callback) } /** - * @param string $method - * @param array $arguments - * + * @param string $method + * @param array $arguments * @return $this */ public function __call($method, $arguments = []) @@ -650,9 +627,8 @@ public function __call($method, $arguments = []) /** * Call extended field. * - * @param string|AbstractField|\Closure $abstract - * @param array $arguments - * + * @param string|AbstractField|\Closure $abstract + * @param array $arguments * @return Field */ protected function callExtendedField($abstract, $arguments = []) @@ -697,9 +673,8 @@ protected function callExtendedField($abstract, $arguments = []) /** * Call Illuminate/Support. * - * @param string $abstract - * @param array $arguments - * + * @param string $abstract + * @param array $arguments * @return $this */ protected function callSupportDisplayer($abstract, $arguments) @@ -764,9 +739,8 @@ public function render() /** * Register custom field. * - * @param string $abstract - * @param string $class - * + * @param string $abstract + * @param string $class * @return void */ public static function extend($abstract, $class) diff --git a/src/Show/Panel.php b/src/Show/Panel.php index 5bc720f78..ca0983d67 100755 --- a/src/Show/Panel.php +++ b/src/Show/Panel.php @@ -64,8 +64,7 @@ protected function initVariables() /** * Set parent container. * - * @param Show $show - * + * @param Show $show * @return $this */ public function setParent(Show $show) @@ -88,9 +87,9 @@ public function parent() /** * Set style for this panel. * - * @param string $style - * + * @param string $style * @return $this + * * @deprecated */ public function style($style = 'info') @@ -103,8 +102,7 @@ public function style($style = 'info') /** * Set title for this panel. * - * @param string $title - * + * @param string $title * @return $this */ public function title($title) @@ -117,8 +115,7 @@ public function title($title) /** * Set view for this panel to render. * - * @param string $view - * + * @param string $view * @return $this */ public function view($view) @@ -131,8 +128,7 @@ public function view($view) /** * Add variables to show view. * - * @param array $variables - * + * @param array $variables * @return $this */ public function with(array $variables = []) @@ -164,7 +160,6 @@ public function hasWrapper() * Build panel tools. * * @param $callable - * * @return Tools|null */ public function tools($callable = null) @@ -180,7 +175,6 @@ public function tools($callable = null) * Fill fields to panel. * * @param []Field $fields - * * @return $this */ public function fill($fields) diff --git a/src/Show/Relation.php b/src/Show/Relation.php index 2abbc7f7a..156ad8dc0 100755 --- a/src/Show/Relation.php +++ b/src/Show/Relation.php @@ -46,9 +46,9 @@ class Relation extends Field /** * Relation constructor. * - * @param string $name - * @param \Closure $builder - * @param string $title + * @param string $name + * @param \Closure $builder + * @param string $title */ public function __construct($name, $builder, $title = '') { @@ -60,8 +60,7 @@ public function __construct($name, $builder, $title = '') /** * Set parent model for relation. * - * @param Fluent|Model $model - * + * @param Fluent|Model $model * @return $this|Fluent */ public function model($model = null) @@ -76,8 +75,7 @@ public function model($model = null) } /** - * @param int $width - * + * @param int $width * @return $this */ public function width(int $width, int $_ = 2) diff --git a/src/Show/Row.php b/src/Show/Row.php index b948938cc..b14af7856 100644 --- a/src/Show/Row.php +++ b/src/Show/Row.php @@ -37,8 +37,8 @@ class Row implements Renderable /** * Row constructor. * - * @param \Closure $callback - * @param Show $show + * @param \Closure $callback + * @param Show $show */ public function __construct(\Closure $callback, Show $show) { @@ -72,8 +72,7 @@ public function fields() /** * Set width for a incomming field. * - * @param int $width - * + * @param int $width * @return $this */ public function width($width = 12) @@ -86,9 +85,8 @@ public function width($width = 12) /** * Add field. * - * @param string $name - * @param string $label - * + * @param string $name + * @param string $label * @return \Dcat\Admin\Show\Field */ public function field($name, $label = '') @@ -104,7 +102,6 @@ public function field($name, $label = '') * Add field. * * @param $name - * * @return \Dcat\Admin\Show\Field|Collection */ public function __get($name) @@ -119,7 +116,6 @@ public function __get($name) /** * @param $method * @param $arguments - * * @return \Dcat\Admin\Show\Field */ public function __call($method, $arguments) @@ -132,8 +128,7 @@ public function __call($method, $arguments) } /** - * @param \Dcat\Admin\Show\Field $field - * + * @param \Dcat\Admin\Show\Field $field * @return void */ protected function pushField($field) diff --git a/src/Show/Tools.php b/src/Show/Tools.php index 78c113432..bcddd89a0 100755 --- a/src/Show/Tools.php +++ b/src/Show/Tools.php @@ -72,7 +72,7 @@ class Tools implements Renderable /** * Tools constructor. * - * @param Panel $panel + * @param Panel $panel */ public function __construct(Panel $panel) { @@ -85,8 +85,7 @@ public function __construct(Panel $panel) /** * Append a tools. * - * @param string|\Closure|AbstractTool|Renderable|Htmlable $tool - * + * @param string|\Closure|AbstractTool|Renderable|Htmlable $tool * @return $this */ public function append($tool) @@ -101,8 +100,7 @@ public function append($tool) /** * Prepend a tool. * - * @param string|\Closure|AbstractTool|Renderable|Htmlable $tool - * + * @param string|\Closure|AbstractTool|Renderable|Htmlable $tool * @return $this */ public function prepend($tool) @@ -116,7 +114,6 @@ public function prepend($tool) /** * @param $tool - * * @return void */ protected function prepareTool($tool) @@ -177,8 +174,7 @@ public function disableEdit(bool $disable = true) } /** - * @param bool $disable - * + * @param bool $disable * @return $this */ public function disableQuickEdit(bool $disable = true) @@ -189,9 +185,8 @@ public function disableQuickEdit(bool $disable = true) } /** - * @param string $width - * @param string $height - * + * @param string $width + * @param string $height * @return $this */ public function showQuickEdit(?string $width = null, ?string $height = null) @@ -331,8 +326,7 @@ protected function renderDelete() /** * Render custom tools. * - * @param Collection $tools - * + * @param Collection $tools * @return mixed */ protected function renderCustomTools($tools) diff --git a/src/Support/Composer.php b/src/Support/Composer.php index 9d5b5c668..6c2dcc090 100755 --- a/src/Support/Composer.php +++ b/src/Support/Composer.php @@ -32,7 +32,6 @@ public static function loader() /** * @param $path - * * @return ComposerProperty */ public static function parse(?string $path) @@ -41,9 +40,8 @@ public static function parse(?string $path) } /** - * @param null|string $packageName - * @param null|string $lockFile - * + * @param null|string $packageName + * @param null|string $lockFile * @return null */ public static function getVersion(?string $packageName, ?string $lockFile = null) @@ -63,8 +61,7 @@ public static function getVersion(?string $packageName, ?string $lockFile = null } /** - * @param null|string $path - * + * @param null|string $path * @return array */ public static function fromJson(?string $path) diff --git a/src/Support/ComposerProperty.php b/src/Support/ComposerProperty.php index d25f96f73..4cb3c1d62 100755 --- a/src/Support/ComposerProperty.php +++ b/src/Support/ComposerProperty.php @@ -9,17 +9,17 @@ * @property string $name * @property string $description * @property string $type - * @property array $keywords + * @property array $keywords * @property string $homepage * @property string $license - * @property array $authors - * @property array $require - * @property array $require_dev - * @property array $suggest - * @property array $autoload - * @property array $autoload_dev - * @property array $scripts - * @property array $extra + * @property array $authors + * @property array $require + * @property array $require_dev + * @property array $suggest + * @property array $autoload + * @property array $autoload_dev + * @property array $scripts + * @property array $extra * @property string $version */ class ComposerProperty implements Arrayable @@ -36,8 +36,7 @@ public function __construct(array $attributes = []) /** * @param $key - * @param null $default - * + * @param null $default * @return mixed */ public function get($key, $default = null) @@ -48,7 +47,6 @@ public function get($key, $default = null) /** * @param $key * @param $val - * * @return $this */ public function set($key, $val) @@ -62,7 +60,6 @@ public function set($key, $val) /** * @param $key - * * @return $this */ public function delete($key) @@ -76,7 +73,6 @@ public function delete($key) /** * @param $name - * * @return mixed */ public function __get($name) diff --git a/src/Support/DatabaseUpdater.php b/src/Support/DatabaseUpdater.php index 27c6992ff..9fa91c014 100644 --- a/src/Support/DatabaseUpdater.php +++ b/src/Support/DatabaseUpdater.php @@ -77,6 +77,7 @@ public function packDown($file, \Closure $callback = null) /** * Resolve a migration instance from a file. + * * @param string $file * @return object */ @@ -118,7 +119,8 @@ protected function isValidScript($object) /** * Extracts the namespace and class name from a file. - * @param string $file + * + * @param string $file * @return string */ public function getClassFromFile($file) diff --git a/src/Support/Helper.php b/src/Support/Helper.php index babcca0db..63e3c8215 100755 --- a/src/Support/Helper.php +++ b/src/Support/Helper.php @@ -39,8 +39,7 @@ class Helper * 把给定的值转化为数组. * * @param $value - * @param bool $filter - * + * @param bool $filter * @return array */ public static function array($value, bool $filter = true): array @@ -79,10 +78,9 @@ public static function array($value, bool $filter = true): array /** * 把给定的值转化为字符串. * - * @param string|Grid|\Closure|Renderable|Htmlable $value - * @param array $params - * @param object $newThis - * + * @param string|Grid|\Closure|Renderable|Htmlable $value + * @param array $params + * @param object $newThis * @return string */ public static function render($value, $params = [], $newThis = null): string @@ -133,8 +131,7 @@ public static function getControllerName() } /** - * @param array $attributes - * + * @param array $attributes * @return string */ public static function buildHtmlAttributes($attributes) @@ -163,9 +160,8 @@ public static function buildHtmlAttributes($attributes) } /** - * @param string $url - * @param array $query - * + * @param string $url + * @param array $query * @return string */ public static function urlWithQuery(?string $url, array $query = []) @@ -184,9 +180,8 @@ public static function urlWithQuery(?string $url, array $query = []) } /** - * @param string $url - * @param string|array|Arrayable $keys - * + * @param string $url + * @param string|array|Arrayable $keys * @return string */ public static function urlWithoutQuery($url, $keys) @@ -215,8 +210,7 @@ public static function urlWithoutQuery($url, $keys) } /** - * @param Arrayable|array|string $keys - * + * @param Arrayable|array|string $keys * @return string */ public static function fullUrlWithoutQuery($keys) @@ -225,9 +219,8 @@ public static function fullUrlWithoutQuery($keys) } /** - * @param string $url - * @param string|array $keys - * + * @param string $url + * @param string|array $keys * @return bool */ public static function urlHasQuery(string $url, $keys) @@ -258,9 +251,8 @@ public static function urlHasQuery(string $url, $keys) * Helper::matchRequestPath(admin_base_path('auth/user/* /edit')) * Helper::matchRequestPath('GET,POST:auth/user') * - * @param string $path - * @param null|string $current - * + * @param string $path + * @param null|string $current * @return bool */ public static function matchRequestPath($path, ?string $current = null) @@ -295,12 +287,11 @@ public static function matchRequestPath($path, ?string $current = null) /** * 生成层级数据. * - * @param array $nodes - * @param int $parentId - * @param string|null $primaryKeyName - * @param string|null $parentKeyName - * @param string|null $childrenKeyName - * + * @param array $nodes + * @param int $parentId + * @param string|null $primaryKeyName + * @param string|null $parentKeyName + * @param string|null $childrenKeyName * @return array */ public static function buildNestedArray( @@ -341,9 +332,8 @@ public static function buildNestedArray( } /** - * @param string $name - * @param string $symbol - * + * @param string $name + * @param string $symbol * @return mixed */ public static function slug(string $name, string $symbol = '-') @@ -356,9 +346,8 @@ public static function slug(string $name, string $symbol = '-') } /** - * @param array $array - * @param int $level - * + * @param array $array + * @param int $level * @return string */ public static function exportArray(array &$array, $level = 1) @@ -398,8 +387,7 @@ public static function exportArray(array &$array, $level = 1) } /** - * @param array $array - * + * @param array $array * @return string */ public static function exportArrayPhp(array $array) @@ -410,9 +398,9 @@ public static function exportArrayPhp(array $array) /** * 删除数组中的元素. * - * @param array $array - * @param mixed $value - * @param bool $strict + * @param array $array + * @param mixed $value + * @param bool $strict */ public static function deleteByValue(&$array, $value, bool $strict = false) { @@ -426,8 +414,8 @@ public static function deleteByValue(&$array, $value, bool $strict = false) } /** - * @param array $array - * @param mixed $value + * @param array $array + * @param mixed $value */ public static function deleteContains(&$array, $value) { @@ -445,9 +433,8 @@ public static function deleteContains(&$array, $value) /** * 颜色转亮. * - * @param string $color - * @param int $amt - * + * @param string $color + * @param int $amt * @return string */ public static function colorLighten(string $color, int $amt) @@ -472,9 +459,8 @@ public static function colorLighten(string $color, int $amt) /** * 颜色转暗. * - * @param string $color - * @param int $amt - * + * @param string $color + * @param int $amt * @return string */ public static function colorDarken(string $color, int $amt) @@ -485,9 +471,8 @@ public static function colorDarken(string $color, int $amt) /** * 颜色透明度. * - * @param string $color - * @param float|string $alpha - * + * @param string $color + * @param float|string $alpha * @return string */ public static function colorAlpha(string $color, $alpha) @@ -506,9 +491,8 @@ public static function colorAlpha(string $color, $alpha) } /** - * @param string $color - * @param int $amt - * + * @param string $color + * @param int $amt * @return array */ public static function colorToRBG(string $color, int $amt = 0) @@ -536,8 +520,7 @@ public static function colorToRBG(string $color, int $amt = 0) /** * 验证扩展包名称. * - * @param string $name - * + * @param string $name * @return int */ public static function validateExtensionName($name) @@ -548,8 +531,7 @@ public static function validateExtensionName($name) /** * Get file icon. * - * @param string $file - * + * @param string $file * @return string */ public static function getFileIcon($file = '') @@ -568,8 +550,7 @@ public static function getFileIcon($file = '') /** * 判断是否是ajax请求. * - * @param Request $request - * + * @param Request $request * @return bool */ public static function isAjaxRequest(?Request $request = null) @@ -601,8 +582,7 @@ public static function isQQBrowser() } /** - * @param string $url - * + * @param string $url * @return void */ public static function setPreviousUrl($url) @@ -619,11 +599,10 @@ public static function getPreviousUrl() } /** - * @param mixed $command - * @param int $timeout - * @param null $input - * @param null $cwd - * + * @param mixed $command + * @param int $timeout + * @param null $input + * @param null $cwd * @return Process */ public static function process($command, $timeout = 100, $input = null, $cwd = null) @@ -646,7 +625,6 @@ public static function process($command, $timeout = 100, $input = null, $cwd = n * * @param $value1 * @param $value2 - * * @return bool */ public static function equal($value1, $value2) @@ -665,9 +643,8 @@ public static function equal($value1, $value2) /** * 判断给定的数组是是否包含给定元素. * - * @param mixed $value - * @param array $array - * + * @param mixed $value + * @param array $array * @return bool */ public static function inArray($value, array $array) @@ -686,9 +663,9 @@ public static function inArray($value, array $array) /** * Limit the number of characters in a string. * - * @param string $value - * @param int $limit - * @param string $end + * @param string $value + * @param int $limit + * @param string $end * @return string */ public static function strLimit($value, $limit = 100, $end = '...') @@ -703,8 +680,7 @@ public static function strLimit($value, $limit = 100, $end = '...') /** * 获取类名或对象的文件路径. * - * @param string|object $class - * + * @param string|object $class * @return string * * @throws \ReflectionException @@ -758,8 +734,8 @@ public static function guessClassFileName($class) /** * Is input data is has-one relation. * - * @param Collection $fields - * @param array $input + * @param Collection $fields + * @param array $input */ public static function prepareHasOneRelation(Collection $fields, array &$input) { @@ -800,11 +776,10 @@ public static function prepareHasOneRelation(Collection $fields, array &$input) /** * 设置查询条件. * - * @param mixed $model - * @param string $column - * @param string $query + * @param mixed $model + * @param string $column + * @param string $query * @param mixed array $params - * * @return void */ public static function withQueryCondition($model, ?string $column, string $query, array $params) @@ -826,11 +801,10 @@ public static function withQueryCondition($model, ?string $column, string $query /** * 设置关联关系查询条件. * - * @param mixed $model - * @param string $column - * @param string $query - * @param mixed ...$params - * + * @param mixed $model + * @param string $column + * @param string $query + * @param mixed ...$params * @return void */ public static function withRelationQuery($model, ?string $column, string $query, array $params) @@ -851,8 +825,7 @@ public static function withRelationQuery($model, ?string $column, string $query, /** * Html转义. * - * @param array|string $item - * + * @param array|string $item * @return mixed */ public static function htmlEntityEncode($item) @@ -874,8 +847,7 @@ public static function htmlEntityEncode($item) /** * 格式化表单元素 name 属性. * - * @param string|array $name - * + * @param string|array $name * @return mixed|string */ public static function formatElementName($name) @@ -913,7 +885,7 @@ public static function formatElementName($name) * * @param array|\ArrayAccess $array * @param string $key - * @param mixed $value + * @param mixed $value * @return array */ public static function arraySet(&$array, $key, $value) @@ -953,8 +925,7 @@ public static function arraySet(&$array, $key, $value) /** * 把下划线风格字段名转化为驼峰风格. * - * @param array $array - * + * @param array $array * @return array */ public static function camelArray(array &$array) @@ -973,8 +944,7 @@ public static function camelArray(array &$array) /** * 获取文件名称. * - * @param string $name - * + * @param string $name * @return array|mixed */ public static function basename($name) @@ -987,9 +957,8 @@ public static function basename($name) } /** - * @param string|int $key - * @param array|object $arrayOrObject - * + * @param string|int $key + * @param array|object $arrayOrObject * @return bool */ public static function keyExists($key, $arrayOrObject) diff --git a/src/Support/JavaScript.php b/src/Support/JavaScript.php index 7fe4a1448..a544acbc6 100644 --- a/src/Support/JavaScript.php +++ b/src/Support/JavaScript.php @@ -24,8 +24,7 @@ public function __construct($script) /** * 设置或获取代码内容. * - * @param mixed $script - * + * @param mixed $script * @return mixed */ public function value($script = null) @@ -38,8 +37,7 @@ public function value($script = null) } /** - * @param string|\Closure $script - * + * @param string|\Closure $script * @return string */ public static function make($script) @@ -60,7 +58,7 @@ public static function all() /** * 删除代码. * - * @param string $id + * @param string $id */ public static function delete(string $id) { @@ -70,8 +68,7 @@ public static function delete(string $id) /** * 格式化为js代码. * - * @param array|Arrayable $value - * + * @param array|Arrayable $value * @return string */ public static function format($value) diff --git a/src/Support/Setting.php b/src/Support/Setting.php index 5f5817f4a..3160dd01c 100644 --- a/src/Support/Setting.php +++ b/src/Support/Setting.php @@ -13,9 +13,8 @@ class Setting extends Fluent /** * 获取配置,并转化为数组. * - * @param string $key - * @param mixed $default - * + * @param string $key + * @param mixed $default * @return array */ public function getArray($key, $default = []) @@ -32,9 +31,8 @@ public function getArray($key, $default = []) /** * 获取配置. * - * @param string $key - * @param mixed $default - * + * @param string $key + * @param mixed $default * @return mixed */ public function get($key, $default = null) @@ -45,8 +43,7 @@ public function get($key, $default = null) /** * 设置配置信息. * - * @param array $data - * + * @param array $data * @return $this */ public function set($key, $value = null) @@ -63,10 +60,9 @@ public function set($key, $value = null) /** * 追加数据. * - * @param mixed $key - * @param mixed $value - * @param mixed $k - * + * @param mixed $key + * @param mixed $value + * @param mixed $k * @return $this */ public function add($key, $value, $k = null) @@ -85,9 +81,8 @@ public function add($key, $value, $k = null) /** * 批量追加数据. * - * @param string $key - * @param array $value - * + * @param string $key + * @param array $value * @return $this */ public function addMany($key, array $value) @@ -100,8 +95,7 @@ public function addMany($key, array $value) /** * 保存配置到数据库. * - * @param array $data - * + * @param array $data * @return $this */ public function save(array $data = []) diff --git a/src/Support/Translator.php b/src/Support/Translator.php index 14196517c..3371947ac 100644 --- a/src/Support/Translator.php +++ b/src/Support/Translator.php @@ -26,8 +26,7 @@ public function __construct() /** * 设置翻译文件路径. * - * @param null|string $path - * + * @param null|string $path * @return void */ public function setPath(?string $path) @@ -50,9 +49,8 @@ public function getPath() /** * 翻译字段名称. * - * @param string $field - * @param null $locale - * + * @param string $field + * @param null $locale * @return false|mixed|string|string[] */ public function transField(?string $field, $locale = null) @@ -63,10 +61,9 @@ public function transField(?string $field, $locale = null) /** * 翻译Label. * - * @param null|string $label - * @param array $replace - * @param string $locale - * + * @param null|string $label + * @param array $replace + * @param string $locale * @return array|\Illuminate\Contracts\Translation\Translator|string|null */ public function transLabel(?string $label = null, $replace = [], $locale = null) @@ -79,10 +76,9 @@ public function transLabel(?string $label = null, $replace = [], $locale = null) /** * 翻译. * - * @param string $key - * @param array $replace - * @param string $locale - * + * @param string $key + * @param array $replace + * @param string $locale * @return false|mixed|string|string[] */ public function trans($key, array $replace = [], $locale = null) diff --git a/src/Support/WebUploader.php b/src/Support/WebUploader.php index 416ec2bcf..689eeba1e 100644 --- a/src/Support/WebUploader.php +++ b/src/Support/WebUploader.php @@ -9,10 +9,10 @@ /** * WebUploader文件上传处理. * - * @property string $_id - * @property int $chunk - * @property int $chunks - * @property string $upload_column + * @property string $_id + * @property int $chunk + * @property int $chunks + * @property string $upload_column * @property UploadedFile $file */ class WebUploader @@ -125,8 +125,7 @@ public function deleteTemporaryFile() /** * 合并分块文件. * - * @param UploadedFile $file - * + * @param UploadedFile $file * @return UploadedFile|false */ protected function mergeChunks(UploadedFile $file) @@ -158,9 +157,8 @@ protected function mergeChunks(UploadedFile $file) /** * 判断所有分块是否上传完毕. * - * @param string $tmpDir - * @param string $newFilename - * + * @param string $tmpDir + * @param string $newFilename * @return bool */ protected function isComplete($tmpDir, $newFilename) @@ -177,9 +175,9 @@ protected function isComplete($tmpDir, $newFilename) /** * 移动分块文件到临时目录. * - * @param UploadedFile $file - * @param string $tmpDir - * @param string $newFilename + * @param UploadedFile $file + * @param string $tmpDir + * @param string $newFilename */ protected function moveChunk(UploadedFile $file, $tmpDir, $newFilename) { @@ -187,9 +185,9 @@ protected function moveChunk(UploadedFile $file, $tmpDir, $newFilename) } /** - * @param string $path - * @param string $tmpDir - * @param string $newFilename + * @param string $path + * @param string $tmpDir + * @param string $newFilename */ protected function putTempFileContent($path, $tmpDir, $newFileame) { @@ -219,8 +217,7 @@ protected function putTempFileContent($path, $tmpDir, $newFileame) /** * 生成分块文件名称. * - * @param UploadedFile $file - * + * @param UploadedFile $file * @return string */ protected function generateChunkFileName(UploadedFile $file) @@ -231,8 +228,7 @@ protected function generateChunkFileName(UploadedFile $file) /** * 获取临时文件路径. * - * @param mixed $path - * + * @param mixed $path * @return string */ public function getTemporaryPath($path) diff --git a/src/Support/Zip.php b/src/Support/Zip.php index 1a0b5ca0f..c890bcdb3 100644 --- a/src/Support/Zip.php +++ b/src/Support/Zip.php @@ -57,8 +57,9 @@ class Zip extends ZipArchive /** * Extract an existing zip file. - * @param string $source Path for the existing zip - * @param string $destination Path to extract the zip files + * + * @param string $source Path for the existing zip + * @param string $destination Path to extract the zip files * @param array $options * @return bool */ @@ -83,7 +84,8 @@ public static function extract($source, $destination, $options = []) /** * Creates a new empty zip file. - * @param string $destination Path for the new zip + * + * @param string $destination Path for the new zip * @param mixed $source * @param array $options * @return self @@ -110,8 +112,9 @@ public static function make($destination, $source, $options = []) /** * Includes a source to the Zip. - * @param mixed $source - * @param array $options + * + * @param mixed $source + * @param array $options * @return self */ public function add($source, $options = []) @@ -174,7 +177,8 @@ public function add($source, $options = []) /** * Creates a new folder inside the Zip and adds source files (optional). - * @param string $name Folder name + * + * @param string $name Folder name * @param mixed $source * @return self */ @@ -206,7 +210,8 @@ public function folder($name, $source = null) /** * Removes a file or folder from the zip collection. * Does not support wildcards. - * @param string $source + * + * @param string $source * @return self */ public function remove($source) @@ -237,8 +242,9 @@ public function remove($source) /** * Removes a prefix from a path. - * @param string $prefix /var/sites/ - * @param string $path /var/sites/moo/cow/ + * + * @param string $prefix /var/sites/ + * @param string $path /var/sites/moo/cow/ * @return string moo/cow/ */ protected function removePathPrefix($prefix, $path) diff --git a/src/Support/helpers.php b/src/Support/helpers.php index 9031fe22b..1d698bc9a 100755 --- a/src/Support/helpers.php +++ b/src/Support/helpers.php @@ -11,9 +11,8 @@ /** * 获取或保存配置参数. * - * @param string|array $key - * @param mixed $default - * + * @param string|array $key + * @param mixed $default * @return \Dcat\Admin\Support\Setting|mixed */ function admin_setting($key = null, $default = null) @@ -36,9 +35,8 @@ function admin_setting($key = null, $default = null) /** * 获取配置参数并转化为数组格式. * - * @param string $key - * @param mixed $default - * + * @param string $key + * @param mixed $default * @return \Dcat\Admin\Support\Setting|mixed */ function admin_setting_array(?string $key, $default = []) @@ -51,10 +49,9 @@ function admin_setting_array(?string $key, $default = []) /** * 获取扩展配置参数. * - * @param string $extension - * @param string|array $key - * @param mixed $default - * + * @param string $extension + * @param string|array $key + * @param mixed $default * @return mixed */ function admin_extension_setting($extension, $key = null, $default = null) @@ -71,10 +68,9 @@ function admin_extension_setting($extension, $key = null, $default = null) /** * Get the string contents of a section. * - * @param string $section - * @param mixed $default - * @param array $options - * + * @param string $section + * @param mixed $default + * @param array $options * @return mixed */ function admin_section(string $section, $default = null, array $options = []) @@ -87,8 +83,7 @@ function admin_section(string $section, $default = null, array $options = []) /** * Check if section exists. * - * @param string $section - * + * @param string $section * @return mixed */ function admin_has_section(string $section) @@ -101,10 +96,10 @@ function admin_has_section(string $section) /** * Injecting content into a section. * - * @param string $section - * @param mixed $content - * @param bool $append - * @param int $priority + * @param string $section + * @param mixed $content + * @param bool $append + * @param int $priority */ function admin_inject_section(string $section, $content = null, bool $append = true, int $priority = 10) { @@ -116,11 +111,11 @@ function admin_inject_section(string $section, $content = null, bool $append = t /** * Injecting content into a section. * - * @param mixed $condition - * @param string $section - * @param mixed $content - * @param bool $append - * @param int $priority + * @param mixed $condition + * @param string $section + * @param mixed $content + * @param bool $append + * @param int $priority */ function admin_inject_section_if($condition, $section, $content = null, bool $append = false, int $priority = 10) { @@ -134,8 +129,7 @@ function admin_inject_section_if($condition, $section, $content = null, bool $ap /** * Check if default section exists. * - * @param string $section - * + * @param string $section * @return mixed */ function admin_has_default_section(string $section) @@ -148,8 +142,8 @@ function admin_has_default_section(string $section) /** * Injecting content into a section. * - * @param string $section - * @param string|Renderable|Htmlable|callable $content + * @param string $section + * @param string|Renderable|Htmlable|callable $content */ function admin_inject_default_section(string $section, $content) { @@ -162,8 +156,7 @@ function admin_inject_default_section(string $section, $content) * Translate the field name. * * @param $field - * @param null $locale - * + * @param null $locale * @return array|\Illuminate\Contracts\Translation\Translator|null|string */ function admin_trans_field($field, $locale = null) @@ -177,9 +170,8 @@ function admin_trans_field($field, $locale = null) * Translate the label. * * @param $label - * @param array $replace - * @param null $locale - * + * @param array $replace + * @param null $locale * @return array|\Illuminate\Contracts\Translation\Translator|null|string */ function admin_trans_label($label = null, $replace = [], $locale = null) @@ -193,9 +185,8 @@ function admin_trans_label($label = null, $replace = [], $locale = null) * Translate the field name. * * @param $field - * @param array $replace - * @param null $locale - * + * @param array $replace + * @param null $locale * @return array|\Illuminate\Contracts\Translation\Translator|null|string */ function admin_trans_option($optionValue, $field, $replace = [], $locale = null) @@ -210,10 +201,9 @@ function admin_trans_option($optionValue, $field, $replace = [], $locale = null) /** * Translate the given message. * - * @param string $key - * @param array $replace - * @param string $locale - * + * @param string $key + * @param array $replace + * @param string $locale * @return \Illuminate\Contracts\Translation\Translator|string|array|null */ function admin_trans($key, $replace = [], $locale = null) @@ -252,8 +242,7 @@ function admin_controller_name() /** * Get admin path. * - * @param string $path - * + * @param string $path * @return string */ function admin_path($path = '') @@ -266,10 +255,9 @@ function admin_path($path = '') /** * Get admin url. * - * @param string $path - * @param mixed $parameters - * @param bool $secure - * + * @param string $path + * @param mixed $parameters + * @param bool $secure * @return string */ function admin_url($path = '', $parameters = [], $secure = null) @@ -288,8 +276,7 @@ function admin_url($path = '', $parameters = [], $secure = null) /** * Get admin url. * - * @param string $path - * + * @param string $path * @return string */ function admin_base_path($path = '') @@ -312,9 +299,9 @@ function admin_base_path($path = '') /** * Flash a toastr message bag to session. * - * @param string $message - * @param string $type - * @param array $options + * @param string $message + * @param string $type + * @param array $options */ function admin_toastr($message = '', $type = 'success', $options = []) { @@ -328,8 +315,8 @@ function admin_toastr($message = '', $type = 'success', $options = []) /** * Flash a success message bag to session. * - * @param string $title - * @param string $message + * @param string $title + * @param string $message */ function admin_success($title, $message = '') { @@ -341,8 +328,8 @@ function admin_success($title, $message = '') /** * Flash a error message bag to session. * - * @param string $title - * @param string $message + * @param string $title + * @param string $message */ function admin_error($title, $message = '') { @@ -354,8 +341,8 @@ function admin_error($title, $message = '') /** * Flash a warning message bag to session. * - * @param string $title - * @param string $message + * @param string $title + * @param string $message */ function admin_warning($title, $message = '') { @@ -367,9 +354,9 @@ function admin_warning($title, $message = '') /** * Flash a message bag to session. * - * @param string $title - * @param string $message - * @param string $type + * @param string $title + * @param string $message + * @param string $type */ function admin_info($title, $message = '', $type = 'info') { @@ -382,7 +369,6 @@ function admin_info($title, $message = '', $type = 'info') if (! function_exists('admin_asset')) { /** * @param $path - * * @return string */ function admin_asset($path) @@ -395,10 +381,9 @@ function admin_asset($path) /** * 根据路由别名获取url. * - * @param string|null $route - * @param array $params - * @param bool $absolute - * + * @param string|null $route + * @param array $params + * @param bool $absolute * @return string */ function admin_route(?string $route, array $params = [], $absolute = true) @@ -411,8 +396,7 @@ function admin_route(?string $route, array $params = [], $absolute = true) /** * 获取路由别名. * - * @param string|null $route - * + * @param string|null $route * @return string */ function admin_route_name(?string $route) @@ -425,8 +409,7 @@ function admin_route_name(?string $route) /** * 获取api的路由别名. * - * @param string $route - * + * @param string $route * @return string */ function admin_api_route_name(?string $route = '') @@ -437,8 +420,7 @@ function admin_api_route_name(?string $route = '') if (! function_exists('admin_extension_path')) { /** - * @param string|null $path - * + * @param string|null $path * @return string */ function admin_extension_path(?string $path = null) @@ -453,8 +435,7 @@ function admin_extension_path(?string $path = null) if (! function_exists('admin_color')) { /** - * @param string|null $color - * + * @param string|null $color * @return string|\Dcat\Admin\Color */ function admin_color(?string $color = null) @@ -469,9 +450,8 @@ function admin_color(?string $color = null) if (! function_exists('admin_view')) { /** - * @param string $view - * @param array $data - * + * @param string $view + * @param array $data * @return string * * @throws \Throwable @@ -484,9 +464,8 @@ function admin_view($view, array $data = []) if (! function_exists('admin_script')) { /** - * @param string $js - * @param bool $direct - * + * @param string $js + * @param bool $direct * @return void */ function admin_script($script, bool $direct = false) @@ -497,8 +476,7 @@ function admin_script($script, bool $direct = false) if (! function_exists('admin_style')) { /** - * @param string $style - * + * @param string $style * @return void */ function admin_style($style) @@ -509,8 +487,7 @@ function admin_style($style) if (! function_exists('admin_js')) { /** - * @param string|array $js - * + * @param string|array $js * @return void */ function admin_js($js) @@ -521,8 +498,7 @@ function admin_js($js) if (! function_exists('admin_css')) { /** - * @param string|array $css - * + * @param string|array $css * @return void */ function admin_css($css) @@ -533,8 +509,7 @@ function admin_css($css) if (! function_exists('admin_require_assets')) { /** - * @param string|array $asset - * + * @param string|array $asset * @return void */ function admin_require_assets($asset) @@ -547,8 +522,7 @@ function admin_require_assets($asset) /** * 暂存JS代码,并使用唯一字符串代替. * - * @param string $scripts - * + * @param string $scripts * @return string */ function admin_javascript(string $scripts) @@ -559,8 +533,7 @@ function admin_javascript(string $scripts) if (! function_exists('admin_javascript_json')) { /** - * @param array|object $data - * + * @param array|object $data * @return string */ function admin_javascript_json($data) @@ -573,7 +546,7 @@ function admin_javascript_json($data) /** * 响应数据并中断后续逻辑. * - * @param Response|string|array $response + * @param Response|string|array $response * * @throws \Illuminate\Http\Exceptions\HttpResponseException */ diff --git a/src/Traits/HasAssets.php b/src/Traits/HasAssets.php index 59c78a1dd..8f601697d 100755 --- a/src/Traits/HasAssets.php +++ b/src/Traits/HasAssets.php @@ -13,9 +13,8 @@ public static function asset() } /** - * @param string|array $name - * @param array $params - * + * @param string|array $name + * @param array $params * @return void */ public static function requireAssets($name, array $params = []) @@ -26,8 +25,7 @@ public static function requireAssets($name, array $params = []) /** * Add css. * - * @param string|array $css - * + * @param string|array $css * @return void */ public static function css($css) @@ -38,8 +36,8 @@ public static function css($css) /** * Set base css. * - * @param array $css - * @param bool $merge + * @param array $css + * @param bool $merge */ public static function baseCss(array $css, bool $merge = true) { @@ -49,8 +47,7 @@ public static function baseCss(array $css, bool $merge = true) /** * Add js. * - * @param string|array $js - * + * @param string|array $js * @return void */ public static function js($js) @@ -61,9 +58,8 @@ public static function js($js) /** * Add js. * - * @param string|array $js - * @param bool $merge - * + * @param string|array $js + * @param bool $merge * @return void */ public static function headerJs($js, bool $merge = true) @@ -74,8 +70,8 @@ public static function headerJs($js, bool $merge = true) /** * Set base js. * - * @param array $js - * @param bool $merge + * @param array $js + * @param bool $merge */ public static function baseJs(array $js, bool $merge = true) { @@ -83,9 +79,8 @@ public static function baseJs(array $js, bool $merge = true) } /** - * @param string $script - * @param bool $direct - * + * @param string $script + * @param bool $direct * @return void */ public static function script($script, bool $direct = false) @@ -94,8 +89,7 @@ public static function script($script, bool $direct = false) } /** - * @param string $style - * + * @param string $style * @return void */ public static function style($style) @@ -104,8 +98,7 @@ public static function style($style) } /** - * @param string|array $font - * + * @param string|array $font * @return void */ public static function fonts($font) diff --git a/src/Traits/HasAuthorization.php b/src/Traits/HasAuthorization.php index 64b2e8dd0..b59ed15fc 100644 --- a/src/Traits/HasAuthorization.php +++ b/src/Traits/HasAuthorization.php @@ -21,8 +21,7 @@ public function passesAuthorization(): bool /** * 是否有权限判断. * - * @param Model|Authenticatable|HasPermissions|null $user - * + * @param Model|Authenticatable|HasPermissions|null $user * @return bool */ protected function authorize($user): bool diff --git a/src/Traits/HasFormResponse.php b/src/Traits/HasFormResponse.php index b93b9ac94..7d75ff4e6 100644 --- a/src/Traits/HasFormResponse.php +++ b/src/Traits/HasFormResponse.php @@ -22,8 +22,7 @@ public function response() /** * 返回字段验证错误信息. * - * @param array|MessageBag|\Illuminate\Validation\Validator $validationMessages - * + * @param array|MessageBag|\Illuminate\Validation\Validator $validationMessages * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse */ public function validationErrorsResponse($validationMessages) @@ -37,8 +36,7 @@ public function validationErrorsResponse($validationMessages) /** * 设置当前URL. * - * @param string $url - * + * @param string $url * @return $this */ public function setCurrentUrl($url) @@ -51,9 +49,8 @@ public function setCurrentUrl($url) /** * 获取当前URL. * - * @param string|null $default - * @param Request|null $request - * + * @param string|null $default + * @param Request|null $request * @return string */ protected function getCurrentUrl($default = null, Request $request = null) @@ -86,7 +83,6 @@ protected function getCurrentUrl($default = null, Request $request = null) * 响应数据. * * @param $response - * * @return \Illuminate\Http\JsonResponse */ protected function sendResponse($response) diff --git a/src/Traits/HasHtml.php b/src/Traits/HasHtml.php index 6defb23e8..3331684a0 100644 --- a/src/Traits/HasHtml.php +++ b/src/Traits/HasHtml.php @@ -11,8 +11,7 @@ trait HasHtml protected static $shouldResolveTags = ['style', 'script', 'template', 'link']; /** - * @param string|array $content - * + * @param string|array $content * @return null|string */ public static function html($content = null) @@ -30,10 +29,9 @@ public static function html($content = null) } /** - * @param string $view - * @param array $data - * @param array $data - * + * @param string $view + * @param array $data + * @param array $data * @return string * * @throws \Throwable @@ -44,13 +42,12 @@ public static function view(string $view, array $data = [], array $options = []) } /** - * @param string|\Illuminate\Contracts\Support\Renderable $content - * @param array $data - * @param array $options + * @param string|\Illuminate\Contracts\Support\Renderable $content + * @param array $data + * @param array $options + * @return array ['html' => $html, 'script' => $script] * * @throws \Throwable - * - * @return array ['html' => $html, 'script' => $script] */ public static function resolveHtml($content, array $options = []): array { @@ -72,11 +69,10 @@ public static function resolveHtml($content, array $options = []): array } /** - * @param string $html + * @param string $html + * @return DOMDocument * * @throws \Throwable - * - * @return DOMDocument */ protected static function getDOMDocument(string $html) { @@ -92,8 +88,7 @@ protected static function getDOMDocument(string $html) } /** - * @param DOMElement $element - * + * @param DOMElement $element * @return void|string */ protected static function resolve(DOMElement $element) @@ -104,8 +99,7 @@ protected static function resolve(DOMElement $element) } /** - * @param DOMElement $element - * + * @param DOMElement $element * @return void */ protected static function resolveLink(DOMElement $element) @@ -116,8 +110,7 @@ protected static function resolveLink(DOMElement $element) } /** - * @param DOMElement $element - * + * @param DOMElement $element * @return void */ protected static function resolveTemplate(DOMElement $element) @@ -131,8 +124,7 @@ protected static function resolveTemplate(DOMElement $element) } /** - * @param DOMElement $element - * + * @param DOMElement $element * @return string|void */ protected static function resolveScript(DOMElement $element) @@ -165,8 +157,7 @@ protected static function resolveScript(DOMElement $element) } /** - * @param DOMElement $element - * + * @param DOMElement $element * @return void */ protected static function resolveStyle(DOMElement $element) diff --git a/src/Traits/HasPermissions.php b/src/Traits/HasPermissions.php index 968b0d8bc..e0f3fe566 100644 --- a/src/Traits/HasPermissions.php +++ b/src/Traits/HasPermissions.php @@ -32,7 +32,6 @@ public function allPermissions(): Collection * Check if user has permission. * * @param $ability - * * @return bool */ public function can($ability): bool @@ -57,7 +56,6 @@ public function can($ability): bool * Check if user has no permission. * * @param $permission - * * @return bool */ public function cannot(string $permission): bool @@ -80,8 +78,7 @@ public function isAdministrator(): bool /** * Check if user is $role. * - * @param string $role - * + * @param string $role * @return mixed */ public function isRole(string $role): bool @@ -96,8 +93,7 @@ public function isRole(string $role): bool /** * Check if user in $roles. * - * @param string|array|Arrayable $roles - * + * @param string|array|Arrayable $roles * @return mixed */ public function inRoles($roles = []): bool @@ -115,7 +111,6 @@ public function inRoles($roles = []): bool * If visible for roles. * * @param $roles - * * @return bool */ public function visible($roles = []): bool diff --git a/src/Traits/HasUploadedFile.php b/src/Traits/HasUploadedFile.php index 291797d73..6f70125cb 100644 --- a/src/Traits/HasUploadedFile.php +++ b/src/Traits/HasUploadedFile.php @@ -34,8 +34,7 @@ public function file() /** * 获取文件管理仓库. * - * @param string|null $disk - * + * @param string|null $disk * @return \Illuminate\Contracts\Filesystem\Filesystem|FilesystemAdapter */ public function disk(string $disk = null) @@ -56,9 +55,8 @@ public function isDeleteRequest() /** * 删除文件. * - * @param \Illuminate\Contracts\Filesystem\Filesystem|FilesystemAdapter $disk - * @param string|null $path - * + * @param \Illuminate\Contracts\Filesystem\Filesystem|FilesystemAdapter $disk + * @param string|null $path * @return bool */ public function deleteFile($disk = null, $path = null) @@ -71,9 +69,8 @@ public function deleteFile($disk = null, $path = null) /** * 删除文件并响应返回值. * - * @param \Illuminate\Contracts\Filesystem\Filesystem|FilesystemAdapter $disk + * @param \Illuminate\Contracts\Filesystem\Filesystem|FilesystemAdapter $disk * @param string|null - * * @return \Illuminate\Http\JsonResponse */ public function deleteFileAndResponse($disk = null, $path = null) @@ -86,9 +83,8 @@ public function deleteFileAndResponse($disk = null, $path = null) /** * 响应上传成功信息. * - * @param string $path 文件完整路径 - * @param string $url - * + * @param string $path 文件完整路径 + * @param string $url * @return mixed */ public function responseUploaded(string $path, string $url) @@ -104,8 +100,7 @@ public function responseUploaded(string $path, string $url) /** * 响应验证失败信息. * - * @param mixed $message - * + * @param mixed $message * @return mixed */ public function responseValidationMessage($message) @@ -118,7 +113,6 @@ public function responseValidationMessage($message) * * @param $error * @param $code - * * @return mixed */ public function responseErrorMessage($error) @@ -139,8 +133,7 @@ public function responseDeleted() /** * 文件删除失败. * - * @param string $message - * + * @param string $message * @return \Illuminate\Http\JsonResponse */ public function responseDeleteFailed($message = '') diff --git a/src/Traits/HasVariables.php b/src/Traits/HasVariables.php index a026dcfdc..4de2db5d7 100644 --- a/src/Traits/HasVariables.php +++ b/src/Traits/HasVariables.php @@ -26,8 +26,7 @@ public function variables() /** * 设置变量. * - * @param array $variables - * + * @param array $variables * @return $this */ public function addVariables(array $variables = []) diff --git a/src/Traits/InteractsWithApi.php b/src/Traits/InteractsWithApi.php index fd91d3ec1..daec6adba 100644 --- a/src/Traits/InteractsWithApi.php +++ b/src/Traits/InteractsWithApi.php @@ -62,10 +62,9 @@ public function parameters(): array /** * 设置请求地址. * - * @param string $method - * @param string $url - * @param array $query - * + * @param string $method + * @param string $url + * @param array $query * @return $this */ public function request(string $method, string $url, array $query = []) @@ -119,8 +118,7 @@ public function getRequestScripts() /** * 设置点击抓取数据的按钮的css选择器. * - * @param string|array $selector - * + * @param string|array $selector * @return $this */ public function click($selector) @@ -142,8 +140,7 @@ public function getRequestSelectors() /** * 设置抓取数据时执行的js代码. * - * @param string|\Closure $script - * + * @param string|\Closure $script * @return $this */ public function fetching($script) @@ -156,8 +153,7 @@ public function fetching($script) /** * 设置抓取完数据后执行的js代码. * - * @param string|\Closure $script - * + * @param string|\Closure $script * @return $this */ public function fetched($script) @@ -266,8 +262,7 @@ private function buildBindingScript() /** * 合并. * - * @param static $self - * + * @param static $self * @return $this */ public function merge($self) diff --git a/src/Traits/InteractsWithRenderApi.php b/src/Traits/InteractsWithRenderApi.php index 3b1b13b0e..22adb0af0 100644 --- a/src/Traits/InteractsWithRenderApi.php +++ b/src/Traits/InteractsWithRenderApi.php @@ -22,8 +22,7 @@ trait InteractsWithRenderApi /** * 监听异步渲染完成事件. * - * @param string $script - * + * @param string $script * @return $this */ public function onLoad(string $script) diff --git a/src/Traits/ModelTree.php b/src/Traits/ModelTree.php index 493a83566..eadfa4183 100755 --- a/src/Traits/ModelTree.php +++ b/src/Traits/ModelTree.php @@ -16,7 +16,7 @@ * @property string $titleColumn * @property string $orderColumn * @property string $defaultParentId - * @property array $sortable + * @property array $sortable */ trait ModelTree { @@ -71,8 +71,7 @@ public function getDefaultParentId() /** * Set query callback to model. * - * @param \Closure|null $query - * + * @param \Closure|null $query * @return $this */ public function withQuery(\Closure $query = null) @@ -114,8 +113,7 @@ public function allNodes() } /** - * @param $this $model - * + * @param $this $model * @return $this|Builder */ protected function callQueryCallbacks($model) @@ -132,8 +130,7 @@ protected function callQueryCallbacks($model) /** * Set the order of branches in the tree. * - * @param array $order - * + * @param array $order * @return void */ protected static function setBranchOrder(array $order) @@ -148,8 +145,8 @@ protected static function setBranchOrder(array $order) /** * Save tree order from a tree like array. * - * @param array $tree - * @param int $parentId + * @param array $tree + * @param int $parentId */ public static function saveOrder($tree = [], $parentId = 0) { @@ -273,9 +270,8 @@ public function moveToStart() /** * Get options for Select field in form. * - * @param \Closure|null $closure - * @param string $rootText - * + * @param \Closure|null $closure + * @param string $rootText * @return array */ public static function selectOptions(\Closure $closure = null, $rootText = null) @@ -290,11 +286,10 @@ public static function selectOptions(\Closure $closure = null, $rootText = null) /** * Build options of select field in form. * - * @param array $nodes - * @param int $parentId - * @param string $prefix - * @param string $space - * + * @param array $nodes + * @param int $parentId + * @param string $prefix + * @param string $space * @return array */ protected function buildSelectOptions(array $nodes = [], $parentId = 0, $prefix = '', $space = ' ') diff --git a/src/Traits/Resizable.php b/src/Traits/Resizable.php index 64c494ff4..7409b7d8b 100644 --- a/src/Traits/Resizable.php +++ b/src/Traits/Resizable.php @@ -9,9 +9,8 @@ trait Resizable /** * Method for returning specific thumbnail for model. * - * @param string $type - * @param string $attribute - * + * @param string $type + * @param string $attribute * @return string|null */ public function thumbnail($type, $attribute = 'image', $disk = null) @@ -34,7 +33,6 @@ public function thumbnail($type, $attribute = 'image', $disk = null) * * @param $image * @param $type - * * @return string */ public function getThumbnailPath($image, $type) diff --git a/src/Tree.php b/src/Tree.php index 326476555..28b0c3379 100755 --- a/src/Tree.php +++ b/src/Tree.php @@ -144,7 +144,7 @@ class Tree implements Renderable /** * Menu constructor. * - * @param Model|TreeRepository|string|null $model + * @param Model|TreeRepository|string|null $model */ public function __construct($repository = null, ?\Closure $callback = null) { @@ -173,7 +173,6 @@ public function setUpTools() /** * @param $repository - * * @return TreeRepository */ public function makeRepository($repository) @@ -215,8 +214,7 @@ protected function setDefaultBranchCallback() /** * Set branch callback. * - * @param \Closure $branchCallback - * + * @param \Closure $branchCallback * @return $this */ public function branch(\Closure $branchCallback) @@ -243,8 +241,7 @@ public function query(\Closure $callback) * * @see https://github.com/dbushell/Nestable * - * @param int $max - * + * @param int $max * @return $this */ public function maxDepth(int $max) @@ -255,8 +252,7 @@ public function maxDepth(int $max) /** * Set nestable options. * - * @param array $options - * + * @param array $options * @return $this */ public function nestable($options = []) @@ -267,8 +263,7 @@ public function nestable($options = []) } /** - * @param bool $value - * + * @param bool $value * @return void */ public function expand(bool $value = true) @@ -279,8 +274,7 @@ public function expand(bool $value = true) /** * Disable create. * - * @param bool $value - * + * @param bool $value * @return void */ public function disableCreateButton(bool $value = true) @@ -304,9 +298,8 @@ public function showQuickCreateButton(bool $value = true) } /** - * @param string $width - * @param string $height - * + * @param string $width + * @param string $height * @return $this */ public function setDialogFormDimensions(string $width, string $height) @@ -319,8 +312,7 @@ public function setDialogFormDimensions(string $width, string $height) /** * Disable save. * - * @param bool $value - * + * @param bool $value * @return void */ public function disableSaveButton(bool $value = true) @@ -336,8 +328,7 @@ public function showSaveButton(bool $value = true) /** * Disable refresh. * - * @param bool $value - * + * @param bool $value * @return void */ public function disableRefreshButton(bool $value = true) @@ -387,8 +378,7 @@ public function showDeleteButton(bool $value = true) } /** - * @param Closure $closure - * + * @param Closure $closure * @return $this; */ public function wrap(\Closure $closure) @@ -409,8 +399,7 @@ public function hasWrapper() /** * Save tree order from a input. * - * @param string $serialize - * + * @param string $serialize * @return bool */ public function saveOrder($serialize) @@ -429,8 +418,7 @@ public function saveOrder($serialize) /** * Set view of tree. * - * @param string $view - * + * @param string $view * @return $this */ public function view($view) @@ -441,8 +429,7 @@ public function view($view) } /** - * @param string $view - * + * @param string $view * @return $this */ public function branchView($view) @@ -481,8 +468,7 @@ protected function callActionCallbacks(Actions $actions) /** * 自定义行操作类. * - * @param string $actionClass - * + * @param string $actionClass * @return $this */ public function setActionClass(string $actionClass) @@ -495,8 +481,7 @@ public function setActionClass(string $actionClass) /** * 设置行操作回调. * - * @param \Closure|array $callback - * + * @param \Closure|array $callback * @return $this */ public function actions($callback) @@ -521,7 +506,7 @@ public function actions($callback) /** * Return all items of the tree. * - * @param array $items + * @param array $items */ public function getItems() { @@ -570,8 +555,7 @@ public function resource() /** * Set resource path. * - * @param string $path - * + * @param string $path * @return $this */ public function setResource($path) @@ -584,8 +568,7 @@ public function setResource($path) /** * Setup tools. * - * @param Closure|array|AbstractTool|Renderable|Htmlable|string $callback - * + * @param Closure|array|AbstractTool|Renderable|Htmlable|string $callback * @return $this|Tools */ public function tools($callback = null) @@ -703,8 +686,7 @@ public function __toString() /** * Create a tree instance. * - * @param mixed ...$param - * + * @param mixed ...$param * @return $this */ public static function make(...$param) diff --git a/src/Tree/AbstractTool.php b/src/Tree/AbstractTool.php index e6ed39943..5d48ad0bf 100644 --- a/src/Tree/AbstractTool.php +++ b/src/Tree/AbstractTool.php @@ -18,8 +18,7 @@ abstract class AbstractTool extends Action protected $style = 'btn btn-sm btn-primary'; /** - * @param Tree $parent - * + * @param Tree $parent * @return void */ public function setParent(Tree $parent) diff --git a/src/Tree/Actions.php b/src/Tree/Actions.php index 6fa7092da..b08cc6aed 100644 --- a/src/Tree/Actions.php +++ b/src/Tree/Actions.php @@ -47,8 +47,7 @@ class Actions implements Renderable ]; /** - * @param string|Renderable|\Dcat\Admin\Actions\Action|\Illuminate\Contracts\Support\Htmlable $action - * + * @param string|Renderable|\Dcat\Admin\Actions\Action|\Illuminate\Contracts\Support\Htmlable $action * @return $this */ public function append($action) @@ -61,8 +60,7 @@ public function append($action) } /** - * @param string|Renderable|\Dcat\Admin\Actions\Action|\Illuminate\Contracts\Support\Htmlable $action - * + * @param string|Renderable|\Dcat\Admin\Actions\Action|\Illuminate\Contracts\Support\Htmlable $action * @return $this */ public function prepend($action) diff --git a/src/Tree/Tools.php b/src/Tree/Tools.php index 6552230b3..93fa50ca5 100755 --- a/src/Tree/Tools.php +++ b/src/Tree/Tools.php @@ -36,8 +36,7 @@ public function __construct(Tree $tree) /** * Prepend a tool. * - * @param string|\Closure|AbstractTool|Renderable|Htmlable $tool - * + * @param string|\Closure|AbstractTool|Renderable|Htmlable $tool * @return $this */ public function add($tool) diff --git a/src/Widgets/Alert.php b/src/Widgets/Alert.php index 84184db43..251bdcfe8 100755 --- a/src/Widgets/Alert.php +++ b/src/Widgets/Alert.php @@ -25,8 +25,7 @@ public function __construct($content = '', $title = null, $style = 'danger') /** * Set title. * - * @param string $title - * + * @param string $title * @return $this */ public function title($title) @@ -39,8 +38,7 @@ public function title($title) /** * Set contents. * - * @param string|\Closure|Renderable $content - * + * @param string|\Closure|Renderable $content * @return $this */ public function content($content) @@ -98,8 +96,7 @@ public function danger() /** * Show close button. * - * @param bool $value - * + * @param bool $value * @return $this */ public function removable(bool $value = true) @@ -112,8 +109,7 @@ public function removable(bool $value = true) /** * Add style. * - * @param string $style - * + * @param string $style * @return $this */ public function style($style = 'info') @@ -126,8 +122,7 @@ public function style($style = 'info') /** * Add icon. * - * @param string $icon - * + * @param string $icon * @return $this */ public function icon($icon) diff --git a/src/Widgets/ApexCharts/Chart.php b/src/Widgets/ApexCharts/Chart.php index c7e71a274..0adeaf7a0 100644 --- a/src/Widgets/ApexCharts/Chart.php +++ b/src/Widgets/ApexCharts/Chart.php @@ -41,8 +41,7 @@ public function __construct($selector = null, $options = []) /** * 设置或获取图表容器选择器. * - * @param string|null $selector - * + * @param string|null $selector * @return $this|string|null */ public function selector(?string $selector = null) @@ -61,8 +60,7 @@ public function selector(?string $selector = null) } /** - * @param string|array $title - * + * @param string|array $title * @return $this */ public function title($title) @@ -79,8 +77,7 @@ public function title($title) } /** - * @param array $series - * + * @param array $series * @return $this */ public function series($series) @@ -91,8 +88,7 @@ public function series($series) } /** - * @param array $value - * + * @param array $value * @return $this */ public function labels($value) @@ -103,8 +99,7 @@ public function labels($value) } /** - * @param string|array $colors - * + * @param string|array $colors * @return $this */ public function colors($colors) @@ -115,8 +110,7 @@ public function colors($colors) } /** - * @param array $value - * + * @param array $value * @return $this */ public function stroke($value) @@ -127,8 +121,7 @@ public function stroke($value) } /** - * @param array $value - * + * @param array $value * @return $this */ public function xaxis($value) @@ -139,8 +132,7 @@ public function xaxis($value) } /** - * @param array $value - * + * @param array $value * @return $this */ public function tooltip($value) @@ -151,8 +143,7 @@ public function tooltip($value) } /** - * @param array $value - * + * @param array $value * @return $this */ public function yaxis($value) @@ -163,8 +154,7 @@ public function yaxis($value) } /** - * @param array $value - * + * @param array $value * @return $this */ public function fill($value) @@ -175,8 +165,7 @@ public function fill($value) } /** - * @param array $value - * + * @param array $value * @return $this */ public function chart($value) @@ -187,8 +176,7 @@ public function chart($value) } /** - * @param array|bool $value - * + * @param array|bool $value * @return $this */ public function dataLabels($value) diff --git a/src/Widgets/Box.php b/src/Widgets/Box.php index 61b912274..7e9c7a2f1 100755 --- a/src/Widgets/Box.php +++ b/src/Widgets/Box.php @@ -29,7 +29,7 @@ public function __construct($title = '', $content = '') /** * Set content padding. * - * @param string $padding + * @param string $padding */ public function padding(string $padding) { @@ -41,8 +41,7 @@ public function padding(string $padding) /** * Set box content. * - * @param string $content - * + * @param string $content * @return $this */ public function content($content) @@ -59,8 +58,7 @@ public function content($content) /** * Set box title. * - * @param string $title - * + * @param string $title * @return $this */ public function title($title) @@ -99,8 +97,7 @@ public function removable() /** * Set box style. * - * @param string $styles - * + * @param string $styles * @return $this|Box */ public function style($styles) @@ -115,8 +112,7 @@ public function style($styles) } /** - * @param string|Renderable|\Closure $content - * + * @param string|Renderable|\Closure $content * @return $this */ public function tool($content) diff --git a/src/Widgets/Callout.php b/src/Widgets/Callout.php index 309f2b18d..68c4fc49f 100644 --- a/src/Widgets/Callout.php +++ b/src/Widgets/Callout.php @@ -22,8 +22,7 @@ public function __construct($content = '', ?string $title = null, ?string $style /** * Set title. * - * @param string $title - * + * @param string $title * @return $this */ public function title(?string $title) @@ -36,8 +35,7 @@ public function title(?string $title) /** * Set contents. * - * @param string|\Closure|Renderable $content - * + * @param string|\Closure|Renderable $content * @return $this */ public function content($content) @@ -110,8 +108,7 @@ public function danger() /** * Show close button. * - * @param bool $value - * + * @param bool $value * @return $this */ public function removable(bool $value = true) @@ -124,8 +121,7 @@ public function removable(bool $value = true) /** * Add style. * - * @param string $style - * + * @param string $style * @return $this */ public function style(?string $style = 'info') diff --git a/src/Widgets/Card.php b/src/Widgets/Card.php index c1fd671a1..36cda0ef0 100755 --- a/src/Widgets/Card.php +++ b/src/Widgets/Card.php @@ -44,7 +44,7 @@ public function withHeaderBorder() /** * 设置卡片间距. * - * @param string $padding + * @param string $padding */ public function padding(string $padding) { @@ -59,8 +59,7 @@ public function noPadding() } /** - * @param string|\Closure|Renderable|LazyWidget $content - * + * @param string|\Closure|Renderable|LazyWidget $content * @return $this */ public function content($content) @@ -75,8 +74,7 @@ public function content($content) } /** - * @param string $content - * + * @param string $content * @return $this */ public function footer($content) @@ -87,8 +85,7 @@ public function footer($content) } /** - * @param string $title - * + * @param string $title * @return $this */ public function title($title) @@ -99,8 +96,7 @@ public function title($title) } /** - * @param string|Renderable|\Closure $content - * + * @param string|Renderable|\Closure $content * @return $this */ public function tool($content) diff --git a/src/Widgets/Checkbox.php b/src/Widgets/Checkbox.php index 764e0f572..f3d7cafd4 100755 --- a/src/Widgets/Checkbox.php +++ b/src/Widgets/Checkbox.php @@ -14,8 +14,7 @@ class Checkbox extends Radio /** * 设置选中的的选项. * - * @param string|array $options - * + * @param string|array $options * @return $this */ public function check($options) @@ -28,8 +27,7 @@ public function check($options) /** * 选中所有选项. * - * @param string|array $excepts - * + * @param string|array $excepts * @return $this */ public function checkAll($excepts = []) diff --git a/src/Widgets/Code.php b/src/Widgets/Code.php index ff74e2e87..710096e51 100755 --- a/src/Widgets/Code.php +++ b/src/Widgets/Code.php @@ -10,9 +10,9 @@ class Code extends Markdown protected $lang = 'php'; /** - * @param string $content - * @param int $start - * @param int $end + * @param string $content + * @param int $start + * @param int $end */ public function __construct($content = '', int $start = 1, int $end = 1000) { @@ -29,8 +29,7 @@ public function __construct($content = '', int $start = 1, int $end = 1000) /** * 设置语言. * - * @param string $lang - * + * @param string $lang * @return $this */ public function lang(string $lang) @@ -63,10 +62,9 @@ public function python() /** * 读取指定行上下区间文件内容. * - * @param string $file - * @param int $lineNumber - * @param int $padding - * + * @param string $file + * @param int $lineNumber + * @param int $padding * @return $this */ public function section($file, $lineNumber = 1, $context = 5) @@ -77,10 +75,9 @@ public function section($file, $lineNumber = 1, $context = 5) /** * 读取指定行文件内容. * - * @param string $file - * @param int $start - * @param int $end - * + * @param string $file + * @param int $start + * @param int $end * @return $this */ public function readFileContent($file, $start = 1, $end = 10) diff --git a/src/Widgets/DialogForm.php b/src/Widgets/DialogForm.php index f82ecf541..738b7bb2e 100644 --- a/src/Widgets/DialogForm.php +++ b/src/Widgets/DialogForm.php @@ -48,8 +48,7 @@ public function __construct(?string $title = null, $url = null) } /** - * @param array $options - * + * @param array $options * @return $this */ public function options($options = []) @@ -66,8 +65,7 @@ public function options($options = []) /** * 设置弹窗标题. * - * @param string $title - * + * @param string $title * @return $this */ public function title(?string $title) @@ -80,8 +78,7 @@ public function title(?string $title) /** * 绑定点击按钮. * - * @param string $buttonSelector - * + * @param string $buttonSelector * @return $this */ public function click(string $buttonSelector) @@ -106,8 +103,7 @@ public function forceRefresh() /** * 重置按钮. * - * @param bool $value - * + * @param bool $value * @return $this */ public function resetButton(bool $value = true) @@ -120,8 +116,7 @@ public function resetButton(bool $value = true) /** * 保存后触发的js的代码(不论成功还是失败). * - * @param string $script - * + * @param string $script * @return $this */ public function saved(string $script) @@ -134,8 +129,7 @@ public function saved(string $script) /** * 保存失败时触发的js代码 * - * @param string $script - * + * @param string $script * @return $this */ public function error(string $script) @@ -148,8 +142,7 @@ public function error(string $script) /** * 保存成功后触发的js代码 * - * @param string $script - * + * @param string $script * @return $this */ public function success(string $script) @@ -163,9 +156,8 @@ public function success(string $script) * 设置弹窗宽高 * 支持百分比和"px". * - * @param string $width - * @param string $height - * + * @param string $width + * @param string $height * @return $this */ public function dimensions(string $width, string $height) @@ -179,8 +171,7 @@ public function dimensions(string $width, string $height) * 设置弹窗宽度 * 支持百分比和"px". * - * @param string|null $width - * + * @param string|null $width * @return $this */ public function width(?string $width) @@ -194,8 +185,7 @@ public function width(?string $width) * 设置弹窗高度 * 支持百分比和"px". * - * @param string|null $height - * + * @param string|null $height * @return $this */ public function height(?string $height) @@ -208,8 +198,7 @@ public function height(?string $height) /** * 设置默认的表单页面url. * - * @param null|string $url - * + * @param null|string $url * @return $this */ public function url(?string $url) @@ -280,7 +269,7 @@ public static function is() } /** - * @param Form $form + * @param Form $form */ public static function prepare(Form $form) { diff --git a/src/Widgets/DialogTable.php b/src/Widgets/DialogTable.php index 2959d725d..596f589aa 100644 --- a/src/Widgets/DialogTable.php +++ b/src/Widgets/DialogTable.php @@ -58,8 +58,7 @@ public function __construct($title = null, LazyRenderable $table = null) /** * 设置异步表格实例. * - * @param LazyRenderable|null $renderable - * + * @param LazyRenderable|null $renderable * @return $this */ public function from(?LazyRenderable $renderable) @@ -76,8 +75,7 @@ public function from(?LazyRenderable $renderable) /** * 设置弹窗标题. * - * @param string $title - * + * @param string $title * @return $this */ public function title($title) @@ -94,8 +92,7 @@ public function title($title) * $this->width('500px'); * $this->width('50%'); * - * @param string $width - * + * @param string $width * @return $this */ public function width($width) @@ -108,8 +105,7 @@ public function width($width) /** * 设置点击按钮HTML. * - * @param string|\Closure|Renderable $button - * + * @param string|\Closure|Renderable $button * @return $this */ public function button($button) @@ -122,8 +118,7 @@ public function button($button) /** * 监听弹窗打开事件. * - * @param string $script - * + * @param string $script * @return $this */ public function onShown(string $script) @@ -136,8 +131,7 @@ public function onShown(string $script) /** * 监听弹窗隐藏事件. * - * @param string $script - * + * @param string $script * @return $this */ public function onHidden(string $script) @@ -150,8 +144,7 @@ public function onHidden(string $script) /** * 监听表格加载完毕事件. * - * @param string $script - * + * @param string $script * @return $this */ public function onLoad(string $script) @@ -164,8 +157,7 @@ public function onLoad(string $script) /** * 设置弹窗底部内容. * - * @param string|\Closure|Renderable $footer - * + * @param string|\Closure|Renderable $footer * @return $this */ public function footer($footer) diff --git a/src/Widgets/Dropdown.php b/src/Widgets/Dropdown.php index cdb65c717..9be0e7b80 100644 --- a/src/Widgets/Dropdown.php +++ b/src/Widgets/Dropdown.php @@ -58,9 +58,8 @@ public function __construct(array $options = []) /** * Set the options of dropdown menus. * - * @param array $options - * @param string|null $title - * + * @param array $options + * @param string|null $title * @return $this */ public function options($options = [], ?string $title = null) @@ -77,8 +76,7 @@ public function options($options = [], ?string $title = null) /** * Set the button text. * - * @param string|null $text - * + * @param string|null $text * @return $this */ public function button(?string $text) @@ -91,8 +89,7 @@ public function button(?string $text) /** * Set the button class. * - * @param string $class - * + * @param string $class * @return $this */ public function buttonClass(?string $class) @@ -105,8 +102,7 @@ public function buttonClass(?string $class) /** * Set the button style. * - * @param string $class - * + * @param string $class * @return $this */ public function buttonStyle(?string $style) @@ -136,8 +132,7 @@ public function down() /** * Show divider. * - * @param string $class - * + * @param string $class * @return $this */ public function divider() @@ -150,8 +145,7 @@ public function divider() /** * Applies the callback to the elements of the options. * - * @param string $class - * + * @param string $class * @return $this */ public function map(\Closure $builder) @@ -164,8 +158,7 @@ public function map(\Closure $builder) /** * Add click event listener. * - * @param string|null $defaultLabel - * + * @param string|null $defaultLabel * @return $this */ public function click(?string $defaultLabel = null) @@ -212,9 +205,8 @@ protected function renderOptions() } /** - * @param mixed $k - * @param mixed $v - * + * @param mixed $k + * @param mixed $v * @return mixed|string */ protected function renderOption($k, $v) diff --git a/src/Widgets/Dump.php b/src/Widgets/Dump.php index 09118b1c1..0f9bca48a 100755 --- a/src/Widgets/Dump.php +++ b/src/Widgets/Dump.php @@ -21,8 +21,8 @@ class Dump extends Widget /** * Dump constructor. * - * @param array|object|string $content - * @param string|null $padding + * @param array|object|string $content + * @param string|null $padding */ public function __construct($content, string $padding = null) { @@ -46,8 +46,7 @@ public function content($content) } /** - * @param string|null $padding - * + * @param string|null $padding * @return $this */ public function padding(?string $padding) @@ -60,8 +59,7 @@ public function padding(?string $padding) } /** - * @param string $width - * + * @param string $width * @return $this */ public function maxWidth($width) @@ -72,8 +70,7 @@ public function maxWidth($width) } /** - * @param mixed $content - * + * @param mixed $content * @return array|null */ protected function convertJsonToArray($content) diff --git a/src/Widgets/Form.php b/src/Widgets/Form.php index f99f4c1ef..c330e9eef 100755 --- a/src/Widgets/Form.php +++ b/src/Widgets/Form.php @@ -30,60 +30,60 @@ /** * Class Form. * - * @method Field\Text text($column, $label = '') - * @method Field\Checkbox checkbox($column, $label = '') - * @method Field\Radio radio($column, $label = '') - * @method Field\Select select($column, $label = '') - * @method Field\MultipleSelect multipleSelect($column, $label = '') - * @method Field\Textarea textarea($column, $label = '') - * @method Field\Hidden hidden($column, $label = '') - * @method Field\Id id($column, $label = '') - * @method Field\Ip ip($column, $label = '') - * @method Field\Url url($column, $label = '') - * @method Field\Email email($column, $label = '') - * @method Field\Mobile mobile($column, $label = '') - * @method Field\Slider slider($column, $label = '') - * @method Field\Map map($latitude, $longitude, $label = '') - * @method Field\Editor editor($column, $label = '') - * @method Field\Date date($column, $label = '') - * @method Field\Datetime datetime($column, $label = '') - * @method Field\Time time($column, $label = '') - * @method Field\Year year($column, $label = '') - * @method Field\Month month($column, $label = '') - * @method Field\DateRange dateRange($start, $end, $label = '') - * @method Field\DateTimeRange datetimeRange($start, $end, $label = '') - * @method Field\TimeRange timeRange($start, $end, $label = '') - * @method Field\Number number($column, $label = '') - * @method Field\Currency currency($column, $label = '') - * @method Field\SwitchField switch($column, $label = '') - * @method Field\Display display($column, $label = '') - * @method Field\Rate rate($column, $label = '') - * @method Field\Divide divider(string $title = null) - * @method Field\Password password($column, $label = '') - * @method Field\Decimal decimal($column, $label = '') - * @method Field\Html html($html, $label = '') - * @method Field\Tags tags($column, $label = '') - * @method Field\Icon icon($column, $label = '') - * @method Field\Embeds embeds($column, $label = '') - * @method Field\Captcha captcha($column, $label = '') - * @method Field\Listbox listbox($column, $label = '') - * @method Field\File file($column, $label = '') - * @method Field\Image image($column, $label = '') - * @method Field\MultipleFile multipleFile($column, $label = '') - * @method Field\MultipleImage multipleImage($column, $label = '') - * @method Field\Tree tree($column, $label = '') - * @method Field\Table table($column, $labelOrCallback, $callback = null) - * @method Field\ListField list($column, $label = '') - * @method Field\Timezone timezone($column, $label = '') - * @method Field\KeyValue keyValue($column, $label = '') - * @method Field\Tel tel($column, $label = '') - * @method Field\Markdown markdown($column, $label = '') - * @method Field\Range range($start, $end, $label = '') - * @method Field\Color color($column, $label = '') - * @method Field\ArrayField array($column, $labelOrCallback, $callback = null) - * @method Field\SelectTable selectTable($column, $label = '') + * @method Field\Text text($column, $label = '') + * @method Field\Checkbox checkbox($column, $label = '') + * @method Field\Radio radio($column, $label = '') + * @method Field\Select select($column, $label = '') + * @method Field\MultipleSelect multipleSelect($column, $label = '') + * @method Field\Textarea textarea($column, $label = '') + * @method Field\Hidden hidden($column, $label = '') + * @method Field\Id id($column, $label = '') + * @method Field\Ip ip($column, $label = '') + * @method Field\Url url($column, $label = '') + * @method Field\Email email($column, $label = '') + * @method Field\Mobile mobile($column, $label = '') + * @method Field\Slider slider($column, $label = '') + * @method Field\Map map($latitude, $longitude, $label = '') + * @method Field\Editor editor($column, $label = '') + * @method Field\Date date($column, $label = '') + * @method Field\Datetime datetime($column, $label = '') + * @method Field\Time time($column, $label = '') + * @method Field\Year year($column, $label = '') + * @method Field\Month month($column, $label = '') + * @method Field\DateRange dateRange($start, $end, $label = '') + * @method Field\DateTimeRange datetimeRange($start, $end, $label = '') + * @method Field\TimeRange timeRange($start, $end, $label = '') + * @method Field\Number number($column, $label = '') + * @method Field\Currency currency($column, $label = '') + * @method Field\SwitchField switch($column, $label = '') + * @method Field\Display display($column, $label = '') + * @method Field\Rate rate($column, $label = '') + * @method Field\Divide divider(string $title = null) + * @method Field\Password password($column, $label = '') + * @method Field\Decimal decimal($column, $label = '') + * @method Field\Html html($html, $label = '') + * @method Field\Tags tags($column, $label = '') + * @method Field\Icon icon($column, $label = '') + * @method Field\Embeds embeds($column, $label = '') + * @method Field\Captcha captcha($column, $label = '') + * @method Field\Listbox listbox($column, $label = '') + * @method Field\File file($column, $label = '') + * @method Field\Image image($column, $label = '') + * @method Field\MultipleFile multipleFile($column, $label = '') + * @method Field\MultipleImage multipleImage($column, $label = '') + * @method Field\Tree tree($column, $label = '') + * @method Field\Table table($column, $labelOrCallback, $callback = null) + * @method Field\ListField list($column, $label = '') + * @method Field\Timezone timezone($column, $label = '') + * @method Field\KeyValue keyValue($column, $label = '') + * @method Field\Tel tel($column, $label = '') + * @method Field\Markdown markdown($column, $label = '') + * @method Field\Range range($start, $end, $label = '') + * @method Field\Color color($column, $label = '') + * @method Field\ArrayField array($column, $labelOrCallback, $callback = null) + * @method Field\SelectTable selectTable($column, $label = '') * @method Field\MultipleSelectTable multipleSelectTable($column, $label = '') - * @method Field\Button button(string $html = null) + * @method Field\Button button(string $html = null) */ class Form implements Renderable { @@ -173,8 +173,8 @@ class Form implements Renderable /** * Form constructor. * - * @param array $data - * @param mixed $key + * @param array $data + * @param mixed $key */ public function __construct($data = [], $key = null) { @@ -255,8 +255,7 @@ protected function initPayload() /** * Action uri of the form. * - * @param string $action - * + * @param string $action * @return $this|string */ public function action($action = null) @@ -271,8 +270,7 @@ public function action($action = null) /** * Method of the form. * - * @param string $method - * + * @param string $method * @return $this */ public function method(string $method = 'POST') @@ -281,9 +279,8 @@ public function method(string $method = 'POST') } /** - * @param string $title - * @param string $content - * + * @param string $title + * @param string $content * @return $this */ public function confirm(?string $title = null, ?string $content = null) @@ -297,8 +294,7 @@ public function confirm(?string $title = null, ?string $content = null) /** * 设置使用 Toastr 展示字段验证信息. * - * @param bool $value - * + * @param bool $value * @return $this */ public function validationErrorToastr(bool $value = true) @@ -311,8 +307,7 @@ public function validationErrorToastr(bool $value = true) /** * Set primary key. * - * @param mixed $value - * + * @param mixed $value * @return $this */ public function setKey($value) @@ -345,8 +340,7 @@ public function data() } /** - * @param array|Arrayable|Closure $data - * + * @param array|Arrayable|Closure $data * @return $this */ public function fill($data) @@ -375,9 +369,8 @@ public function model() /** * Add a fieldset to form. * - * @param string $title - * @param Closure $setCallback - * + * @param string $title + * @param Closure $setCallback * @return Field\Fieldset */ public function fieldset(string $title, Closure $setCallback) @@ -396,8 +389,7 @@ public function fieldset(string $title, Closure $setCallback) /** * Get specify field. * - * @param string|Field $name - * + * @param string|Field $name * @return Field|null */ public function field($name) @@ -428,8 +420,7 @@ public function fields() /** * Validate this form fields. * - * @param Request $request - * + * @param Request $request * @return bool|MessageBag */ public function validate(Request $request) @@ -455,8 +446,7 @@ public function validate(Request $request) /** * Merge validation messages from input validators. * - * @param \Illuminate\Validation\Validator[] $validators - * + * @param \Illuminate\Validation\Validator[] $validators * @return MessageBag */ protected function mergeValidationMessages($validators) @@ -478,8 +468,7 @@ public function useFormTag(bool $tag = true) } /** - * @param bool $value - * + * @param bool $value * @return $this */ public function submitButton(bool $value = true) @@ -490,8 +479,7 @@ public function submitButton(bool $value = true) } /** - * @param bool $value - * + * @param bool $value * @return $this */ public function resetButton(bool $value = true) @@ -504,8 +492,7 @@ public function resetButton(bool $value = true) /** * Disable reset button. * - * @param bool $value - * + * @param bool $value * @return $this */ public function disableResetButton(bool $value = true) @@ -516,8 +503,7 @@ public function disableResetButton(bool $value = true) /** * Disable submit button. * - * @param bool $value - * + * @param bool $value * @return $this */ public function disableSubmitButton(bool $value = true) @@ -528,9 +514,8 @@ public function disableSubmitButton(bool $value = true) /** * Set field and label width in current form. * - * @param int $fieldWidth - * @param int $labelWidth - * + * @param int $fieldWidth + * @param int $labelWidth * @return $this */ public function width($fieldWidth = 8, $labelWidth = 2) @@ -551,8 +536,7 @@ public function width($fieldWidth = 8, $labelWidth = 2) /** * Find field class with given name. * - * @param string $method - * + * @param string $method * @return bool|string */ public static function findFieldClass($method) @@ -569,8 +553,7 @@ public static function findFieldClass($method) /** * Add a form field to form. * - * @param Field $field - * + * @param Field $field * @return $this */ public function pushField(Field $field) @@ -674,8 +657,7 @@ protected function getSubmitButtonLabel() /** * 设置视图变量. * - * @param array $variables - * + * @param array $variables * @return $this */ public function addVariables(array $variables) @@ -738,7 +720,6 @@ public function hasFile() /** * @param $id - * * @return $this */ public function setFormId($id) @@ -769,8 +750,7 @@ public function setCurrentUrl($url) } /** - * @param bool $disable - * + * @param bool $disable * @return $this */ public function ajax(bool $value = true) @@ -803,8 +783,7 @@ protected function errorScript() } /** - * @param array $input - * + * @param array $input * @return array */ public function sanitize(array $input) @@ -925,9 +904,8 @@ protected function addAjaxScript() /** * Generate a Field object and add to form builder if Field exists. * - * @param string $method - * @param array $arguments - * + * @param string $method + * @param array $arguments * @return Field|null */ public function __call($method, $arguments) @@ -960,8 +938,7 @@ public function __toString() } /** - * @param mixed ...$params - * + * @param mixed ...$params * @return $this */ public static function make(...$params) diff --git a/src/Widgets/Lazy.php b/src/Widgets/Lazy.php index a8488b21f..6e967596a 100644 --- a/src/Widgets/Lazy.php +++ b/src/Widgets/Lazy.php @@ -26,8 +26,7 @@ public function __construct(LazyRenderable $renderable = null, bool $load = true /** * 设置是否立即加载. * - * @param bool $value - * + * @param bool $value * @return $this */ public function load(bool $value) diff --git a/src/Widgets/LazyTable.php b/src/Widgets/LazyTable.php index d63fa8722..b4fe2a0f8 100644 --- a/src/Widgets/LazyTable.php +++ b/src/Widgets/LazyTable.php @@ -38,8 +38,8 @@ class LazyTable extends Widget /** * LazyTable constructor. * - * @param LazyRenderable $renderable - * @param bool $load + * @param LazyRenderable $renderable + * @param bool $load */ public function __construct(LazyRenderable $renderable = null, bool $load = true) { @@ -54,8 +54,7 @@ public function __construct(LazyRenderable $renderable = null, bool $load = true /** * 设置异步表格实例. * - * @param LazyRenderable|null $renderable - * + * @param LazyRenderable|null $renderable * @return $this */ public function from(?LazyRenderable $renderable) @@ -80,8 +79,7 @@ public function getRenderable() /** * 设置是否自动加载. * - * @param bool $value - * + * @param bool $value * @return $this */ public function load(bool $value) @@ -94,8 +92,7 @@ public function load(bool $value) /** * 设置是否启用表格简化模式. * - * @param bool $value - * + * @param bool $value * @return $this */ public function simple(bool $value = true) @@ -108,8 +105,7 @@ public function simple(bool $value = true) /** * 监听异步渲染完成事件. * - * @param string $script - * + * @param string $script * @return $this */ public function onLoad(string $script) diff --git a/src/Widgets/Markdown.php b/src/Widgets/Markdown.php index 834db8c98..1a9419e9d 100755 --- a/src/Widgets/Markdown.php +++ b/src/Widgets/Markdown.php @@ -39,8 +39,7 @@ public function __construct($markdown = null) } /** - * @param string|Renderable $markdown - * + * @param string|Renderable $markdown * @return $this */ public function content($markdown) diff --git a/src/Widgets/Metrics/Bar.php b/src/Widgets/Metrics/Bar.php index c9c2f26b6..d37776bf7 100644 --- a/src/Widgets/Metrics/Bar.php +++ b/src/Widgets/Metrics/Bar.php @@ -91,8 +91,7 @@ protected function defaultChartOptions() /** * 设置柱间距. * - * @param string $value - * + * @param string $value * @return $this */ public function chartBarColumnWidth($value) diff --git a/src/Widgets/Metrics/Card.php b/src/Widgets/Metrics/Card.php index deef3106c..c616d69e1 100644 --- a/src/Widgets/Metrics/Card.php +++ b/src/Widgets/Metrics/Card.php @@ -165,8 +165,7 @@ public function useChart() /** * 设置图标. * - * @param string $icon - * + * @param string $icon * @return $this */ public function icon(?string $icon) @@ -179,8 +178,7 @@ public function icon(?string $icon) /** * 设置卡片标题. * - * @param string $title - * + * @param string $title * @return $this */ public function title(?string $title) @@ -193,8 +191,7 @@ public function title(?string $title) /** * 设置卡片子标题. * - * @param string $title - * + * @param string $title * @return $this */ public function subTitle(?string $title) @@ -207,8 +204,7 @@ public function subTitle(?string $title) /** * 设置卡片头内容. * - * @param string $contents - * + * @param string $contents * @return $this */ public function header($contents) @@ -221,8 +217,7 @@ public function header($contents) /** * 设置卡片内容. * - * @param string $contents - * + * @param string $contents * @return $this */ public function content($contents) @@ -235,8 +230,7 @@ public function content($contents) /** * 设置主题色. * - * @param string $style - * + * @param string $style * @return $this */ public function style(string $style) @@ -249,8 +243,7 @@ public function style(string $style) /** * 设置卡片的下拉菜单选项. * - * @param array $items - * + * @param array $items * @return $this */ public function dropdown(array $items) @@ -263,8 +256,7 @@ public function dropdown(array $items) /** * 设置最小高度. * - * @param string|int $value - * + * @param string|int $value * @return $this */ public function height($value) @@ -277,9 +269,8 @@ public function height($value) /** * 设置图表配置. * - * @param string $key - * @param mixed $value - * + * @param string $key + * @param mixed $value * @return $this */ public function chartOption($key, $value) @@ -294,8 +285,7 @@ public function chartOption($key, $value) /** * 设置图表高度. * - * @param int $number - * + * @param int $number * @return $this */ public function chartHeight(int $number) @@ -310,8 +300,7 @@ public function chartHeight(int $number) /** * 设置图表上间距. * - * @param int $number - * + * @param int $number * @return $this */ public function chartMarginTop(int $number) @@ -326,8 +315,7 @@ public function chartMarginTop(int $number) /** * 设置图表下间距. * - * @param int $number - * + * @param int $number * @return $this */ public function chartMarginBottom(int $number) @@ -342,8 +330,7 @@ public function chartMarginBottom(int $number) /** * 设置图表label. * - * @param string|array $label - * + * @param string|array $label * @return $this */ public function chartLabels($label) @@ -358,8 +345,7 @@ public function chartLabels($label) /** * 设置图表颜色. * - * @param string|array $colors - * + * @param string|array $colors * @return $this */ public function chartColors($colors) @@ -374,8 +360,7 @@ public function chartColors($colors) /** * 设置图表. * - * @param array|\Closure $options - * + * @param array|\Closure $options * @return $this */ public function chart($options = []) diff --git a/src/Widgets/Metrics/Donut.php b/src/Widgets/Metrics/Donut.php index 109ad95bb..e146eaa99 100644 --- a/src/Widgets/Metrics/Donut.php +++ b/src/Widgets/Metrics/Donut.php @@ -30,7 +30,7 @@ class Donut extends Card /** * 趋势图图表默认配置. * - * @return array + * @return array */ protected function defaultChartOptions() { @@ -82,9 +82,8 @@ protected function init() /** * 设置内容宽度. * - * @param int $left - * @param int $right - * + * @param int $left + * @param int $right * @return $this */ public function contentWidth(int $left, int $right) diff --git a/src/Widgets/Metrics/RadialBar.php b/src/Widgets/Metrics/RadialBar.php index 53f50f64c..9dec2406e 100644 --- a/src/Widgets/Metrics/RadialBar.php +++ b/src/Widgets/Metrics/RadialBar.php @@ -114,8 +114,7 @@ protected function defaultChartOptions() /** * 设置卡片底部内容. * - * @param string|\Closure|Renderable $value - * + * @param string|\Closure|Renderable $value * @return $this */ public function footer($value) @@ -128,9 +127,8 @@ public function footer($value) /** * 设置内容宽度. * - * @param int $left - * @param int $right - * + * @param int $left + * @param int $right * @return $this */ public function contentWidth(int $left, int $right) @@ -143,8 +141,7 @@ public function contentWidth(int $left, int $right) /** * 图表位置靠右. * - * @param bool $value - * + * @param bool $value * @return $this */ public function chartPullRight(bool $value = true) diff --git a/src/Widgets/Metrics/Round.php b/src/Widgets/Metrics/Round.php index 5cf6d47dd..f787f84c5 100644 --- a/src/Widgets/Metrics/Round.php +++ b/src/Widgets/Metrics/Round.php @@ -109,8 +109,7 @@ protected function defaultChartOptions() /** * 设置圆圈宽度. * - * @param int $size - * + * @param int $size * @return $this */ public function chartRadialBarSize(int $size) @@ -121,8 +120,7 @@ public function chartRadialBarSize(int $size) /** * 设置圆圈间距. * - * @param int $margin - * + * @param int $margin * @return $this */ public function chartRadialBarMargin(int $margin) @@ -133,9 +131,8 @@ public function chartRadialBarMargin(int $margin) /** * 设置图表统计总数信息. * - * @param string $label - * @param int $number - * + * @param string $label + * @param int $number * @return $this */ public function chartTotal(string $label, int $number) @@ -150,8 +147,7 @@ public function chartTotal(string $label, int $number) /** * 设置图标 dataLabel name 的字体尺寸. * - * @param mixed $size - * + * @param mixed $size * @return $this */ public function chartLabelNameFontSize($size) @@ -162,8 +158,7 @@ public function chartLabelNameFontSize($size) /** * 设置图标 dataLabel name 的Y轴偏移量. * - * @param mixed $size - * + * @param mixed $size * @return $this */ public function chartLabelNameOffsetY(int $offset) @@ -174,8 +169,7 @@ public function chartLabelNameOffsetY(int $offset) /** * 设置图标 dataLabel value 的字体尺寸. * - * @param mixed $size - * + * @param mixed $size * @return $this */ public function chartLabelValueFontSize($size) @@ -186,8 +180,7 @@ public function chartLabelValueFontSize($size) /** * 设置图标 dataLabel value 的Y轴偏移量. * - * @param mixed $size - * + * @param mixed $size * @return $this */ public function chartLabelValueOffsetY(int $offset) diff --git a/src/Widgets/Modal.php b/src/Widgets/Modal.php index 0d2a603cb..abd4cdaee 100644 --- a/src/Widgets/Modal.php +++ b/src/Widgets/Modal.php @@ -69,8 +69,8 @@ class Modal extends Widget /** * Modal constructor. * - * @param string|Closure|Renderable $title - * @param string|Closure|Renderable|LazyRenderable $content + * @param string|Closure|Renderable $title + * @param string|Closure|Renderable|LazyRenderable $content */ public function __construct($title = null, $content = null) { @@ -84,8 +84,7 @@ public function __construct($title = null, $content = null) /** * 设置弹窗垂直居中. * - * @param bool $value - * + * @param bool $value * @return $this */ public function centered(bool $value = true) @@ -98,8 +97,7 @@ public function centered(bool $value = true) /** * 设置弹窗内容滚动. * - * @param bool $value - * + * @param bool $value * @return $this */ public function scrollable(bool $value = true) @@ -112,8 +110,7 @@ public function scrollable(bool $value = true) /** * 设置弹窗尺寸. * - * @param string $size - * + * @param string $size * @return $this */ public function size(string $size) @@ -156,8 +153,7 @@ public function xl() /** * 设置loading效果延迟时间. * - * @param int $delay - * + * @param int $delay * @return $this */ public function delay(int $delay) @@ -170,8 +166,7 @@ public function delay(int $delay) /** * 设置按钮. * - * @param string|Closure|Renderable $button - * + * @param string|Closure|Renderable $button * @return $this */ public function button($button) @@ -184,8 +179,7 @@ public function button($button) /** * 设置弹窗标题. * - * @param string|Closure|Renderable $title - * + * @param string|Closure|Renderable $title * @return $this */ public function title($title) @@ -198,8 +192,7 @@ public function title($title) /** * 设置弹窗内容. * - * @param string|Closure|Renderable|LazyRenderable $content - * + * @param string|Closure|Renderable|LazyRenderable $content * @return $this */ public function content($content) @@ -224,8 +217,7 @@ public function content($content) } /** - * @param string|Closure|Renderable|LazyRenderable $content - * + * @param string|Closure|Renderable|LazyRenderable $content * @return $this */ public function body($content) @@ -236,8 +228,7 @@ public function body($content) /** * 设置是否返回弹窗HTML. * - * @param bool $value - * + * @param bool $value * @return $this */ public function join(bool $value = true) @@ -250,8 +241,7 @@ public function join(bool $value = true) /** * 设置弹窗底部内容. * - * @param string|Closure|Renderable|LazyRenderable $footer - * + * @param string|Closure|Renderable|LazyRenderable $footer * @return $this */ public function footer($footer) @@ -264,9 +254,8 @@ public function footer($footer) /** * 监听弹窗事件. * - * @param string $event - * @param string $script - * + * @param string $event + * @param string $script * @return $this */ public function on(string $event, string $script) @@ -279,8 +268,7 @@ public function on(string $event, string $script) /** * 监听弹窗显示事件. * - * @param string $script - * + * @param string $script * @return $this */ public function onShow(string $script) @@ -291,8 +279,7 @@ public function onShow(string $script) /** * 监听弹窗已显示事件. * - * @param string $script - * + * @param string $script * @return $this */ public function onShown(string $script) @@ -303,8 +290,7 @@ public function onShown(string $script) /** * 监听弹窗隐藏事件. * - * @param string $script - * + * @param string $script * @return $this */ public function onHide(string $script) @@ -315,8 +301,7 @@ public function onHide(string $script) /** * 监听弹窗已隐藏事件. * - * @param string $script - * + * @param string $script * @return $this */ public function onHidden(string $script) diff --git a/src/Widgets/Radio.php b/src/Widgets/Radio.php index a281a6e17..67965c462 100755 --- a/src/Widgets/Radio.php +++ b/src/Widgets/Radio.php @@ -28,8 +28,7 @@ public function __construct( /** * 设置表单 "name" 属性. * - * @param string $name - * + * @param string $name * @return $this */ public function name(?string $name) @@ -42,8 +41,7 @@ public function name(?string $name) * * "sm", "lg" * - * @param string $size - * + * @param string $size * @return $this */ public function size(string $size) @@ -56,8 +54,7 @@ public function size(string $size) /** * 是否排成一行. * - * @param bool $inine - * + * @param bool $inine * @return $this */ public function inline(bool $inine = true) @@ -70,8 +67,7 @@ public function inline(bool $inine = true) /** * 设置禁选的选项. * - * @param string|array $values - * + * @param string|array $values * @return $this */ public function disable($values = null) @@ -88,8 +84,7 @@ public function disable($values = null) /** * 设置 "margin-right" 样式. * - * @param string $value - * + * @param string $value * @return $this */ public function right(string $value) @@ -102,8 +97,7 @@ public function right(string $value) /** * 设置选中的选项. * - * @param string $id - * + * @param string $id * @return $this */ public function check($option) @@ -122,8 +116,7 @@ public function check($option) * ... * ] * - * @param array $opts - * + * @param array $opts * @return $this */ public function options($opts = []) @@ -141,8 +134,7 @@ public function options($opts = []) * * 支持 "info", "primary", "danger", "success". * - * @param string $style - * + * @param string $style * @return $this */ public function style(string $style) diff --git a/src/Widgets/Tab.php b/src/Widgets/Tab.php index a9adb41d2..db82f0c33 100755 --- a/src/Widgets/Tab.php +++ b/src/Widgets/Tab.php @@ -30,10 +30,9 @@ class Tab extends Widget /** * Add a tab and its contents. * - * @param string $title - * @param string|Renderable $content - * @param bool $active - * + * @param string $title + * @param string|Renderable $content + * @param bool $active * @return $this */ public function add($title, $content, $active = false) @@ -55,10 +54,9 @@ public function add($title, $content, $active = false) /** * Add a link on tab. * - * @param string $title - * @param string $href - * @param bool $active - * + * @param string $title + * @param string $href + * @param bool $active * @return $this */ public function addLink($title, $href, $active = false) @@ -80,7 +78,7 @@ public function addLink($title, $href, $active = false) /** * Set tab content padding. * - * @param string $padding + * @param string $padding */ public function padding(string $padding) { @@ -97,7 +95,7 @@ public function noPadding() /** * Set title. * - * @param string $title + * @param string $title */ public function title($title = '') { @@ -109,8 +107,7 @@ public function title($title = '') /** * Set drop-down items. * - * @param array $links - * + * @param array $links * @return $this */ public function dropdown(array $links) diff --git a/src/Widgets/Table.php b/src/Widgets/Table.php index 15fd741c1..8a375648c 100644 --- a/src/Widgets/Table.php +++ b/src/Widgets/Table.php @@ -30,9 +30,9 @@ class Table extends Widget /** * Table constructor. * - * @param array $headers - * @param mixed $rows - * @param array $style + * @param array $headers + * @param mixed $rows + * @param array $style */ public function __construct($headers = [], $rows = false, $style = []) { @@ -51,8 +51,7 @@ public function __construct($headers = [], $rows = false, $style = []) /** * Set table headers. * - * @param array $headers - * + * @param array $headers * @return $this */ public function setHeaders($headers = []) @@ -63,8 +62,7 @@ public function setHeaders($headers = []) } /** - * @param int $depth - * + * @param int $depth * @return $this */ public function depth(int $depth) @@ -77,8 +75,7 @@ public function depth(int $depth) /** * Set table rows. * - * @param array $rows - * + * @param array $rows * @return $this */ public function setRows($rows = []) @@ -119,8 +116,7 @@ public function setRows($rows = []) /** * Set table style. * - * @param array $style - * + * @param array $style * @return $this */ public function setStyle($style = []) diff --git a/src/Widgets/Terminal.php b/src/Widgets/Terminal.php index 2f1c128d7..9192a081f 100755 --- a/src/Widgets/Terminal.php +++ b/src/Widgets/Terminal.php @@ -19,9 +19,8 @@ public function __construct($content = null) } /** - * @param string $command - * @param array $parameters - * + * @param string $command + * @param array $parameters * @return static */ public static function call(string $command, array $parameters = []) diff --git a/src/Widgets/Tooltip.php b/src/Widgets/Tooltip.php index cb9dedce4..842e97604 100755 --- a/src/Widgets/Tooltip.php +++ b/src/Widgets/Tooltip.php @@ -43,8 +43,7 @@ public function maxWidth(int $width) } /** - * @param string|Renderable|\Closure $content - * + * @param string|Renderable|\Closure $content * @return $this */ public function title($content) diff --git a/src/Widgets/Tree.php b/src/Widgets/Tree.php index 3bd600669..26c14e953 100755 --- a/src/Widgets/Tree.php +++ b/src/Widgets/Tree.php @@ -87,15 +87,14 @@ public function setParentColumn(string $name) } /** - * @param array $data exp: - * { - * "id": "1", - * "parent": "#", - * "text": "Dashboard", - * // "state": {"selected": true} - * } - * @param array $data - * + * @param array $data exp: + * { + * "id": "1", + * "parent": "#", + * "text": "Dashboard", + * // "state": {"selected": true} + * } + * @param array $data * @return $this */ public function nodes($data) diff --git a/src/Widgets/Widget.php b/src/Widgets/Widget.php index 17f62eca3..ebddfd2ee 100755 --- a/src/Widgets/Widget.php +++ b/src/Widgets/Widget.php @@ -59,8 +59,7 @@ abstract class Widget implements Renderable protected $runScript = true; /** - * @param mixed ...$params - * + * @param mixed ...$params * @return static */ public static function make(...$params) @@ -73,7 +72,6 @@ public static function make(...$params) * * @param mixed $value * @param callable $callback - * * @return $this|mixed */ public function when($value, $callback) @@ -88,8 +86,7 @@ public function when($value, $callback) /** * 批量设置选项. * - * @param array $options - * + * @param array $options * @return $this */ public function options($options = []) @@ -106,9 +103,8 @@ public function options($options = []) /** * 设置或获取配置选项. * - * @param string $key - * @param mixed $value - * + * @param string $key + * @param mixed $value * @return $this */ public function option($key, $value = null) @@ -168,7 +164,6 @@ protected function withScript() /** * @param $value - * * @return string */ protected function toString($value) @@ -203,8 +198,7 @@ public function getElementSelector() } /** - * @param string $elementClass - * + * @param string $elementClass * @return $this */ public function setElementClass(string $elementClass) @@ -257,7 +251,7 @@ protected function autoRender() /** * 设置模板. * - * @param string $view + * @param string $view */ public function view($view) { @@ -267,8 +261,7 @@ public function view($view) /** * 设置是否执行JS代码. * - * @param bool $run - * + * @param bool $run * @return $this */ public function runScript(bool $run = true) @@ -287,8 +280,7 @@ public function getScript() } /** - * @param mixed $content - * + * @param mixed $content * @return Lazy|LazyTable|mixed */ protected function formatRenderable($content) @@ -307,7 +299,6 @@ protected function formatRenderable($content) /** * @param $method * @param $parameters - * * @return $this */ public function __call($method, $parameters) @@ -343,8 +334,7 @@ public function __call($method, $parameters) } /** - * @param string $key - * + * @param string $key * @return mixed */ public function __get($key) @@ -353,9 +343,8 @@ public function __get($key) } /** - * @param string $key - * @param mixed $value - * + * @param string $key + * @param mixed $value * @return void */ public function __set($key, $value) diff --git a/tests/Browser.php b/tests/Browser.php index 29a095841..352c4e206 100644 --- a/tests/Browser.php +++ b/tests/Browser.php @@ -16,9 +16,8 @@ class Browser extends BaseBrowser /** * 作用与 with 方法完全相同,不同的在于此方法可以让下层 Broser 对象继承当前 Component 的方法. * - * @param string|Component $selector - * @param \Closure $callback - * + * @param string|Component $selector + * @param \Closure $callback * @return $this */ public function extend($selector, $callback) diff --git a/tests/Browser/Cases/AuthTest.php b/tests/Browser/Cases/AuthTest.php index 4285085bb..93447cce9 100644 --- a/tests/Browser/Cases/AuthTest.php +++ b/tests/Browser/Cases/AuthTest.php @@ -72,7 +72,6 @@ public function testLogin() * 翻译菜单标题. * * @param $title - * * @return string */ protected function translateMenuTitle($title) diff --git a/tests/Browser/Cases/Form/HasManyTest.php b/tests/Browser/Cases/Form/HasManyTest.php index 4013484d2..85174f0a7 100644 --- a/tests/Browser/Cases/Form/HasManyTest.php +++ b/tests/Browser/Cases/Form/HasManyTest.php @@ -79,8 +79,7 @@ public function testEditPage() } /** - * @param array $data - * + * @param array $data * @return Painter */ protected function save($data) diff --git a/tests/Browser/Cases/IndexTest.php b/tests/Browser/Cases/IndexTest.php index 267e44d30..f14957fe8 100644 --- a/tests/Browser/Cases/IndexTest.php +++ b/tests/Browser/Cases/IndexTest.php @@ -66,7 +66,6 @@ public function testClickMenu() * 翻译菜单标题. * * @param $title - * * @return string */ protected function translateMenuTitle($title) diff --git a/tests/Browser/Components/Component.php b/tests/Browser/Components/Component.php index b8643b946..644833db3 100644 --- a/tests/Browser/Components/Component.php +++ b/tests/Browser/Components/Component.php @@ -10,9 +10,8 @@ abstract class Component extends BaseComponent /** * 解析css选择器别名. * - * @param Browser $browser - * @param string $selector - * + * @param Browser $browser + * @param string $selector * @return string */ public function formatSelector(Browser $browser, $selector = '') @@ -23,9 +22,8 @@ public function formatSelector(Browser $browser, $selector = '') /** * 解析css选择器别名但不使用前缀. * - * @param \Laravel\Dusk\Browser $browser - * @param string $selector - * + * @param \Laravel\Dusk\Browser $browser + * @param string $selector * @return string */ public function formatSelectorWithoutPrefix(Browser $browser, $selector = '') @@ -38,8 +36,7 @@ public function formatSelectorWithoutPrefix(Browser $browser, $selector = '') } /** - * @param Browser $browser - * + * @param Browser $browser * @return string */ public function parentSelector(Browser $browser) diff --git a/tests/Browser/Components/Form/Field/HasMany.php b/tests/Browser/Components/Form/Field/HasMany.php index 64a4a31ab..b4bab260d 100644 --- a/tests/Browser/Components/Form/Field/HasMany.php +++ b/tests/Browser/Components/Form/Field/HasMany.php @@ -58,8 +58,7 @@ public function elements() /** * 点击添加按钮. * - * @param Browser $browser - * + * @param Browser $browser * @return int */ public function add(Browser $browser) @@ -84,8 +83,7 @@ public function add(Browser $browser) /** * 获取最后一组新增的表单索引. * - * @param Browser $browser - * + * @param Browser $browser * @return int|null */ public function getLastFormGroupIndex(Browser $browser) @@ -101,9 +99,8 @@ public function getLastFormGroupIndex(Browser $browser) } /** - * @param Browser $browser - * @param \Closure $callback - * + * @param Browser $browser + * @param \Closure $callback * @return Browser */ public function withLastFormGroup(Browser $browser, \Closure $callback = null) @@ -114,9 +111,8 @@ public function withLastFormGroup(Browser $browser, \Closure $callback = null) /** * 检测表单组. * - * @param Browser $browser - * @param \Closure $callback - * + * @param Browser $browser + * @param \Closure $callback * @return Browser */ public function withFormGroup(Browser $browser, $index, ?\Closure $callback = null) @@ -131,9 +127,8 @@ public function withFormGroup(Browser $browser, $index, ?\Closure $callback = nu } /** - * @param Browser $browser - * @param int $index - * + * @param Browser $browser + * @param int $index * @return string */ protected function formatGroupSelector(Browser $browser, $index) @@ -144,9 +139,8 @@ protected function formatGroupSelector(Browser $browser, $index) /** * 移除表单. * - * @param Browser $browser - * @param int $index - * + * @param Browser $browser + * @param int $index * @return Browser */ public function remove(Browser $browser, $index) @@ -165,8 +159,7 @@ public function remove(Browser $browser, $index) /** * 移除最后一个表单. * - * @param Browser $browser - * + * @param Browser $browser * @return Browser */ public function removeLast(Browser $browser) @@ -177,10 +170,9 @@ public function removeLast(Browser $browser) /** * 获取hasMany内表单字段值. * - * @param Browser $browser - * @param string $field - * @param string $value - * + * @param Browser $browser + * @param string $field + * @param string $value * @return string|null */ public function assertFormGroupInputValue(Browser $browser, $field, $value, $id = null) @@ -197,10 +189,10 @@ public function assertFormGroupInputValue(Browser $browser, $field, $value, $id /** * 填充字段数据. * - * @param \Laravel\Dusk\Browser $browser + * @param \Laravel\Dusk\Browser $browser * @param $field * @param $value - * @param null $id + * @param null $id */ public function fillFieldValue(Browser $browser, $field, $value, $id = null) { @@ -215,8 +207,7 @@ public function fillFieldValue(Browser $browser, $field, $value, $id = null) * 获取元素选择器. * * @param $field - * @param null $id - * + * @param null $id * @return array|string */ public function getFieldSelector(Browser $browser, $field, $id = null) diff --git a/tests/Browser/Components/Form/Field/MultipleSelect2.php b/tests/Browser/Components/Form/Field/MultipleSelect2.php index b7d0393a6..b812bd079 100644 --- a/tests/Browser/Components/Form/Field/MultipleSelect2.php +++ b/tests/Browser/Components/Form/Field/MultipleSelect2.php @@ -9,9 +9,8 @@ class MultipleSelect2 extends Select2 /** * 选中下拉选框. * - * @param Browser $browser - * @param array $values - * + * @param Browser $browser + * @param array $values * @return Browser */ public function choose(Browser $browser, $values) diff --git a/tests/Browser/Components/Form/Field/Select2.php b/tests/Browser/Components/Form/Field/Select2.php index 16ad74f6c..b4227b7d9 100644 --- a/tests/Browser/Components/Form/Field/Select2.php +++ b/tests/Browser/Components/Form/Field/Select2.php @@ -53,8 +53,7 @@ public function elements() * 选中下拉选框. * * @param Browser $browser - * @param mixed $value - * + * @param mixed $value * @return Browser */ public function choose(Browser $browser, $value) diff --git a/tests/Browser/Components/Form/Field/Tree.php b/tests/Browser/Components/Form/Field/Tree.php index 95839b566..a78dc3007 100644 --- a/tests/Browser/Components/Form/Field/Tree.php +++ b/tests/Browser/Components/Form/Field/Tree.php @@ -28,7 +28,7 @@ public function selector() /** * 浏览器包含组件的断言 * - * @param Browser $browser + * @param Browser $browser * @return void */ public function assert(Browser $browser) @@ -55,9 +55,8 @@ public function elements() /** * 选中下拉选框. * - * @param Browser $browser - * @param mixed $values - * + * @param Browser $browser + * @param mixed $values * @return Browser */ public function choose(Browser $browser, $values) @@ -78,7 +77,7 @@ public function choose(Browser $browser, $values) /** * 展开所有选项. * - * @param Browser $browser + * @param Browser $browser */ public function expand(Browser $browser) { @@ -91,8 +90,7 @@ public function expand(Browser $browser) /** * 选中所有. * - * @param Browser $browser - * + * @param Browser $browser * @return Browser */ public function checkAll(Browser $browser) @@ -108,8 +106,7 @@ public function checkAll(Browser $browser) /** * 取消选中所有. * - * @param Browser $browser - * + * @param Browser $browser * @return Browser */ public function unCheckAll(Browser $browser) @@ -123,8 +120,7 @@ public function unCheckAll(Browser $browser) } /** - * @param \Laravel\Dusk\Browser $browser - * + * @param \Laravel\Dusk\Browser $browser * @return string */ protected function getTreeSelector(Browser $browser) diff --git a/tests/Browser/Components/Form/MenuCreationForm.php b/tests/Browser/Components/Form/MenuCreationForm.php index 0ee1aa2b8..f6810c4dc 100644 --- a/tests/Browser/Components/Form/MenuCreationForm.php +++ b/tests/Browser/Components/Form/MenuCreationForm.php @@ -60,9 +60,8 @@ public function assert(Browser $browser) /** * 注入表单. * - * @param Browser $browser - * @param array $input - * + * @param Browser $browser + * @param array $input * @return Browser */ public function fill(Browser $browser, array $input) diff --git a/tests/Browser/Components/Grid/Actions/Delete.php b/tests/Browser/Components/Grid/Actions/Delete.php index 98fee93c3..6eff68747 100644 --- a/tests/Browser/Components/Grid/Actions/Delete.php +++ b/tests/Browser/Components/Grid/Actions/Delete.php @@ -47,9 +47,8 @@ public function elements() /** * 选中. * - * @param Browser $browser + * @param Browser $browser * @param string|array $value - * * @return Browser */ public function delete(Browser $browser, $value) @@ -82,8 +81,7 @@ public function delete(Browser $browser, $value) /** * 等待确认弹窗. * - * @param \Laravel\Dusk\Browser $browser - * + * @param \Laravel\Dusk\Browser $browser * @return \Laravel\Dusk\Browser */ public function waitForConfirmDialog(Browser $browser) @@ -94,8 +92,7 @@ public function waitForConfirmDialog(Browser $browser) /** * 等待成功信息. * - * @param \Laravel\Dusk\Browser $browser - * + * @param \Laravel\Dusk\Browser $browser * @return \Laravel\Dusk\Browser */ public function waitForSucceeded(Browser $browser) @@ -108,8 +105,7 @@ public function waitForSucceeded(Browser $browser) /** * 点击确认删除按钮. * - * @param \Laravel\Dusk\Browser $browser - * + * @param \Laravel\Dusk\Browser $browser * @return \Laravel\Dusk\Browser */ public function clickConfirmButton(Browser $browser) diff --git a/tests/Browser/Components/Grid/BatchActions.php b/tests/Browser/Components/Grid/BatchActions.php index fe09363bd..f031b99e4 100644 --- a/tests/Browser/Components/Grid/BatchActions.php +++ b/tests/Browser/Components/Grid/BatchActions.php @@ -60,9 +60,8 @@ public function elements() /** * 判断按钮是否已显示. * - * @param Browser $browser - * @param null $number - * + * @param Browser $browser + * @param null $number * @return Browser */ public function shown(Browser $browser, $number = null) @@ -79,9 +78,8 @@ public function shown(Browser $browser, $number = null) /** * 显示菜单. * - * @param Browser $browser - * @param int $seconds - * + * @param Browser $browser + * @param int $seconds * @return Browser */ public function open(Browser $browser) @@ -102,9 +100,8 @@ public function open(Browser $browser) /** * 关闭菜单. * - * @param Browser $browser - * @param int $seconds - * + * @param Browser $browser + * @param int $seconds * @return Browser */ public function close(Browser $browser) @@ -123,9 +120,8 @@ public function close(Browser $browser) /** * 点击选项. * - * @param Browser $browser + * @param Browser $browser * @param string $value - * * @return Browser */ public function choose(Browser $browser, $value) diff --git a/tests/Browser/Components/Grid/RowSelector.php b/tests/Browser/Components/Grid/RowSelector.php index e4d10b44a..189a11f39 100644 --- a/tests/Browser/Components/Grid/RowSelector.php +++ b/tests/Browser/Components/Grid/RowSelector.php @@ -48,9 +48,8 @@ public function elements() /** * 选中. * - * @param Browser $browser + * @param Browser $browser * @param string|array $value - * * @return Browser */ public function choose(Browser $browser, $value) @@ -71,8 +70,7 @@ public function choose(Browser $browser, $value) /** * 选中所有. * - * @param Browser $browser - * + * @param Browser $browser * @return Browser */ public function selectAll(Browser $browser) diff --git a/tests/Browser/Pages/MenuPage.php b/tests/Browser/Pages/MenuPage.php index 079d25eda..4d494c803 100644 --- a/tests/Browser/Pages/MenuPage.php +++ b/tests/Browser/Pages/MenuPage.php @@ -59,9 +59,8 @@ public function assert(Browser $browser) /** * 创建. * - * @param Browser $browser - * @param array $input - * + * @param Browser $browser + * @param array $input * @return Browser */ public function newMenu(Browser $browser, array $input) diff --git a/tests/Browser/Pages/PainterCreatePage.php b/tests/Browser/Pages/PainterCreatePage.php index 7e01d75c6..ca510d5a4 100644 --- a/tests/Browser/Pages/PainterCreatePage.php +++ b/tests/Browser/Pages/PainterCreatePage.php @@ -53,9 +53,8 @@ public function elements() /** * 注入表单. * - * @param Browser $browser - * @param array $input - * + * @param Browser $browser + * @param array $input * @return Browser */ public function fill(Browser $browser, array $input) @@ -93,8 +92,7 @@ public function fill(Browser $browser, array $input) /** * 提交表单. * - * @param Browser $browser - * + * @param Browser $browser * @return Browser */ public function submit(Browser $browser) diff --git a/tests/Controllers/PainterController.php b/tests/Controllers/PainterController.php index fd6549234..cee398aba 100644 --- a/tests/Controllers/PainterController.php +++ b/tests/Controllers/PainterController.php @@ -35,8 +35,7 @@ protected function grid() /** * Make a show builder. * - * @param mixed $id - * + * @param mixed $id * @return Show */ protected function detail($id) diff --git a/tests/Controllers/UserController.php b/tests/Controllers/UserController.php index 3d9447690..847a6fa95 100644 --- a/tests/Controllers/UserController.php +++ b/tests/Controllers/UserController.php @@ -29,7 +29,6 @@ public function index(Content $content) * Edit interface. * * @param $id - * * @return Content */ public function edit($id, Content $content) @@ -57,9 +56,8 @@ public function create(Content $content) /** * Show interface. * - * @param mixed $id - * @param Content $content - * + * @param mixed $id + * @param Content $content * @return Content */ public function show($id, Content $content) @@ -140,8 +138,7 @@ protected function grid() /** * Make a show builder. * - * @param mixed $id - * + * @param mixed $id * @return Show */ protected function detail($id) diff --git a/tests/DuskTestCase.php b/tests/DuskTestCase.php index 67934e813..036ee4d4a 100644 --- a/tests/DuskTestCase.php +++ b/tests/DuskTestCase.php @@ -47,6 +47,7 @@ public function tearDown(): void * Prepare for Dusk test execution. * * @beforeClass + * * @return void */ public static function prepare() @@ -55,8 +56,7 @@ public static function prepare() } /** - * @param \Facebook\WebDriver\Remote\RemoteWebDriver $driver - * + * @param \Facebook\WebDriver\Remote\RemoteWebDriver $driver * @return \Laravel\Dusk\Browser */ protected function newBrowser($driver) diff --git a/tests/Factory.php b/tests/Factory.php index 3d015cce3..c66101686 100644 --- a/tests/Factory.php +++ b/tests/Factory.php @@ -144,7 +144,7 @@ public function afterMakingState($class, $state, callable $callback) * * @param string $class * @param callable $callback - * @param string $name + * @param string $name * @return $this */ public function afterCreating($class, callable $callback, $name = 'default') diff --git a/tests/Models/Tree.php b/tests/Models/Tree.php index 003991ed2..29e83f668 100644 --- a/tests/Models/Tree.php +++ b/tests/Models/Tree.php @@ -13,7 +13,7 @@ class Tree extends Model /** * Create a new Eloquent model instance. * - * @param array $attributes + * @param array $attributes */ public function __construct(array $attributes = []) { diff --git a/tests/helpers.php b/tests/helpers.php index e7337631c..57753a8db 100644 --- a/tests/helpers.php +++ b/tests/helpers.php @@ -2,8 +2,7 @@ if (! function_exists('test_path')) { /** - * @param string $file - * + * @param string $file * @return string */ function test_path($file = '') @@ -14,8 +13,7 @@ function test_path($file = '') if (! function_exists('test_resource_path')) { /** - * @param string $file - * + * @param string $file * @return string */ function test_resource_path($file = '')