Completed
Push — master ( 067418...4daa60 )
by Xu
47:44 queued 07:08
created
src/oauth2/migrations/m180330_062249_create_oauth2_refresh_token_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
             'user_id' => $this->integer()->unsigned()->comment('User Id'),
30 30
             'expires' => $this->integer()->notNull()->comment('Expires'),
31 31
             'scope' => $this->text()->comment('Scope'),
32
-        ],$tableOptions);
32
+        ], $tableOptions);
33 33
 
34 34
         $this->addPrimaryKey('pk', $this->tableName, 'refresh_token');
35 35
         $this->createIndex('ix_refresh_token_expires', $this->tableName, 'expires');
Please login to merge, or discard this patch.
src/oauth2/views/auth/authorize.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,13 +42,13 @@
 block discarded – undo
42 42
 
43 43
 <div class="modal-header">
44 44
     <h2 class="modal-title">
45
-        <?= Yii::t('yuncms', 'Sign in with your {siteName} account',['siteName'=>Yii::$app->name]) ?>
45
+        <?= Yii::t('yuncms', 'Sign in with your {siteName} account', ['siteName'=>Yii::$app->name]) ?>
46 46
     </h2>
47 47
 </div>
48 48
 <div class="modal-body">
49 49
     <div class="row">
50 50
         <div class="col-sm-12 col-md-8 col-lg-8 col-md-offset-2 col-lg-offset-2">
51
-            <?= $form->field($model, 'login', ['inputOptions' => ['autofocus' => 'autofocus',]]) ?>
51
+            <?= $form->field($model, 'login', ['inputOptions' => ['autofocus' => 'autofocus', ]]) ?>
52 52
             <?= $form->field($model, 'password')->passwordInput() ?>
53 53
             <?= Html::submitButton(Yii::t('yuncms', 'Login'), ['class' => 'btn btn-primary btn-block  mt-10']) ?>
54 54
         </div>
Please login to merge, or discard this patch.
src/oauth2/views/client/view.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,8 +49,8 @@
 block discarded – undo
49 49
                         'redirect_uri',
