Completed
Push — next ( 284136...dff8f5 )
by Thomas
07:50 queued 03:59
created
htdocs/log.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
     $fieldNoteService = AppKernel::Container()->get(FieldNoteService::class);
50 50
 
51 51
     $fieldNote = $fieldNoteService->fetchOneBy([
52
-        'id' => (int) $_GET['fieldnoteid'],
53
-        'user_id' => (int) $user->getUserId()
52
+        'id' => (int)$_GET['fieldnoteid'],
53
+        'user_id' => (int)$user->getUserId()
54 54
     ]);
55 55
 
56 56
     if ($fieldNote !== null) {
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     // check if masslog warning is accepted (in cookie)
97 97
     $masslogCookieSet = isset($_COOKIE['ocsuppressmasslogwarn']);
98 98
     if ($masslogCookieSet) {
99
-        $masslogCookieContent = (int) $_COOKIE['ocsuppressmasslogwarn'];
99
+        $masslogCookieContent = (int)$_COOKIE['ocsuppressmasslogwarn'];
100 100
     } else {
101 101
         // save masslog acception in cookie that expires on midnight if clicked
102 102
         if (isset($_REQUEST['suppressMasslogWarning']) && $_REQUEST['suppressMasslogWarning'] == 1) {
@@ -108,17 +108,17 @@  discard block
 block discarded – undo
108 108
     //   logtext, logtype, logday, logmonth, logyear
109 109
 
110 110
     $logText = isset($_POST['logtext']) ? trim($_POST['logtext']) : '';
111
-    $logType = isset($_REQUEST['logtype']) ? (int) $_REQUEST['logtype'] : null;
111
+    $logType = isset($_REQUEST['logtype']) ? (int)$_REQUEST['logtype'] : null;
112 112
     $logDateDay = isset($_POST['logday']) ? trim($_POST['logday']) : ($datesaved ? $defaultLogDay : date('d'));
113 113
     $logDateMonth = isset($_POST['logmonth']) ? trim($_POST['logmonth']) : ($datesaved ? $defaultLogMonth : date('m'));
114 114
     $logDateYear = isset($_POST['logyear']) ? trim($_POST['logyear']) : ($datesaved ? $defaultLogYear : date('Y'));
115 115
     $logTimeHour = isset($_POST['loghour']) ? trim($_POST['loghour']) : '';
116 116
     $logTimeMinute = isset($_POST['logminute']) ? trim($_POST['logminute']) : '';
117
-    $needsMaintenance = isset($_POST['needs_maintenance2']) ? (int) $_POST['needs_maintenance2'] : (isset($_POST['needs_maintenance']) ? (int) $_POST['needs_maintenance'] : 0);
118
-    $listingOutdated = isset($_POST['listing_outdated2']) ? (int) $_POST['listing_outdated2'] : (isset($_POST['listing_outdated']) ? (int) $_POST['listing_outdated'] : 0);
119
-    $confirmListingOk = isset($_POST['confirm_listing_ok']) ? (int) $_POST['confirm_listing_ok'] : 0;
120
-    $rateOption = isset($_POST['ratingoption']) ? (int) $_POST['ratingoption'] : 0;
121
-    $rateCache = isset($_POST['rating']) ? (int) $_POST['rating'] : 0;
117
+    $needsMaintenance = isset($_POST['needs_maintenance2']) ? (int)$_POST['needs_maintenance2'] : (isset($_POST['needs_maintenance']) ? (int)$_POST['needs_maintenance'] : 0);
118
+    $listingOutdated = isset($_POST['listing_outdated2']) ? (int)$_POST['listing_outdated2'] : (isset($_POST['listing_outdated']) ? (int)$_POST['listing_outdated'] : 0);
119
+    $confirmListingOk = isset($_POST['confirm_listing_ok']) ? (int)$_POST['confirm_listing_ok'] : 0;
120
+    $rateOption = isset($_POST['ratingoption']) ? (int)$_POST['ratingoption'] : 0;
121
+    $rateCache = isset($_POST['rating']) ? (int)$_POST['rating'] : 0;
122 122
     $ocTeamComment = isset($_REQUEST['teamcomment']) ? $_REQUEST['teamcomment'] != 0 : 0;
123 123
     $suppressMasslogWarning = isset($_REQUEST['suppressMasslogWarning']) ? $_REQUEST['suppressMasslogWarning'] : ($masslogCookieSet ? $masslogCookieContent : 0);
124 124
 
@@ -164,12 +164,12 @@  discard block
 block discarded – undo
164 164
     }
165 165
 
166 166
     // if not a found log, ignore the rating
167
-    $rateOption = (int) ($logType == 1 || $logType == 7);
167
+    $rateOption = (int)($logType == 1 || $logType == 7);
168 168
 
169 169
     // get log text editor mode (from form or from userprofile)
170 170
     // 1 = text; 2 = HTML; 3 = tinyMCE
171 171
     if (isset($_POST['descMode'])) {
172
-        $descMode = (int) $_POST['descMode'];  // Ocprop: 2
172
+        $descMode = (int)$_POST['descMode']; // Ocprop: 2
173 173
         if (($descMode < 1) || ($descMode > 3)) {
174 174
             $descMode = 3;
175 175
         }
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
          * set seconds 00:00:01, means "00:00 was logged"
252 252
          * set seconds 00:00:00, means "no time was logged"
253 253
          */
254
-        $logTimeSecond = (int) ($logTimeHour . $logTimeMinute != ''
254
+        $logTimeSecond = (int)($logTimeHour . $logTimeMinute != ''
255 255
                 && $logTimeHour == 0
256 256
                 && $logTimeMinute == 0);
257 257
 
@@ -259,8 +259,8 @@  discard block
 block discarded – undo
259 259
         $logDate = date(
260 260
             $opt['db']['dateformat'],
261 261
             mktime(
262
-                (int) $logTimeHour,
263
-                (int) $logTimeMinute,
262
+                (int)$logTimeHour,
263
+                (int)$logTimeMinute,
264 264
                 $logTimeSecond,
265 265
                 $logDateMonth,
266 266
                 $logDateDay,
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
             if (isset($_REQUEST['fieldnoteid']) && $_REQUEST['fieldnoteid']) {
312 312
                 sql(
313 313
                     'DELETE FROM field_note WHERE `id` = &1 AND `user_id` = &2',
314
-                    (int) $_REQUEST['fieldnoteid'],
314
+                    (int)$_REQUEST['fieldnoteid'],
315 315
                     $user->getUserId()
316 316
                 );
317 317
 
@@ -398,8 +398,8 @@  discard block
 block discarded – undo
398 398
 
399 399
 // prepare template and display
400 400
 $tpl->assign('logtype_allows_nm', implode(',', $logtype_allows_nm));
401
-$tpl->assign('scrollposx', isset($_REQUEST['scrollposx']) ? (int) $_REQUEST['scrollposx']: 0);
402
-$tpl->assign('scrollposy', isset($_REQUEST['scrollposy']) ? (int) $_REQUEST['scrollposy']: 0);
401
+$tpl->assign('scrollposx', isset($_REQUEST['scrollposx']) ? (int)$_REQUEST['scrollposx'] : 0);
402
+$tpl->assign('scrollposy', isset($_REQUEST['scrollposy']) ? (int)$_REQUEST['scrollposy'] : 0);
403 403
 $tpl->assign('validate', $validate);
404 404
 $tpl->assign('editlog', false);
405 405
 
Please login to merge, or discard this patch.
htdocs/src/Oc/Page/Persistence/PageRepository.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             $databaseArray
76 76
         );
77 77
 
78
-        $entity->id = (int) $this->connection->lastInsertId();
78
+        $entity->id = (int)$this->connection->lastInsertId();
79 79
 
80 80
         return $entity;
81 81
     }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
             ['id' => $entity->id]
100 100
         );
101 101
 
102
-        $entity->id = (int) $this->connection->lastInsertId();
102
+        $entity->id = (int)$this->connection->lastInsertId();
103 103
 
104 104
         return $entity;
105 105
     }
@@ -147,13 +147,13 @@  discard block
 block discarded – undo
147 147
     public function getEntityFromDatabaseArray(array $data): PageEntity
148 148
     {
149 149
         $entity = new PageEntity();
150
-        $entity->id = (int) $data['id'];
150
+        $entity->id = (int)$data['id'];
151 151
         $entity->slug = $data['slug'];
152 152
         $entity->metaKeywords = $data['meta_keywords'];
153 153
         $entity->metaDescription = $data['meta_description'];
154 154
         $entity->metaSocial = $data['meta_social'];
155 155
         $entity->updatedAt = new DateTime($data['updated_at']);
156
-        $entity->active = (bool) $data['active'];
156
+        $entity->active = (bool)$data['active'];
157 157
 
158 158
         return $entity;
159 159
     }
Please login to merge, or discard this patch.
htdocs/src/Oc/Page/Persistence/BlockRepository.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             $databaseArray
84 84
         );
85 85
 
86
-        $entity->id = (int) $this->connection->lastInsertId();
86
+        $entity->id = (int)$this->connection->lastInsertId();
87 87
 
88 88
         return $entity;
89 89
     }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             ['id' => $entity->id]
108 108
         );
