@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | $this->checkModuleAccess($tree); |
162 | 162 | |
163 | 163 | $privatize_export = $request->get('privatize_export'); |
164 | - $convert = (bool)$request->get('convert'); |
|
164 | + $convert = (bool) $request->get('convert'); |
|
165 | 165 | |
166 | 166 | $cart = Session::get('cart', []); |
167 | 167 | |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | |
275 | 275 | // Create a source, to indicate the source of the data. |
276 | 276 | $filetext .= "0 @WEBTREES@ SOUR\n1 TITL " . WT_BASE_URL . "\n"; |
277 | - $author = User::find($tree->getPreference('CONTACT_EMAIL')); |
|
277 | + $author = User::find($tree->getPreference('CONTACT_EMAIL')); |
|
278 | 278 | if ($author !== null) { |
279 | 279 | $filetext .= '1 AUTH ' . $author->getRealName() . "\n"; |
280 | 280 | } |
@@ -110,8 +110,8 @@ discard block |
||
110 | 110 | public function postAdminAction(Request $request): RedirectResponse |
111 | 111 | { |
112 | 112 | foreach (Tree::getAll() as $tree) { |
113 | - $include_in_sitemap = (bool)$request->get('sitemap' . $tree->getTreeId()); |
|
114 | - $tree->setPreference('include_in_sitemap', (string)$include_in_sitemap); |
|
113 | + $include_in_sitemap = (bool) $request->get('sitemap' . $tree->getTreeId()); |
|
114 | + $tree->setPreference('include_in_sitemap', (string) $include_in_sitemap); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | FlashMessages::addMessage(I18N::translate('The preferences for the module “%s” have been updated.', $this->getTitle()), 'success'); |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | */ |
127 | 127 | public function getIndexAction(Request $request): Response |
128 | 128 | { |
129 | - $timestamp = (int)$this->getPreference('sitemap.timestamp'); |
|
129 | + $timestamp = (int) $this->getPreference('sitemap.timestamp'); |
|
130 | 130 | |
131 | 131 | if ($timestamp > WT_TIMESTAMP - self::CACHE_LIFE) { |
132 | 132 | $content = $this->getPreference('sitemap.xml'); |
@@ -183,12 +183,12 @@ discard block |
||
183 | 183 | throw new NotFoundHttpException('Bad sitemap file'); |
184 | 184 | } |
185 | 185 | |
186 | - $timestamp = (int)$this->getPreference('sitemap-' . $file . '.timestamp'); |
|
186 | + $timestamp = (int) $this->getPreference('sitemap-' . $file . '.timestamp'); |
|
187 | 187 | |
188 | 188 | if ($timestamp > WT_TIMESTAMP - self::CACHE_LIFE) { |
189 | 189 | $content = $this->getPreference('sitemap-' . $file . '.xml'); |
190 | 190 | } else { |
191 | - $tree = Tree::findById((int)$match[1]); |
|
191 | + $tree = Tree::findById((int) $match[1]); |
|
192 | 192 | |
193 | 193 | if ($tree === null) { |
194 | 194 | throw new NotFoundHttpException('No such tree'); |
@@ -59,7 +59,7 @@ |
||
59 | 59 | } else { |
60 | 60 | $title = I18N::translate('Sign in'); |
61 | 61 | $content = view('modules/login_block/sign-in', [ |
62 | - 'allow_register' => (bool)Site::getPreference('USE_REGISTRATION_MODULE'), |
|
62 | + 'allow_register' => (bool) Site::getPreference('USE_REGISTRATION_MODULE'), |
|
63 | 63 | ]); |
64 | 64 | } |
65 | 65 |
@@ -57,7 +57,7 @@ |
||
57 | 57 | $days = $this->getBlockSetting($block_id, 'days', self::DEFAULT_DAYS); |
58 | 58 | $infoStyle = $this->getBlockSetting($block_id, 'infoStyle', self::DEFAULT_INFO_STYLE); |
59 | 59 | $sortStyle = $this->getBlockSetting($block_id, 'sortStyle', self::DEFAULT_SORT_STYLE); |
60 | - $show_user = (bool)$this->getBlockSetting($block_id, 'show_user', self::DEFAULT_SHOW_USER); |
|
60 | + $show_user = (bool) $this->getBlockSetting($block_id, 'show_user', self::DEFAULT_SHOW_USER); |
|
61 | 61 | |
62 | 62 | extract($cfg, EXTR_OVERWRITE); |
63 | 63 |
@@ -105,7 +105,7 @@ |
||
105 | 105 | |
106 | 106 | $default_events = implode(',', self::DEFAULT_EVENTS); |
107 | 107 | |
108 | - $filter = (bool)$this->getBlockSetting($block_id, 'filter', '1'); |
|
108 | + $filter = (bool) $this->getBlockSetting($block_id, 'filter', '1'); |
|
109 | 109 | $infoStyle = $this->getBlockSetting($block_id, 'infoStyle', 'table'); |
110 | 110 | $sortStyle = $this->getBlockSetting($block_id, 'sortStyle', 'alpha'); |
111 | 111 | $events = $this->getBlockSetting($block_id, 'events', $default_events); |
@@ -76,7 +76,7 @@ |
||
76 | 76 | " ORDER BY page_count DESC LIMIT :limit" |
77 | 77 | )->execute([ |
78 | 78 | 'tree_id' => $tree->getTreeId(), |
79 | - 'limit' => (int)$num, |
|
79 | + 'limit' => (int) $num, |
|
80 | 80 | ])->fetchAssoc(); |
81 | 81 | |
82 | 82 | $content = '<table>'; |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | if ($changes === '1' && $sendmail === '1') { |
75 | 75 | // There are pending changes - tell moderators/managers/administrators about them. |
76 | - if (WT_TIMESTAMP - (int)Site::getPreference('LAST_CHANGE_EMAIL') > (60 * 60 * 24 * $days)) { |
|
76 | + if (WT_TIMESTAMP - (int) Site::getPreference('LAST_CHANGE_EMAIL') > (60 * 60 * 24 * $days)) { |
|
77 | 77 | // Which users have pending changes? |
78 | 78 | foreach (User::all() as $user) { |
79 | 79 | if ($user->getPreference('contactmethod') !== 'none') { |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | I18N::init($user->getPreference('language')); |
83 | 83 | |
84 | 84 | $sender = new User( |
85 | - (object)[ |
|
85 | + (object) [ |
|
86 | 86 | 'user_id' => null, |
87 | 87 | 'user_name' => '', |
88 | 88 | 'real_name' => $tree->getTitle(), |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | } |
120 | 120 | if ($sendmail === '1') { |
121 | 121 | $content .= I18N::translate('Last email reminder was sent ') . FunctionsDate::formatTimestamp(Site::getPreference('LAST_CHANGE_EMAIL')) . '<br>'; |
122 | - $content .= I18N::translate('Next email reminder will be sent after ') . FunctionsDate::formatTimestamp((int)Site::getPreference('LAST_CHANGE_EMAIL') + (60 * 60 * 24 * $days)) . '<br><br>'; |
|
122 | + $content .= I18N::translate('Next email reminder will be sent after ') . FunctionsDate::formatTimestamp((int) Site::getPreference('LAST_CHANGE_EMAIL') + (60 * 60 * 24 * $days)) . '<br><br>'; |
|
123 | 123 | } |
124 | 124 | $content .= '<ul>'; |
125 | 125 | $changes = Database::prepare( |
@@ -153,7 +153,7 @@ |
||
153 | 153 | 'user_id' => Auth::id(), |
154 | 154 | ])->fetchOneRow(); |
155 | 155 | } else { |
156 | - $row = (object)[ |
|
156 | + $row = (object) [ |
|
157 | 157 | 'body' => '', |
158 | 158 | 'subject' => '', |
159 | 159 | ]; |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | 'generations' => 3, |
85 | 85 | 'layout' => PedigreeChartController::PORTRAIT, |
86 | 86 | ]); |
87 | - $content = view('modules/charts/chart', [ |
|
87 | + $content = view('modules/charts/chart', [ |
|
88 | 88 | 'block_id' => $block_id, |
89 | 89 | 'chart_url' => $chart_url, |
90 | 90 | ]); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | 'generations' => 2, |
98 | 98 | 'chart_style' => 0, |
99 | 99 | ]); |
100 | - $content = view('modules/charts/chart', [ |
|
100 | + $content = view('modules/charts/chart', [ |
|
101 | 101 | 'block_id' => $block_id, |
102 | 102 | 'chart_url' => $chart_url, |
103 | 103 | ]); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | 'generations' => 2, |
111 | 111 | 'layout' => PedigreeChartController::PORTRAIT, |
112 | 112 | ]); |
113 | - $content = view('modules/charts/chart', [ |
|
113 | + $content = view('modules/charts/chart', [ |
|
114 | 114 | 'block_id' => $block_id, |
115 | 115 | 'chart_url' => $chart_url, |
116 | 116 | ]); |