Completed
Push — master ( fb7a26...d5e2d7 )
by Agiel Kurniawan
04:29
created
backend/controllers/SiteController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
                     [
61 61
                         'actions' => ['signup'],
62 62
                         'allow' => true,
63
-                        'matchCallback' => function () {
63
+                        'matchCallback' => function() {
64 64
                             return Option::get('allow_signup') && Yii::$app->user->isGuest;
65 65
                         },
66 66
                     ],
Please login to merge, or discard this patch.
backend/views/post/_form-term.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
                     ]
43 43
                 ) ?>
44 44
 
45
-            <?php else: ?>
45
+            <?php else : ?>
46 46
                 <?= Html::dropDownList(
47 47
                     'termIds',
48 48
                     ArrayHelper::getColumn(
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
                         </div>
93 93
                     </div>
94
-                <?php else: ?>
94
+                <?php else : ?>
95 95
                     <?= Yii::t(
96 96
                         'writesdown', 'Choose the {taxonomyName} above',
97 97
                         ['taxonomyName' => $taxonomy->singular_name]
Please login to merge, or discard this patch.
common/models/BaseComment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
             [
60 60
                 ['author', 'email'],
61 61
                 'required',
62
-                'when' => function () {
62
+                'when' => function() {
63 63
                     return Option::get('require_name_email') && Yii::$app->user->isGuest ? true : false;
64 64
                 },
65 65
             ],
Please login to merge, or discard this patch.
common/models/Post.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 
317 317
         if ($sameTerm) {
318 318
             $query->innerJoinWith([
319
-                'terms' => function ($query) {
319
+                'terms' => function($query) {
320 320
                     /* @var $query \yii\db\ActiveQuery */
321 321
                     $query->from(['term' => Term::tableName()])->andWhere([
322 322
                         'IN',
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
     public function getNextPostLink($title = '{title}', $sameType = true, $sameTerm = false, $options = [])
341 341
     {
342 342
         if ($nextPost = $this->getNextPost($sameType, $sameTerm)) {
343
-            $title = preg_replace_callback('/\\{([\w\-\/]+)\\}/', function ($matches) use ($nextPost) {
343
+            $title = preg_replace_callback('/\\{([\w\-\/]+)\\}/', function($matches) use ($nextPost) {
344 344
                 $attribute = $matches[1];
345 345
 
346 346
                 return $nextPost->{$attribute};
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
 
373 373
         if ($sameTerm) {
374 374
             $query->innerJoinWith([
375
-                'terms' => function ($query) {
375
+                'terms' => function($query) {
376 376
                     /* @var $query \yii\db\ActiveQuery */
377 377
                     $query->from(['term' => Term::tableName()])->andWhere([
378 378
                         'IN',
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
     public function getPrevPostLink($title = '{title}', $sameType = true, $sameTerm = false, $options = [])
397 397
     {
398 398
         if ($prevPost = $this->getPrevPost($sameType, $sameTerm)) {
399
-            $title = preg_replace_callback('/\\{([\w\-\/]+)\\}/', function ($matches) use ($prevPost) {
399
+            $title = preg_replace_callback('/\\{([\w\-\/]+)\\}/', function($matches) use ($prevPost) {
400 400
                 $attribute = $matches[1];
401 401
 
402 402
                 return $prevPost->{$attribute};
Please login to merge, or discard this patch.
common/models/search/Media.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
     {
67 67
         $query = MediaModel::find();
68 68
         $query->innerJoinWith([
69
-            'mediaAuthor' => function ($query) {
69
+            'mediaAuthor' => function($query) {
70 70
                 /* @var $query \yii\db\ActiveQuery */
71 71
                 return $query->from(['user' => User::tableName()]);
72 72
             },
Please login to merge, or discard this patch.
common/models/search/MediaComment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
     {
52 52
         $query = MediaCommentModel::find();
53 53
         $query->innerJoinWith([
54
-            'commentMedia' => function ($query) {
54
+            'commentMedia' => function($query) {
55 55
                 /* @var $query \yii\db\ActiveQuery */
56 56
                 return $query->from(['media' => Media::tableName()]);
57 57
             },
Please login to merge, or discard this patch.
common/models/search/PostComment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
         $query = PostCommentModel::find();
55 55
 
56 56
         $query->innerJoinWith([
57
-            'commentPost' => function ($query) {
57
+            'commentPost' => function($query) {
58 58
                 /* @var $query \yii\db\ActiveQuery */
59 59
                 return $query->from(['post' => Post::tableName()]);
60 60
             },
Please login to merge, or discard this patch.
frontend/views/layouts/main.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,8 +65,11 @@
 block discarded – undo
65 65
 
66 66
         <?php if (Yii::$app->controller->route == 'site/index'): ?>
67 67
             <h1 id="site-title" class="site-title"><?= Option::get('sitetitle'); ?></h1>
68
-        <?php else: ?>
69
-            <span id="site-title" class="h1 site-title"><?= Option::get('sitetitle'); ?></span>
68
+        <?php else {
69
+    : ?>
70
+            <span id="site-title" class="h1 site-title"><?= Option::get('sitetitle');
71
+}
72
+?></span>
70 73
         <?php endif ?>
71 74
 
72 75
         <span id="site-tagline" class="h3 site-tagline"><?= Option::get('tagline'); ?></span>
Please login to merge, or discard this patch.
frontend/views/post-comment/_form.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,8 @@  discard block
 block discarded – undo
35 35
             ]) ?>
36 36
 
37 37
         </p>
38
-    <?php else: ?>
38
+    <?php else {
39
+    : ?>
39 40
         <p>
40 41
             <?= Html::a('<strong>' . Yii::t('writesdown', 'Cancel Reply') . '</strong>', '#', [
41 42
                 'id' => 'cancel-reply',
@@ -44,7 +45,9 @@  discard block
 block discarded – undo
44 45
             ]) ?>
45 46
 
46 47
         </p>
47
-    <?php endif; ?>
48
+    <?php endif;
49
+}
50
+?>
48 51
 
49 52
     <?php $form = ActiveForm::begin() ?>
50 53
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,13 +21,13 @@  discard block
 block discarded – undo
21 21
     <?php if (!Yii::$app->user->isGuest): ?>
22 22
         <p>
23 23
             <?= Yii::t('writesdown', 'Login as {username}, {logout}{cancelReply}', [
24
-                'username' => '<strong>' . Yii::$app->user->identity->username . '</strong>',
24
+                'username' => '<strong>'.Yii::$app->user->identity->username.'</strong>',
25 25
                 'logout' => Html::a(
26 26
                     Yii::t('writesdown', '<strong>Sign Out</strong>'),
27 27
                     ['/site/logout'],
28 28
                     ['data-method' => 'post']
29 29
                 ),
30
-                'cancelReply' => Html::a('<strong>' . Yii::t('writesdown', ', Cancel Reply') . '</strong>', '#', [
30
+                'cancelReply' => Html::a('<strong>'.Yii::t('writesdown', ', Cancel Reply').'</strong>', '#', [
31 31
                     'id' => 'cancel-reply',
32 32
                     'class' => 'cancel-reply',
33 33
                     'style' => 'display:none;',
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         </p>
38 38
     <?php else: ?>
39 39
         <p>
40
-            <?= Html::a('<strong>' . Yii::t('writesdown', 'Cancel Reply') . '</strong>', '#', [
40
+            <?= Html::a('<strong>'.Yii::t('writesdown', 'Cancel Reply').'</strong>', '#', [
41 41
                 'id' => 'cancel-reply',
42 42
                 'class' => 'cancel-reply',
43 43
                 'style' => 'display:none;',
Please login to merge, or discard this patch.