109 109
 
110
-        $entity->id = (int) $this->connection->lastInsertId();
110
+        $entity->id = (int)$this->connection->lastInsertId();
111 111
 
112 112
         return $entity;
113 113
     }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
             'page_id' => $entity->pageId,
144 144
             'title' => $entity->title,
145 145
             'html' => $entity->html,
146
-            'position' => (int) $entity->position,
146
+            'position' => (int)$entity->position,
147 147
             'updated_at' => $entity->updatedAt->format(DateTime::ATOM),
148 148
             'active' => $entity->active,
149 149
         ];
@@ -155,13 +155,13 @@  discard block
 block discarded – undo
155 155
     public function getEntityFromDatabaseArray(array $data): BlockEntity
156 156
     {
157 157
         $entity = new BlockEntity();
158
-        $entity->id = (int) $data['id'];
159
-        $entity->pageId = (int) $data['page_id'];
158
+        $entity->id = (int)$data['id'];
159
+        $entity->pageId = (int)$data['page_id'];
160 160
         $entity->title = $data['title'];
161 161
         $entity->html = $data['html'];
162
-        $entity->position = (int) $data['position'];
162
+        $entity->position = (int)$data['position'];
163 163
         $entity->updatedAt = new DateTime($data['updated_at']);
164
-        $entity->active = (bool) $data['active'];
164
+        $entity->active = (bool)$data['active'];
165 165
 
166 166
         return $entity;
167 167
     }
