Skip to content

Commit 7648cb4

Browse files
committed
Auto-fix CS - CS master branch
1 parent c0a3063 commit 7648cb4

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

src/Controller/Component/CommentComponent.php

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -504,16 +504,21 @@ public function callbackFetchDataThreaded(array $options) {
504504
'Comment.title', 'Comment.body', 'Comment.slug', 'Comment.created',
505505
$this->Controller->{$this->modelAlias}->alias . '.' . $this->Controller->{$this->modelAlias}->primaryKey,
506506
$this->userModel . '.' . $Comment->{$this->userModel}->primaryKey,
507-
$this->userModel . '.' . $Comment->{$this->userModel}->displayField];
507+
$this->userModel . '.' . $Comment->{$this->userModel}->displayField,
508+
509+
];
508510

509511
if ($Comment->{$this->userModel}->hasField('slug')) {
510512
$settings['fields'][] = $this->userModel . '.slug';
511513
}
512514

513515
$settings += [
514-
'order' => [
515-
'Comment.parent_id' => 'asc',
516-
'Comment.created' => 'asc']];
516+
'order' => [
517+
'Comment.parent_id' => 'asc',
518+
'Comment.created' => 'asc',
519+
],
520+
521+
];
517522

518523
return $Comment->find('threaded', ...$settings);
519524
}
@@ -641,7 +646,9 @@ public function callbackAdd($modelId, $commentId, $displayType, $data = []) {
641646
public function callbackgetFormattedComment($commentId) {
642647
$comment = $this->Controller->{$this->modelAlias}->Comments->find('first', ...[
643648
'fields' => ['Comment.body', 'Comment.title'],
644-
'conditions' => ['Comment.id' => $commentId]]);
649+
'conditions' => ['Comment.id' => $commentId],
650+
651+
]);
645652
if ($comment) {
646653
} else {
647654
return null;

src/Model/Behavior/CommentableBehavior.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ public function commentAdd(?int $commentId = null, array $options = []): ?int {
181181
$fk = null;
182182
}
183183
$this->commentsTable()->behaviors()->load('Tree', [
184-
'scope' => ['Comments.foreign_key' => $fk]]);
184+
'scope' => ['Comments.foreign_key' => $fk],
185+
186+
]);
185187
}
186188

187189
if ($this->commentsTable()->save($comment)) {

0 commit comments

Comments
 (0)