Code Duplication    Length = 6-6 lines in 4 locations

class/PublicWallUpdates.php 2 locations

@@ 424-429 (lines=6) @@
421
            $frU = $check->friendcheck($id, $data['uid_fk']);
422
            $USW = ['posts' => 0, 'comments' => 0];
423
424
            if ($helper->isUserAdmin() || $data['uid_fk'] == $id) {
425
                $USW    = ['posts' => 1, 'comments' => 1];
426
                $frU[0] = 2;
427
            } else {
428
                $USW = json_decode($swDB->getSettings($data['uid_fk']), true);
429
            }
430
431
            $wm['msg_id']          = $data['msg_id'];
432
            $wm['orimessage']      = (1 == $USW['posts'] || $profile >= Constants::PROFILE_HAS_BOTH) ? str_replace(["\r", "\n"], '', smallworld_stripWordsKeepUrl($data['message'])) : '';
@@ 472-477 (lines=6) @@
469
                $frC = $check->friendcheck($id, $cdata['uid_fk']);
470
                $USC = ['posts' => 0, 'comments' => 0];
471
472
                if ($helper->isUserAdmin() || $cdata['uid_fk'] == $id) {
473
                    $USC    = ['posts' => 1, 'comments' => 1];
474
                    $frC[0] = Constants::PROFILE_HAS_BOTH;
475
                } else {
476
                    $USC = json_decode($swDB->getSettings($cdata['uid_fk']), true);
477
                }
478
479
                $wc['msg_id_fk']       = $cdata['msg_id_fk'];
480
                $wc['com_id']          = $cdata['com_id'];

class/WallUpdates.php 2 locations

@@ 483-488 (lines=6) @@
480
            $frU = $check->friendcheck($id, $data['uid_fk']);
481
            $USW = ['posts' => 0, 'comments' => 0];
482
483
            if ($helper->isUserAdmin() || $data['uid_fk'] == $id) {
484
                $USW    = ['posts' => 1, 'comments' => 1];
485
                $frU[0] = 2;
486
            } else {
487
                $USW = json_decode($swDB->getSettings($data['uid_fk']), true);
488
            }
489
490
            $wm['msg_id']          = $data['msg_id'];
491
            $wm['orimessage']      = (1 == $USW['posts'] || $profile >= Constants::PROFILE_HAS_BOTH) ? str_replace(["\r", "\n"], '', smallworld_stripWordsKeepUrl($data['message'])) : '';
@@ 531-536 (lines=6) @@
528
                $frC = $check->friendcheck($id, $cdata['uid_fk']);
529
                $USC = ['posts' => 0, 'comments' => 0];
530
531
                if ($helper->isUserAdmin() || $cdata['uid_fk'] == $id) {
532
                    $USC    = ['posts' => 1, 'comments' => 1];
533
                    $frC[0] = Constants::PROFILE_HAS_BOTH;
534
                } else {
535
                    $USC = json_decode($swDB->getSettings($cdata['uid_fk']), true);
536
                }
537
538
                $wc['msg_id_fk']       = $cdata['msg_id_fk'];
539
                $wc['com_id']          = $cdata['com_id'];