@@ -41,7 +41,7 @@ |
||
41 | 41 | |
42 | 42 | // initialize model with answer add if thread is not closed |
43 | 43 | $model = null; |
44 | - if (!(bool)$record->closed) { |
|
44 | + if (!(bool) $record->closed) { |
|
45 | 45 | $model = new FormAnswerAdd($record); |
46 | 46 | if ($model->send()) { |
47 | 47 | if ($model->validate()) { |
@@ -42,7 +42,7 @@ |
||
42 | 42 | ['text' => $profile->user->email], |
43 | 43 | ['text' => $profile->nick], |
44 | 44 | ['text' => Str::startsWith('0000-', $profile->birthday) ? __('None') : Date::convertToDatetime($profile->birthday)], |
45 | - ['text' => ($profile->rating > 0 ? '+' : null) . $profile->rating], |
|
45 | + ['text' => ($profile->rating > 0 ? '+' : null).$profile->rating], |
|
46 | 46 | ['text' => $this->bootstrap()->btngroup(['class' => 'btn-group btn-group-sm']) |
47 | 47 | ->add('<i class="fa fa-pencil"></i>', ['profile/update', [$profile->id]], ['html' => true, 'class' => 'btn btn-primary']) |
48 | 48 | ->add('<i class="fa fa-trash-o"></i>', ['user/delete', [$profile->user->id]], ['html' => true, 'class' => 'btn btn-danger']) |
@@ -30,28 +30,28 @@ discard block |
||
30 | 30 | <div class="card"> |
31 | 31 | <div class="card-header" style="background-color: #cadcee"> |
32 | 32 | <?php |
33 | - if (!(bool)$record->readed) { |
|
33 | + if (!(bool) $record->readed) { |
|
34 | 34 | echo '<i class="fa fa-bell"></i> '; |
35 | 35 | } |
36 | 36 | ?> |
37 | 37 | <?= __('Message sent') ?>: <?= Date::convertToDatetime($record->created_at, Date::FORMAT_TO_HOUR) ?>. |
38 | 38 | <?php |
39 | - if (!(bool)$record->closed) { |
|
40 | - echo '<span class="badge badge-success">' . __('Opened') . '</span>'; |
|
39 | + if (!(bool) $record->closed) { |
|
40 | + echo '<span class="badge badge-success">'.__('Opened').'</span>'; |
|
41 | 41 | } else { |
42 | - echo '<span class="badge badge-danger">' . __('Closed') . '</span>'; |
|
42 | + echo '<span class="badge badge-danger">'.__('Closed').'</span>'; |
|
43 | 43 | } |
44 | 44 | ?> |
45 | 45 | <?php |
46 | 46 | $btngrp = $this->bootstrap()->btngroup(['class' => 'btn-group btn-group-sm', 'role' => 'group'], 4); |
47 | 47 | |
48 | 48 | // show "mark as read" button if message is not readed |
49 | - if (!(bool)$record->readed) { |
|
49 | + if (!(bool) $record->readed) { |
|
50 | 50 | $btngrp->add('<i class="fa fa-bookmark-o"></i>', ['feedback/turn', ['read', $record->id]], ['class' => 'btn btn-success', 'html' => true, 'data-toggle' => 'tooltip', 'title' => __('Mark as read')]); |
51 | 51 | } |
52 | 52 | |
53 | 53 | // show close/open button depend of current status |
54 | - if (!(bool)$record->closed) { |
|
54 | + if (!(bool) $record->closed) { |
|
55 | 55 | $btngrp->add('<i class="fa fa-eye-slash"></i>', ['feedback/turn', ['close', $record->id]], ['class' => 'btn btn-warning', 'html' => true, 'data-toggle' => 'tooltip', 'title' => __('Close')]); |
56 | 56 | } else { |
57 | 57 | $btngrp->add('<i class="fa fa-eye"></i>', ['feedback/turn', ['open', $record->id]], ['class' => 'btn btn-info', 'html' => true, 'data-toggle' => 'tooltip', 'title' => __('Open')]); |
@@ -64,8 +64,8 @@ discard block |
||
64 | 64 | </div> |
65 | 65 | <div class="card-body"> |
66 | 66 | <?php |
67 | - if ((bool)$record->closed) { |
|
68 | - echo '<p class="alert alert-warning">' . __('The feedback request is closed! Thread in only-read mode') . '.</p>'; |
|
67 | + if ((bool) $record->closed) { |
|
68 | + echo '<p class="alert alert-warning">'.__('The feedback request is closed! Thread in only-read mode').'.</p>'; |
|
69 | 69 | } |
70 | 70 | ?> |
71 | 71 | <p><?= Str::replace("\n", "<br />", $record->message) ?></p> |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | <div class="card-body"> |
81 | 81 | <?php |
82 | 82 | $uInfo = 'no'; |
83 | - if ((int)$record->user_id > 0) { |
|
83 | + if ((int) $record->user_id > 0) { |
|
84 | 84 | $user = \App::$User->identity($record->user_id); |
85 | 85 | if ($user && $user->getId() > 0) { |
86 | 86 | $uInfo = Url::a(['user/update', [$user->getId()]], $user->profile->getNickname()); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | <?php foreach ($record->answers as $answer): ?> |
104 | 104 | <div class="card"> |
105 | 105 | <div class="card-header"> |
106 | - <?= __('From') ?>: <?= $answer->name . '(' . $answer->email . ')' . ((int)$answer->user_id > 0 ? Url::a(['user/update', [$answer->user_id]], '[id' . $answer->user_id . ']') : null) ?>, |
|
106 | + <?= __('From') ?>: <?= $answer->name.'('.$answer->email.')'.((int) $answer->user_id > 0 ? Url::a(['user/update', [$answer->user_id]], '[id'.$answer->user_id.']') : null) ?>, |
|
107 | 107 | <?= Date::convertToDatetime($answer->created_at, Date::FORMAT_TO_HOUR) ?> |
108 | 108 | <div class="pull-right"> |
109 | 109 | <?= $this->bootstrap()->btngroup(['class' => 'btn-group btn-group-sm']) |
@@ -26,7 +26,7 @@ |
||
26 | 26 | <div class="table-responsive"> |
27 | 27 | <?= $this->table(['class' => 'table table-bordered']) |
28 | 28 | ->body([ |
29 | - [['text' => __('Sender')], ['text' => $record->name . ' (' . $record->email . ')']], |
|
29 | + [['text' => __('Sender')], ['text' => $record->name.' ('.$record->email.')']], |
|
30 | 30 | [['text' => __('Date')], ['text' => Date::convertToDatetime($record->created_at, Date::FORMAT_TO_HOUR)]], |
31 | 31 | [['text' => __('Message')], ['text' => $record->message]] |
32 | 32 | ])->display() ?> |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | <h1><?= __('Sitemap') ?></h1> |
21 | 21 | |
22 | 22 | <p><?= __('Sitemap its a special application to generate sitemap as xml file over sitemap standart for search engines.') ?></p> |
23 | -<p><?= __('Sitemap main index') ?>: <a href="<?= \App::$Alias->scriptUrl . '/sitemap' ?>" target="_blank">/sitemap</a></p> |
|
23 | +<p><?= __('Sitemap main index') ?>: <a href="<?= \App::$Alias->scriptUrl.'/sitemap' ?>" target="_blank">/sitemap</a></p> |
|
24 | 24 | <h3><?= __('Sitemap files') ?></h3> |
25 | 25 | <?php |
26 | 26 | $items = []; |
@@ -32,8 +32,8 @@ discard block |
||
32 | 32 | |
33 | 33 | $list = $this->listing('ul'); |
34 | 34 | |
35 | -foreach($model->files as $file) { |
|
36 | - $list->li(['type' => 'link', 'link' => \Ffcms\Core\App::$Alias->scriptUrl . $file, 'text' => $file, 'linkProperties' => ['target' => '_blank']]); |
|
35 | +foreach ($model->files as $file) { |
|
36 | + $list->li(['type' => 'link', 'link' => \Ffcms\Core\App::$Alias->scriptUrl.$file, 'text' => $file, 'linkProperties' => ['target' => '_blank']]); |
|
37 | 37 | } |
38 | 38 | echo $list->display(); |
39 | 39 | ?> |
@@ -55,16 +55,16 @@ discard block |
||
55 | 55 | $this->data[$lang][] = [ |
56 | 56 | 'uri' => Url::stringUrl($uri, $lang), |
57 | 57 | 'lastmod' => Date::convertToDatetime($lastmod, 'c'), |
58 | - 'freq' => (string)$freq, |
|
59 | - 'priority' => (float)$priority |
|
58 | + 'freq' => (string) $freq, |
|
59 | + 'priority' => (float) $priority |
|
60 | 60 | ]; |
61 | 61 | } |
62 | 62 | } else { // only one language, multilanguage is disabled |
63 | 63 | $this->data[App::$Properties->get('singleLanguage')][] = [ |
64 | 64 | 'uri' => Url::stringUrl($uri), |
65 | 65 | 'lastmod' => Date::convertToDatetime($lastmod, 'c'), |
66 | - 'freq' => (string)$freq, |
|
67 | - 'priority' => (float)$priority |
|
66 | + 'freq' => (string) $freq, |
|
67 | + 'priority' => (float) $priority |
|
68 | 68 | ]; |
69 | 69 | } |
70 | 70 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | 'items' => $items |
88 | 88 | ]); |
89 | 89 | |
90 | - File::write(EntityIndexList::INDEX_PATH . '/' . $uniqueName . '.' . $lang . '.xml', $xml); |
|
90 | + File::write(EntityIndexList::INDEX_PATH.'/'.$uniqueName.'.'.$lang.'.xml', $xml); |
|
91 | 91 | } |
92 | 92 | return true; |
93 | 93 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | public function delete(string $type, ?string $id = null): ?string |
34 | 34 | { |
35 | 35 | // sounds like a multiply delete definition |
36 | - if (!$id || (int)$id < 1) { |
|
36 | + if (!$id || (int) $id < 1) { |
|
37 | 37 | $ids = $this->request->query->get('selected'); |
38 | 38 | if (!Any::isArray($ids) || !Arr::onlyNumericValues($ids)) { |
39 | 39 | throw new NotFoundException('Bad conditions'); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | if ($model->send() && $model->validate()) { |
69 | 69 | $model->make(); |
70 | 70 | App::$Session->getFlashBag()->add('success', __('Comments or answers are successful deleted!')); |
71 | - $this->response->redirect('comments/' . ($type === self::TYPE_ANSWER ? 'answerlist' : 'index')); |
|
71 | + $this->response->redirect('comments/'.($type === self::TYPE_ANSWER ? 'answerlist' : 'index')); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | // render view |
@@ -23,7 +23,7 @@ |
||
23 | 23 | public function index(): ?string |
24 | 24 | { |
25 | 25 | // set current page and offset |
26 | - $page = (int)$this->request->query->get('page'); |
|
26 | + $page = (int) $this->request->query->get('page'); |
|
27 | 27 | $offset = $page * self::ITEM_PER_PAGE; |
28 | 28 | |
29 | 29 | // get result as active records object with offset |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | public function publish(string $type, ?string $id = null): ?string |
33 | 33 | { |
34 | 34 | // check if it multiple accept ids |
35 | - if (!$id || (int)$id < 1) { |
|
35 | + if (!$id || (int) $id < 1) { |
|
36 | 36 | $ids = $this->request->query->get('selected'); |
37 | 37 | if (!Any::isArray($ids) || !Arr::onlyNumericValues($ids)) { |
38 | 38 | throw new NotFoundException('Bad conditions'); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | if ($model->send()) { |
66 | 66 | $model->make(); |
67 | 67 | App::$Session->getFlashBag()->add('success', __('Comments or answers are successful published')); |
68 | - $this->response->redirect('comments/' . ($type === 'answer' ? 'answerlist' : 'index')); |
|
68 | + $this->response->redirect('comments/'.($type === 'answer' ? 'answerlist' : 'index')); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | return $this->view->render('comments/publish', [ |