@@ -2,4 +2,4 @@ |
||
2 | 2 | define('root', __DIR__); |
3 | 3 | error_reporting(E_ALL ^ E_NOTICE); |
4 | 4 | |
5 | -require_once(root . '/Loader/Cron/index.php'); |
|
6 | 5 | \ No newline at end of file |
6 | +require_once(root.'/Loader/Cron/index.php'); |
|
7 | 7 | \ No newline at end of file |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | public function __construct($query, $limit = 10) |
25 | 25 | { |
26 | 26 | $this->query = $query; |
27 | - $this->limit = (int)$limit; |
|
27 | + $this->limit = (int) $limit; |
|
28 | 28 | if ($this->limit < 1) { |
29 | 29 | $this->limit = 1; |
30 | 30 | } |
@@ -64,8 +64,8 @@ discard block |
||
64 | 64 | $res->setTitle($title); |
65 | 65 | $res->setSnippet($snippet); |
66 | 66 | $res->setDate($item->created_at); |
67 | - $res->setRelevance((int)$item->relevance); |
|
68 | - $res->setUri('/content/read/' . $item->getPath()); |
|
67 | + $res->setRelevance((int) $item->relevance); |
|
68 | + $res->setUri('/content/read/'.$item->getPath()); |
|
69 | 69 | |
70 | 70 | // accumulate response var |
71 | 71 | $result[] = $res; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | public function __construct($query, $limit = 10) |
27 | 27 | { |
28 | 28 | $this->query = $query; |
29 | - $this->limit = (int)$limit; |
|
29 | + $this->limit = (int) $limit; |
|
30 | 30 | if ($this->limit < 1) { |
31 | 31 | $this->limit = 1; |
32 | 32 | } |
@@ -61,9 +61,9 @@ discard block |
||
61 | 61 | $instance = new AbstractSearchResult(); |
62 | 62 | $instance->setTitle(App::$Translate->get('Search', 'Comment on the page')); |
63 | 63 | $instance->setSnippet($snippet); |
64 | - $instance->setUri($item->pathway . '#comments-list'); |
|
64 | + $instance->setUri($item->pathway.'#comments-list'); |
|
65 | 65 | $instance->setDate($item->created_at); |
66 | - $instance->setRelevance((int)$item->relevance); |
|
66 | + $instance->setRelevance((int) $item->relevance); |
|
67 | 67 | |
68 | 68 | // add instance to result set |
69 | 69 | $result[] = $instance; |
@@ -65,7 +65,7 @@ |
||
65 | 65 | $class = 'label-danger'; |
66 | 66 | $tooltip = __('Location: %loc%. Required permissions: +rw', ['loc' => $dir]); |
67 | 67 | } |
68 | - echo '<span class="label ' . $class . '" data-toggle="tooltip" title="' . $tooltip . '">' . $dir . '</span> '; |
|
68 | + echo '<span class="label '.$class.'" data-toggle="tooltip" title="'.$tooltip.'">'.$dir.'</span> '; |
|
69 | 69 | } |
70 | 70 | ?> |
71 | 71 | <hr /> |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | */ |
39 | 39 | public function __construct($provider, $identity) |
40 | 40 | { |
41 | - $this->_provider_name = (string)$provider; |
|
41 | + $this->_provider_name = (string) $provider; |
|
42 | 42 | $this->_identity = $identity; |
43 | 43 | parent::__construct(false); |
44 | 44 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | } |
126 | 126 | // set birthday if available |
127 | 127 | if ($this->_identity->birthDay !== null && $this->_identity->birthMonth !== null && $this->_identity->birthYear !== null) { |
128 | - $profile->birthday = $this->_identity->birthYear . '-' . $this->_identity->birthMonth . '-' . $this->_identity->birthDay; |
|
128 | + $profile->birthday = $this->_identity->birthYear.'-'.$this->_identity->birthMonth.'-'.$this->_identity->birthDay; |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | // try to parse avatar from remote service |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | protected function parseAvatar($url, $userId) |
149 | 149 | { |
150 | 150 | // check if user is defined |
151 | - if ((int)$userId < 1) { |
|
151 | + if ((int) $userId < 1) { |
|
152 | 152 | return; |
153 | 153 | } |
154 | 154 | |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | } |
166 | 166 | |
167 | 167 | // write image to filesystem |
168 | - $imagePath = '/upload/user/avatar/original/' . $userId . '.' . $imageExtension; |
|
168 | + $imagePath = '/upload/user/avatar/original/'.$userId.'.'.$imageExtension; |
|
169 | 169 | $write = File::write($imagePath, $imageContent); |
170 | 170 | if ($write === false) { |
171 | 171 | return; |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | |
174 | 174 | // try to write and resize file |
175 | 175 | try { |
176 | - $fileObject = new FileObject(root . $imagePath); |
|
176 | + $fileObject = new FileObject(root.$imagePath); |
|
177 | 177 | $avatarUpload = new FormAvatarUpload(); |
178 | 178 | $avatarUpload->resizeAndSave($fileObject, $userId, 'small'); |
179 | 179 | $avatarUpload->resizeAndSave($fileObject, $userId, 'medium'); |
@@ -95,5 +95,5 @@ |
||
95 | 95 | </div> |
96 | 96 | <?php if (count($staticItems) < 1 && count($dynamicItems) < 1): ?> |
97 | 97 | <p class="alert alert-warning"><?= __('Custom routes is not yet found') ?></p> |
98 | -<?php endif ;?> |
|
99 | -<?= Url::link(['main/addroute'], '<i class="fa fa-plus"></i> ' . __('New route'), ['class' => 'btn btn-primary']) ?> |
|
100 | 98 | \ No newline at end of file |
99 | +<?php endif; ?> |
|
100 | +<?= Url::link(['main/addroute'], '<i class="fa fa-plus"></i> '.__('New route'), ['class' => 'btn btn-primary']) ?> |
|
101 | 101 | \ No newline at end of file |
@@ -52,16 +52,16 @@ discard block |
||
52 | 52 | $this->data[$lang][] = [ |
53 | 53 | 'uri' => Url::standaloneUrl($uri, $lang), |
54 | 54 | 'lastmod' => Date::convertToDatetime($lastmod, 'c'), |
55 | - 'freq' => (string)$freq, |
|
56 | - 'priority' => (float)$priority |
|
55 | + 'freq' => (string) $freq, |
|
56 | + 'priority' => (float) $priority |
|
57 | 57 | ]; |
58 | 58 | } |
59 | 59 | } else { // only one language, multilanguage is disabled |
60 | 60 | $this->data[App::$Properties->get('singleLanguage')][] = [ |
61 | 61 | 'uri' => Url::standaloneUrl($uri), |
62 | 62 | 'lastmod' => Date::convertToDatetime($lastmod, 'c'), |
63 | - 'freq' => (string)$freq, |
|
64 | - 'priority' => (float)$priority |
|
63 | + 'freq' => (string) $freq, |
|
64 | + 'priority' => (float) $priority |
|
65 | 65 | ]; |
66 | 66 | } |
67 | 67 | } |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | 'items' => $items |
87 | 87 | ]); |
88 | 88 | |
89 | - File::write(EntityIndexList::INDEX_PATH . '/' . $uniqueName . '.' . $lang . '.xml', $xml); |
|
89 | + File::write(EntityIndexList::INDEX_PATH.'/'.$uniqueName.'.'.$lang.'.xml', $xml); |
|
90 | 90 | } |
91 | 91 | return true; |
92 | 92 | } |
@@ -15,19 +15,19 @@ |
||
15 | 15 | <h1><?= __('Sitemap') ?></h1> |
16 | 16 | <hr /> |
17 | 17 | <p><?= __('Sitemap its a special application to generate sitemap as xml file over sitemap standart for search engines.') ?></p> |
18 | -<p><?= __('Sitemap main index') ?>: <a href="<?= \App::$Alias->scriptUrl . '/sitemap' ?>" target="_blank">/sitemap</a></p> |
|
18 | +<p><?= __('Sitemap main index') ?>: <a href="<?= \App::$Alias->scriptUrl.'/sitemap' ?>" target="_blank">/sitemap</a></p> |
|
19 | 19 | <h3><?= __('Sitemap files') ?></h3> |
20 | 20 | <?php |
21 | 21 | $items = []; |
22 | 22 | if ($model->files === null || count($model->files) < 1) { |
23 | - echo '<p class="alert alert-warning">' . __('No sitemap files found! Maybe cron manager is not configured') . '</p>'; |
|
23 | + echo '<p class="alert alert-warning">'.__('No sitemap files found! Maybe cron manager is not configured').'</p>'; |
|
24 | 24 | return; |
25 | 25 | } |
26 | 26 | |
27 | -foreach($model->files as $file) { |
|
27 | +foreach ($model->files as $file) { |
|
28 | 28 | $items[] = [ |
29 | 29 | 'type' => 'link', |
30 | - 'link' => \App::$Alias->scriptUrl . $file, |
|
30 | + 'link' => \App::$Alias->scriptUrl.$file, |
|
31 | 31 | 'text' => $file, |
32 | 32 | 'linkProperty' => ['target' => '_blank'] |
33 | 33 | ]; |
@@ -62,7 +62,7 @@ |
||
62 | 62 | // add user notification |
63 | 63 | if ($target->id !== $viewer->id) { |
64 | 64 | $notify = new EntityAddNotification($target->id); |
65 | - $notify->add('profile/show/' . $target->id . '#wall-post-' . $record->id, EntityAddNotification::MSG_ADD_WALLPOST, ['snippet' => Text::snippet($this->message, 50)]); |
|
65 | + $notify->add('profile/show/'.$target->id.'#wall-post-'.$record->id, EntityAddNotification::MSG_ADD_WALLPOST, ['snippet' => Text::snippet($this->message, 50)]); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | // cleanup message |