Skip to content

Commit

Permalink
Merge pull request #1481 from jqhph/analysis-orRbRP
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
jqhph authored Sep 14, 2021
2 parents 5608877 + 5f113f8 commit 4c6fd4f
Show file tree
Hide file tree
Showing 269 changed files with 2,410 additions and 3,768 deletions.
17 changes: 6 additions & 11 deletions src/Actions/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ abstract class Action implements Renderable
/**
* Action constructor.
*
* @param string $title
* @param string $title
*/
public function __construct($title = null)
{
Expand All @@ -73,8 +73,7 @@ public function __construct($title = null)
/**
* 是否禁用动作.
*
* @param bool $disable
*
* @param bool $disable
* @return $this
*/
public function disable(bool $disable = true)
Expand Down Expand Up @@ -105,8 +104,7 @@ public function getKey()
/**
* 设置主键.
*
* @param mixed $key
*
* @param mixed $key
* @return $this
*/
public function setKey($key)
Expand Down Expand Up @@ -145,8 +143,7 @@ public function selector()
/**
* 生成选择器.
*
* @param string $prefix
*
* @param string $prefix
* @return string
*/
public function makeSelector()
Expand All @@ -155,8 +152,7 @@ public function makeSelector()
}

/**
* @param string|array $class
*
* @param string|array $class
* @return $this
*/
public function addHtmlClass($class)
Expand Down Expand Up @@ -260,8 +256,7 @@ public function __toString()
}

/**
* @param mixed ...$params
*
* @param mixed ...$params
* @return $this
*/
public static function make(...$params)
Expand Down
53 changes: 20 additions & 33 deletions src/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -130,7 +128,7 @@ public static function favicon($favicon = null)
/**
* 设置翻译文件路径.
*
* @param string|null $path
* @param string|null $path
*/
public static function translation(?string $path)
{
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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 = [])
Expand Down Expand Up @@ -273,8 +267,7 @@ public static function app()
/**
* 处理异常.
*
* @param \Throwable $e
*
* @param \Throwable $e
* @return mixed
*/
public static function handleException(\Throwable $e)
Expand All @@ -285,8 +278,7 @@ public static function handleException(\Throwable $e)
/**
* 上报异常.
*
* @param \Throwable $e
*
* @param \Throwable $e
* @return mixed
*/
public static function reportException(\Throwable $e)
Expand All @@ -297,8 +289,7 @@ public static function reportException(\Throwable $e)
/**
* 显示异常信息.
*
* @param \Throwable $e
*
* @param \Throwable $e
* @return mixed
*/
public static function renderException(\Throwable $e)
Expand All @@ -307,15 +298,15 @@ public static function renderException(\Throwable $e)
}

/**
* @param callable $callback
* @param callable $callback
*/
public static function booting($callback)
{
Event::listen('admin:booting', $callback);
}

/**
* @param callable $callback
* @param callable $callback
*/
public static function booted($callback)
{
Expand Down Expand Up @@ -359,8 +350,7 @@ public static function translator()
}

/**
* @param array|string $name
*
* @param array|string $name
* @return void
*/
public static function addIgnoreQueryName($name)
Expand All @@ -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)
{
Expand Down Expand Up @@ -438,8 +428,7 @@ public static function renderContents()
/**
* 响应json数据.
*
* @param array $data
*
* @param array $data
* @return JsonResponse
*/
public static function json(array $data = [])
Expand All @@ -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)
Expand All @@ -466,7 +454,7 @@ public static function extension(?string $name = null)
/**
* 响应并中断后续逻辑.
*
* @param Response|string|array $response
* @param Response|string|array $response
*
* @throws HttpResponseException
*/
Expand Down Expand Up @@ -494,7 +482,7 @@ public static function classLoader()
/**
* 往分组插入中间件.
*
* @param array $mix
* @param array $mix
*/
public static function mixMiddlewareGroup(array $mix = [])
{
Expand Down Expand Up @@ -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)
Expand Down
33 changes: 13 additions & 20 deletions src/Color.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,7 @@ public function getName()
/**
* 设置主题色名称.
*
* @param string $name
*
* @param string $name
* @return void
*/
public function setName(string $name)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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 = [])
Expand All @@ -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)
Expand Down
8 changes: 3 additions & 5 deletions src/Console/ActionCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions src/Console/AdminCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ protected function listAdminCommands()

/**
* @param (Command|string)[] $commands
*
* @return int
*/
private function getColumnWidth(array $commands)
Expand All @@ -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)
Expand Down
6 changes: 2 additions & 4 deletions src/Console/Development/LinkCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ public function handle()
}

/**
* @param Filesystem $files
*
* @param Filesystem $files
* @return void
*/
protected function linkTests($files)
Expand Down Expand Up @@ -60,8 +59,7 @@ protected function linkTests($files)
}

/**
* @param Filesystem $files
*
* @param Filesystem $files
* @return void
*/
protected function linkAssets($files)
Expand Down
Loading

0 comments on commit 4c6fd4f

Please sign in to comment.