Browse Source

Merge pull request #827 from jqhph/analysis-vQNgYv

Apply fixes from StyleCI
Jiang Qinghua 4 years ago
parent
commit
b673ba67f7
2 changed files with 8 additions and 9 deletions
  1. 0 1
      src/Form/Field/File.php
  2. 8 8
      src/Widgets/Metrics/Card.php

+ 0 - 1
src/Form/Field/File.php

@@ -185,5 +185,4 @@ class File extends Field implements UploadFieldInterface
 
         return $this;
     }
-
 }

+ 8 - 8
src/Widgets/Metrics/Card.php

@@ -138,7 +138,7 @@ class Card extends Widget
      */
     protected function init()
     {
-        $this->id('metric-card-' . Str::random(8));
+        $this->id('metric-card-'.Str::random(8));
         $this->class('card');
     }
 
@@ -348,7 +348,7 @@ class Card extends Widget
      */
     public function chartLabels($label)
     {
-        $this->chartOptions['labels'] = (array)$label;
+        $this->chartOptions['labels'] = (array) $label;
 
         $this->useChart();
 
@@ -364,7 +364,7 @@ class Card extends Widget
      */
     public function chartColors($colors)
     {
-        $this->chartOptions['colors'] = (array)$colors;
+        $this->chartOptions['colors'] = (array) $colors;
 
         $this->useChart();
 
@@ -399,7 +399,7 @@ class Card extends Widget
      */
     protected function setUpChart()
     {
-        if (!$chart = $this->chart) {
+        if (! $chart = $this->chart) {
             return;
         }
 
@@ -410,7 +410,7 @@ class Card extends Widget
 
         // 颜色
         if (empty($this->chartOptions['colors'])) {
-            $this->chartOptions['colors'] = (array)Admin::color()->get($this->style);
+            $this->chartOptions['colors'] = (array) Admin::color()->get($this->style);
         }
 
         // 图表配置选项
@@ -446,7 +446,7 @@ class Card extends Widget
      */
     public function addScript()
     {
-        if (!$this->allowBuildRequest()) {
+        if (! $this->allowBuildRequest()) {
             return;
         }
 
@@ -525,7 +525,7 @@ JS;
      */
     protected function setUpCardHeight()
     {
-        if (!$height = $this->height) {
+        if (! $height = $this->height) {
             return;
         }
 
@@ -572,7 +572,7 @@ JS;
                 'header' => $this->renderHeader(),
                 'content' => $this->renderContent(),
             ],
-            (array)optional($this->chart)->valueResult()
+            (array) optional($this->chart)->valueResult()
         );
     }
 }