소스 검색

Apply fixes from StyleCI

Jiang Qinghua 4 년 전
부모
커밋
be1923e317
1개의 변경된 파일69개의 추가작업 그리고 69개의 파일을 삭제
  1. 69 69
      src/Form/Field/Color.php

+ 69 - 69
src/Form/Field/Color.php

@@ -1,69 +1,69 @@
-<?php
-
-namespace Dcat\Admin\Form\Field;
-
-class Color extends Text
-{
-    protected static $css = [
-        '@admin/dcat/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css',
-    ];
-
-    protected static $js = [
-        '@admin/dcat/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js',
-    ];
-
-    protected $view = 'admin::form.color';
-
-    /**
-     * Use `hex` format.
-     *
-     * @return $this
-     */
-    public function hex()
-    {
-        return $this->options(['format' => 'hex']);
-    }
-
-    /**
-     * Use `rgb` format.
-     *
-     * @return $this
-     */
-    public function rgb()
-    {
-        return $this->options(['format' => 'rgb']);
-    }
-
-    /**
-     * Use `rgba` format.
-     *
-     * @return $this
-     */
-    public function rgba()
-    {
-        return $this->options(['format' => 'rgba']);
-    }
-
-    protected function addScript()
-    {
-        $options = json_encode($this->options);
-
-        $this->script = <<<JS
-$('{$this->getElementClassSelector()}').colorpicker($options).on('colorpickerChange', function(event) {
-    $(this).parents('.input-group').find('.input-group-prepend i').css('background-color', event.color.toString());
-});
-JS;
-    }
-
-    /**
-     * Render this filed.
-     *
-     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
-     */
-    public function render()
-    {
-        $this->addScript();
-
-        return parent::render();
-    }
-}
+<?php
+
+namespace Dcat\Admin\Form\Field;
+
+class Color extends Text
+{
+    protected static $css = [
+        '@admin/dcat/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css',
+    ];
+
+    protected static $js = [
+        '@admin/dcat/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js',
+    ];
+
+    protected $view = 'admin::form.color';
+
+    /**
+     * Use `hex` format.
+     *
+     * @return $this
+     */
+    public function hex()
+    {
+        return $this->options(['format' => 'hex']);
+    }
+
+    /**
+     * Use `rgb` format.
+     *
+     * @return $this
+     */
+    public function rgb()
+    {
+        return $this->options(['format' => 'rgb']);
+    }
+
+    /**
+     * Use `rgba` format.
+     *
+     * @return $this
+     */
+    public function rgba()
+    {
+        return $this->options(['format' => 'rgba']);
+    }
+
+    protected function addScript()
+    {
+        $options = json_encode($this->options);
+
+        $this->script = <<<JS
+$('{$this->getElementClassSelector()}').colorpicker($options).on('colorpickerChange', function(event) {
+    $(this).parents('.input-group').find('.input-group-prepend i').css('background-color', event.color.toString());
+});
+JS;
+    }
+
+    /**
+     * Render this filed.
+     *
+     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
+     */
+    public function render()
+    {
+        $this->addScript();
+
+        return parent::render();
+    }
+}