@@ -21,12 +21,12 @@ discard block |
||
| 21 | 21 | // set header |
| 22 | 22 | $this->setJsonHeader(); |
| 23 | 23 | // get config count per page |
| 24 | - $perPage = (int)AppRecord::getConfig('widget', 'Comments', 'perPage'); |
|
| 24 | + $perPage = (int) AppRecord::getConfig('widget', 'Comments', 'perPage'); |
|
| 25 | 25 | // offset can be only integer |
| 26 | - $index = (int)$index; |
|
| 26 | + $index = (int) $index; |
|
| 27 | 27 | $offset = $perPage * $index; |
| 28 | 28 | // get comment target path and check |
| 29 | - $path = (string)App::$Request->query->get('path'); |
|
| 29 | + $path = (string) App::$Request->query->get('path'); |
|
| 30 | 30 | if (Str::likeEmpty($path)) { |
| 31 | 31 | throw new JsonException('Wrong path'); |
| 32 | 32 | } |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | public function actionShowanswers($commentId) |
| 89 | 89 | { |
| 90 | 90 | // check input data |
| 91 | - if (!Obj::isLikeInt($commentId) || (int)$commentId < 1) { |
|
| 91 | + if (!Obj::isLikeInt($commentId) || (int) $commentId < 1) { |
|
| 92 | 92 | throw new JsonException('Input data is incorrect'); |
| 93 | 93 | } |
| 94 | 94 | |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | </li> |
| 55 | 55 | </ul> |
| 56 | 56 | |
| 57 | -<?php if ((int)$configs['guestAdd'] === 1 || \App::$User->isAuth()): ?> |
|
| 57 | +<?php if ((int) $configs['guestAdd'] === 1 || \App::$User->isAuth()): ?> |
|
| 58 | 58 | <!-- comment form --> |
| 59 | 59 | <form name="comment-add-form" action="" method="post" style="padding-top: 15px;" class="form-horizontal"> |
| 60 | 60 | <input type="hidden" name="replay-to" value="0" /> |