50 50
                         [
51 51
                             'label' => Yii::t('yuncms', 'Grant type'),
52
-                            'value' => function ($model) {
53
-                                if(empty($model->grant_type)){
52
+                            'value' => function($model) {
53
+                                if (empty($model->grant_type)) {
54 54
                                     return Yii::t('yuncms', 'All Type');
55 55
                                 }
56 56
                                 return $model->grant_type;
Please login to merge, or discard this patch.
src/oauth2/views/client/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
                     'columns' => [
30 30
                         [
31 31
                             'label' => Yii::t('yuncms', 'App Name'),
32
-                            'value' => function ($model) {
32
+                            'value' => function($model) {
33 33
                                 return Html::a(Html::encode($model->name), ['/oauth2/client/view', 'id' => $model->client_id]);
34 34
                             },
35 35
                             'format' => 'html'
Please login to merge, or discard this patch.
src/jobs/AttachmentDeleteJob.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      */
32 32
     public function execute($queue)
33 33
     {
34
-        if(self::getVolume()->has($this->path)){
34
+        if (self::getVolume()->has($this->path)) {
35 35
             self::getVolume()->delete($this->path);
36 36
         }
37 37
     }
Please login to merge, or discard this patch.
src/rest/views/auth/authorize.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 <div class="modal-body">
43 43
     <div class="row">
44 44
         <div class="col-sm-12 col-md-8 col-lg-8 col-md-offset-2 col-lg-offset-2">
45
-            <?= $form->field($model, 'login', ['inputOptions' => ['autofocus' => 'autofocus',]]) ?>
45
+            <?= $form->field($model, 'login', ['inputOptions' => ['autofocus' => 'autofocus', ]]) ?>
46 46
             <?= $form->field($model, 'password')->passwordInput() ?>
47 47
             <?= Html::submitButton(Yii::t('yuncms', 'Login'), ['class' => 'btn btn-primary btn-block  mt-10']) ?>
48 48
         </div>
Please login to merge, or discard this patch.
src/admin/views/layouts/_navigation_header.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 use yii\helpers\Url;
3 3
 use yuncms\helpers\Html;
4
- ?>
4
+    ?>
5 5
 <li class="nav-header">
6 6
     <div class="logo-element-main">
7 7
         YUNCMS
Please login to merge, or discard this patch.
src/widgets/MultipleUpload.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -161,8 +161,9 @@
 block discarded – undo
161 161
             return ['url' => $attachment, 'path' => $attachment,];
162 162
         } else if (is_array($attachment)) {
163 163
             return $attachment;
164
-        } else if ($attachment instanceof Arrayable)
165
-            return $attachment->toArray();
164
+        } else if ($attachment instanceof Arrayable) {
165
+                    return $attachment->toArray();
166
+        }
166 167
         return [];
167 168
     }
168 169
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         if (empty($this->url)) {
96 96
             if ($this->onlyImage === false) {
97 97
                 $this->url = $this->multiple ? ['/upload/files-upload'] : ['/upload/file-upload'];
98
-                $fileAllowFiles = Yii::$app->getSettings()->get('fileAllowFiles','attachment');
98
+                $fileAllowFiles = Yii::$app->getSettings()->get('fileAllowFiles', 'attachment');
99 99
                 $regExp = '/(\.|\/)(';
100 100
                 $extensions = explode(',', $fileAllowFiles);
101 101
                 foreach ($extensions as $extension) {
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         }
131 131
         $this->fileInputName = md5($this->name);
132 132
         if (!array_key_exists('file_param', $this->url)) {
133
-            $this->url['file_param'] = $this->fileInputName;//服务器需要通过这个判断是哪一个input name上传的
133
+            $this->url['file_param'] = $this->fileInputName; //服务器需要通过这个判断是哪一个input name上传的
134 134
         }
135 135
 
136 136
         $this->clientOptions = ArrayHelper::merge($this->clientOptions, [
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
     protected function formatAttachment($attachment)
161 161
     {
162 162
         if (!empty($attachment) && is_string($attachment)) {
163
-            return ['url' => $attachment, 'path' => $attachment,];
163
+            return ['url' => $attachment, 'path' => $attachment, ];
164 164
         } else if (is_array($attachment)) {
165 165
             return $attachment;
166 166
         } else if ($attachment instanceof Arrayable)
Please login to merge, or discard this patch.
src/helpers/UploadHelper.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public static function getImageMaxSizeByte()
48 48
     {
49
-        $imageMaxSize = Yii::$app->getSettings()->get('imageMaxSize','attachment');
49
+        $imageMaxSize = Yii::$app->getSettings()->get('imageMaxSize', 'attachment');
50 50
         return self::getMaxUploadByte($imageMaxSize);
51 51
     }
52 52
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public static function getVideoMaxSizeByte()
58 58
     {
59
-        $videoMaxSize = Yii::$app->getSettings()->get('videoMaxSize','attachment');
59
+        $videoMaxSize = Yii::$app->getSettings()->get('videoMaxSize', 'attachment');
60 60
         return self::getMaxUploadByte($videoMaxSize);
61 61
     }
62 62
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public static function getFileMaxSizeByte()
68 68
     {
69
-        $fileMaxSize = Yii::$app->getSettings()->get('fileMaxSize','attachment');
69
+        $fileMaxSize = Yii::$app->getSettings()->get('fileMaxSize', 'attachment');
70 70
         return self::getMaxUploadByte($fileMaxSize);
71 71
     }
72 72
 
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public static function getAcceptImageMimeTypes()
78 78
     {
79
-        $imageAllowFiles = Yii::$app->getSettings()->get('imageAllowFiles','attachment');
79
+        $imageAllowFiles = Yii::$app->getSettings()->get('imageAllowFiles', 'attachment');
80 80
         $extensions = explode(',', $imageAllowFiles);
81
-        array_walk($extensions, function (&$value) {
81
+        array_walk($extensions, function(&$value) {
82 82
             $value = 'image/' . $value;
83 83
         });
84 84
         return $extensions;
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     public static function normalizeExtension($extensions)
94 94
     {
95 95
         $extensions = explode(',', $extensions);
96
-        array_walk($extensions, function (&$value) {
96
+        array_walk($extensions, function(&$value) {
97 97
             $value = '.' . $value;
98 98
         });
99 99
         return $extensions;
Please login to merge, or discard this patch.