Please login to merge, or discard this patch.
htdocs/src/Oc/Menu/Renderer/MainRenderer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     {
56 56
         $options = array_merge($this->defaultOptions, $options);
57 57
 
58
-        $childrenClass = (array) $item->getChildrenAttribute('class');
58
+        $childrenClass = (array)$item->getChildrenAttribute('class');
59 59
 
60 60
         if ($options['listClass']) {
61 61
             $childrenClass[] = $options['listClass'];
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         }
138 138
 
139 139
         // create an array than can be imploded as a class list
140
-        $class = (array) $item->getAttribute('class');
140
+        $class = (array)$item->getAttribute('class');
141 141
 
142 142
         if ($options['itemClass']) {
143 143
             $class[] = $options['itemClass'];
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         $html .= $this->renderLink($item, $options);
179 179
 
180 180
         // renders the embedded ul
181
-        $childrenClass = (array) $item->getChildrenAttribute('class');
181
+        $childrenClass = (array)$item->getChildrenAttribute('class');
182 182
         if ($options['listClass']) {
183 183
             $childrenClass[] = $options['listClass'];
184 184
         }
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 
220 220
     protected function renderLinkElement(ItemInterface $item, array $options): string
221 221
     {
222
-        $childrenClass = (array) $item->getChildrenAttribute('class');
222
+        $childrenClass = (array)$item->getChildrenAttribute('class');
223 223
 
224 224
         if ($options['linkClass']) {
225 225
             $childrenClass[] = $options['linkClass'];
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 
234 234
     protected function renderSpanElement(ItemInterface $item, array $options): string
235 235
     {
236
-        $childrenClass = (array) $item->getChildrenAttribute('class');
236
+        $childrenClass = (array)$item->getChildrenAttribute('class');
237 237
 
238 238
         if ($options['textClass']) {
239 239
             $childrenClass[] = $options['textClass'];
Please login to merge, or discard this patch.
htdocs/src/Oc/User/UserRepository.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
             $databaseArray
94 94
         );
95 95
 
96
-        $entity->id = (int) $this->connection->lastInsertId();
96
+        $entity->id = (int)$this->connection->lastInsertId();
97 97
 
98 98
         return $entity;
99 99
     }
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             ['id' => $entity->id]
118 118
         );
119 119
 
120
-        $entity->id = (int) $this->connection->lastInsertId();
120
+        $entity->id = (int)$this->connection->lastInsertId();
121 121
 
122 122
         return $entity;
123 123
     }
@@ -189,13 +189,13 @@  discard block
 block discarded – undo
189 189
     public function getEntityFromDatabaseArray(array $data): UserEntity
190 190
     {
191 191
         $entity = new UserEntity();
192
-        $entity->id = (int) $data['user_id'];
192
+        $entity->id = (int)$data['user_id'];
193 193
         $entity->username = $data['username'];
194 194
         $entity->password = $data['password'];
195 195
         $entity->email = $data['email'];
196
-        $entity->latitude = (double) $data['latitude'];
197
-        $entity->longitude = (double) $data['longitude'];
198
-        $entity->isActive = (bool) $data['is_active_flag'];
196
+        $entity->latitude = (double)$data['latitude'];
197
+        $entity->longitude = (double)$data['longitude'];
198
+        $entity->isActive = (bool)$data['is_active_flag'];
199 199
         $entity->firstname = $data['first_name'];
200 200
         $entity->lastname = $data['last_name'];
201 201
         $entity->country = $data['country'];
Please login to merge, or discard this patch.
htdocs/src/Oc/Translation/TranslationStruct.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
 
57 57
     public function fromCsvArray(array $data): self
58 58
     {
59
-        $this->identifier = (int) $data['Identifier'];
59
+        $this->identifier = (int)$data['Identifier'];
60 60
         $this->sourceString = $data['SourceString'];
61 61
         $this->comment = $data['Comment'];
62 62
         $this->de = $data['DE'];
Please login to merge, or discard this patch.
htdocs/src/Oc/GeoCache/Persistence/GeoCacheLog/GeoCacheLogRepository.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
             $databaseArray
165 165
         );
166 166
 
167
-        $entity->id = (int) $this->connection->lastInsertId();
167
+        $entity->id = (int)$this->connection->lastInsertId();
168 168
 
169 169
         return $entity;
170 170
     }
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
             ['id' => $entity->id]
189 189
         );
190 190
 
191
-        $entity->id = (int) $this->connection->lastInsertId();
191
+        $entity->id = (int)$this->connection->lastInsertId();
192 192
 
193 193
         return $entity;
194 194
     }
