Passed
Pull Request — development (#686)
by Thomas
06:49
created
htdocs/lib2/logic/statpic.class.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -9,6 +9,9 @@
 block discarded – undo
9 9
 
10 10
     public $reUser;
11 11
 
12
+    /**
13
+     * @param integer $nNewUserId
14
+     */
12 15
     public function __construct($nNewUserId)
13 16
     {
14 17
         $this->reUser = new rowEditor('user');
Please login to merge, or discard this patch.
htdocs/sitemap.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -27,6 +27,10 @@
 block discarded – undo
27 27
     return $aItems;
28 28
 }
29 29
 
30
+/**
31
+ * @param integer $parentId
32
+ * @param integer $sublevel
33
+ */
30 34
 function pAppendSites($parentId, $viewall, $sublevel, &$aItems)
31 35
 {
32 36
     global $opt;
Please login to merge, or discard this patch.
htdocs/src/Oc/Libse/Coordinate/CoordinateCoordinate.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -22,6 +22,10 @@
 block discarded – undo
22 22
         $this->longitude = $longitude;
23 23
     }
24 24
 
25
+    /**
26
+     * @param boolean $latHem
27
+     * @param boolean $lonHem
28
+     */
25 29
     public static function fromHemDegMin($latHem, $latDeg, $latMin, $lonHem, $lonDeg, $lonMin)
26 30
     {
27 31
         $latitude = self::hemDegMinToFloat($latHem, $latDeg, $latMin);
Please login to merge, or discard this patch.
htdocs/util2/cron/modules/autoarchive_caches.class.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -131,6 +131,9 @@
 block discarded – undo
131 131
         sql_free_result($rs);
132 132
     }
133 133
 
134
+    /**
135
+     * @param string $comment
136
+     */
134 137
     public function archiveCache($cache_id, $comment, $months = 0)
135 138
     {
136 139
         global $login, $translate;
Please login to merge, or discard this patch.
htdocs/adminreports.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
 /** @var Connection $connection */
25 25
 $connection = AppKernel::Container()->get(Connection::class);
26 26
 
27
-$id = (int) isset($_REQUEST['id']) ? $_REQUEST['id'] : 0;
28
-$rId = (int) isset($_REQUEST['rid']) ? $_REQUEST['rid'] : 0;
29
-$cacheId = (int) isset($_REQUEST['cacheid']) ? $_REQUEST['cacheid'] : 0;
30
-$ownerId = (int) isset($_REQUEST['ownerid']) ? $_REQUEST['ownerid'] : 0;
27
+$id = (int)isset($_REQUEST['id']) ? $_REQUEST['id'] : 0;
28
+$rId = (int)isset($_REQUEST['rid']) ? $_REQUEST['rid'] : 0;
29
+$cacheId = (int)isset($_REQUEST['cacheid']) ? $_REQUEST['cacheid'] : 0;
30
+$ownerId = (int)isset($_REQUEST['ownerid']) ? $_REQUEST['ownerid'] : 0;
31 31
 
32 32
 $reportData = $connection
33 33
     ->fetchAssoc(
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
         ['id' => $rId]
38 38
     );
39 39
 
40
-$reporterId = (int) $reportData['userid'];
41
-$adminId = (int) $reportData['adminid'];
40
+$reporterId = (int)$reportData['userid'];
41
+$adminId = (int)$reportData['adminid'];
42 42
 $age = $reportData['age'];
43 43
 
44 44
 if (isset($_REQUEST['savecomment'])) {
Please login to merge, or discard this patch.
htdocs/admins.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      ORDER BY username'
32 32
 );
33 33
 
34
-foreach($admins as &$admin) {
34
+foreach ($admins as &$admin) {
35 35
     $rights = [];
36 36
 
37 37
     if ($admin['admin'] & ADMIN_TRANSLATE) {
Please login to merge, or discard this patch.
htdocs/log.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,11 +3,9 @@
 block discarded – undo
3 3
  * for license information see LICENSE.md
4 4
  ***************************************************************************/
5 5
 
6
-use Oc\FieldNotes\Entity\FieldNote;
7 6
 use Oc\FieldNotes\Enum\LogType as FieldNotesLogType;
8 7
 use Oc\FieldNotes\Persistence\FieldNoteEntity;
9 8
 use Oc\FieldNotes\Persistence\FieldNoteService;
10
-use Oc\GeoCache\Entity\GeocacheLog;
11 9
 use Oc\GeoCache\Enum\GeoCacheType;
12 10
 use Oc\GeoCache\Enum\LogType as GeoCacheLogType;
13 11
 use Oc\GeoCache\Enum\NeedMaintenance;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 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) {
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
     // get log text editor mode (from form or from userprofile)
172 172
     // 1 = text; 2 = HTML; 3 = tinyMCE
173 173
     if (isset($_POST['descMode'])) {
174
-        $descMode = $_POST['descMode'] + 0;  // Ocprop: 2
174
+        $descMode = $_POST['descMode'] + 0; // Ocprop: 2
175 175
         if (($descMode < 1) || ($descMode > 3)) {
176 176
             $descMode = 3;
177 177
         }
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
             if (isset($_REQUEST['fieldnoteid']) && $_REQUEST['fieldnoteid']) {
314 314
                 sql(
315 315
                     'DELETE FROM field_note WHERE `id` = &1 AND `user_id` = &2',
316
-                    (int) $_REQUEST['fieldnoteid'],
316
+                    (int)$_REQUEST['fieldnoteid'],
317 317
                     $user->getUserId()
318 318
                 );
319 319
 
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
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     {
26 26
         $this->setViolations($violations);
27 27
 
28
-        parent::__construct((string) $this);
28
+        parent::__construct((string)$this);
29 29
     }
30 30
 
31 31
     /**
Please login to merge, or discard this patch.
htdocs/src/Oc/GeoCache/Persistence/GeoCacheLog/GeoCacheLogRepository.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -79,9 +79,9 @@  discard block
 block discarded – undo
79 79
     public function fetchOneBy(array $where = [])
80 80
     {
81 81
         $queryBuilder = $this->connection->createQueryBuilder()
82
-             ->select('*')
83
-             ->from(self::TABLE)
84
-             ->setMaxResults(1);
82
+                ->select('*')
83
+                ->from(self::TABLE)
84
+                ->setMaxResults(1);
85 85
 
86 86
         if (count($where) > 0) {
87 87
             foreach ($where as $column => $value) {
@@ -112,8 +112,8 @@  discard block
 block discarded – undo
112 112
     public function fetchBy(array $where = [])
113 113
     {
114 114
         $queryBuilder = $this->connection->createQueryBuilder()
115
-             ->select('*')
116
-             ->from(self::TABLE);
115
+                ->select('*')
116
+                ->from(self::TABLE);
117 117
 
118 118
         if (count($where) > 0) {
119 119
             foreach ($where as $column => $value) {
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
         if (count($where) > 0) {
87 87
             foreach ($where as $column => $value) {
88
-                $queryBuilder->andWhere($column . ' = ' .  $queryBuilder->createNamedParameter($value));
88
+                $queryBuilder->andWhere($column . ' = ' . $queryBuilder->createNamedParameter($value));
89 89
             }
90 90
         }
91 91
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
         if (count($where) > 0) {
119 119
             foreach ($where as $column => $value) {
120
-                $queryBuilder->andWhere($column . ' = ' .  $queryBuilder->createNamedParameter($value));
120
+                $queryBuilder->andWhere($column . ' = ' . $queryBuilder->createNamedParameter($value));
121 121
             }
122 122
         }
123 123
 
@@ -292,27 +292,27 @@  discard block
 block discarded – undo
292 292
     public function getEntityFromDatabaseArray(array $data)
293 293
     {
294 294
         $entity = new GeoCacheLogEntity();
295
-        $entity->id = (int) $data['id'];
295
+        $entity->id = (int)$data['id'];
296 296
         $entity->uuid = $data['uuid'];
297
-        $entity->node = (int) $data['node'];
297
+        $entity->node = (int)$data['node'];
298 298
         $entity->dateCreated = new DateTime($data['date_created']);
299 299
         $entity->entryLastModified = new DateTime($data['entry_last_modified']);
300 300
         $entity->lastModified = new DateTime($data['last_modified']);
301
-        $entity->okapiSyncbase = (int) $data['okapi_syncbase'];
301
+        $entity->okapiSyncbase = (int)$data['okapi_syncbase'];
302 302
         $entity->logLastModified = new DateTime($data['log_last_modified']);
303
-        $entity->cacheId = (int) $data['cache_id'];
304
-        $entity->userId = (int) $data['user_id'];
305
-        $entity->type = (int) $data['type'];
306
-        $entity->ocTeamComment = (bool) $data['oc_team_comment'];
303
+        $entity->cacheId = (int)$data['cache_id'];
304
+        $entity->userId = (int)$data['user_id'];
305
+        $entity->type = (int)$data['type'];
306
+        $entity->ocTeamComment = (bool)$data['oc_team_comment'];
307 307
         $entity->date = new DateTime($data['date']);
308 308
         $entity->orderDate = new DateTime($data['order_date']);
309
-        $entity->needsMaintenance = (bool) $data['needs_maintenance'];
310
-        $entity->listingOutdated = (bool) $data['listing_outdated'];
309
+        $entity->needsMaintenance = (bool)$data['needs_maintenance'];
310
+        $entity->listingOutdated = (bool)$data['listing_outdated'];
311 311
         $entity->text = $data['text'];
312
-        $entity->textHtml = (bool) $data['text_html'];
313
-        $entity->textHtmledit = (bool) $data['text_htmledit'];
314
-        $entity->ownerNotified = (bool) $data['owner_notified'];
315
-        $entity->picture = (int) $data['picture'];
312
+        $entity->textHtml = (bool)$data['text_html'];
313
+        $entity->textHtmledit = (bool)$data['text_htmledit'];
314
+        $entity->ownerNotified = (bool)$data['owner_notified'];
315
+        $entity->picture = (int)$data['picture'];
316 316
 
317 317
         return $entity;
318 318
     }
Please login to merge, or discard this patch.