Completed
Pull Request — master (#1865)
by Rico
14:27 queued 04:02
created
app/Module/ClippingsCartModule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
app/Module/SiteMapModule.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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');
Please login to merge, or discard this patch.
app/Module/LoginBlockModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
app/Module/RecentChangesModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
app/Module/OnThisDayModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
app/Module/TopPageViewsModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
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>';
Please login to merge, or discard this patch.
app/Module/ReviewChangesModule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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(
Please login to merge, or discard this patch.
app/Module/AbstractModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -235,7 +235,7 @@
 block discarded – undo
235 235
         if ($access_level === null) {
236 236
             return $this->defaultAccessLevel();
237 237
         } else {
238
-            return (int)$access_level;
238
+            return (int) $access_level;
239 239
         }
240 240
     }
241 241
 
Please login to merge, or discard this patch.
app/Module/UserJournalModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@
 block discarded – undo
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
             ];
Please login to merge, or discard this patch.