@@ -250,27 +250,27 @@  discard block
 block discarded – undo
250 250
     public function getEntityFromDatabaseArray(array $data): GeoCacheLogEntity
251 251
     {
252 252
         $entity = new GeoCacheLogEntity();
253
-        $entity->id = (int) $data['id'];
253
+        $entity->id = (int)$data['id'];
254 254
         $entity->uuid = $data['uuid'];
255
-        $entity->node = (int) $data['node'];
255
+        $entity->node = (int)$data['node'];
256 256
         $entity->dateCreated = new DateTime($data['date_created']);
257 257
         $entity->entryLastModified = new DateTime($data['entry_last_modified']);
258 258
         $entity->lastModified = new DateTime($data['last_modified']);
259
-        $entity->okapiSyncbase = (int) $data['okapi_syncbase'];
259
+        $entity->okapiSyncbase = (int)$data['okapi_syncbase'];
260 260
         $entity->logLastModified = new DateTime($data['log_last_modified']);
261
-        $entity->cacheId = (int) $data['cache_id'];
262
-        $entity->userId = (int) $data['user_id'];
263
-        $entity->type = (int) $data['type'];
264
-        $entity->ocTeamComment = (bool) $data['oc_team_comment'];
261
+        $entity->cacheId = (int)$data['cache_id'];
262
+        $entity->userId = (int)$data['user_id'];
263
+        $entity->type = (int)$data['type'];
264
+        $entity->ocTeamComment = (bool)$data['oc_team_comment'];
265 265
         $entity->date = new DateTime($data['date']);
266 266
         $entity->orderDate = new DateTime($data['order_date']);
267
-        $entity->needsMaintenance = (bool) $data['needs_maintenance'];
268
-        $entity->listingOutdated = (bool) $data['listing_outdated'];
267
+        $entity->needsMaintenance = (bool)$data['needs_maintenance'];
268
+        $entity->listingOutdated = (bool)$data['listing_outdated'];
269 269
         $entity->text = $data['text'];
270
-        $entity->textHtml = (bool) $data['text_html'];
271
-        $entity->textHtmledit = (bool) $data['text_htmledit'];
272
-        $entity->ownerNotified = (bool) $data['owner_notified'];
273
-        $entity->picture = (int) $data['picture'];
270
+        $entity->textHtml = (bool)$data['text_html'];
271
+        $entity->textHtmledit = (bool)$data['text_htmledit'];
272
+        $entity->ownerNotified = (bool)$data['owner_notified'];
273
+        $entity->picture = (int)$data['picture'];
274 274
 
275 275
         return $entity;
276 276
     }
Please login to merge, or discard this patch.
htdocs/src/Oc/Postfix/LogEntity.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     public function toDatabaseArray(): array
28 28
     {
29 29
         return [
30
-            'id' => (int) $this->id,
30
+            'id' => (int)$this->id,
31 31
             'email' => $this->email,
32 32
             'status' => $this->status,
33 33
             'created' => $this->created,
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
     public function fromDatabaseArray(array $data): self
38 38
     {
39
-        $this->id = (int) $data['id'];
39
+        $this->id = (int)$data['id'];
40 40
         $this->email = $data['email'];
41 41
         $this->status = $data['status'];
42 42
         $this->created = $data['created'];
Please login to merge, or discard this patch.
htdocs/src/Oc/Validator/Exception/ValidationException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     {
18 18
         $this->setViolations($violations);
19 19
 
20
-        parent::__construct((string) $this);
20
+        parent::__construct((string)$this);
21 21
     }
22 22
 
23 23
     public function __toString(): string
Please login to merge, or discard this patch.