Code Duplication    Length = 4-4 lines in 2 locations

src/PlaygroundGame/Controller/Frontend/PostVoteController.php 2 locations

@@ 511-514 (lines=4) @@
508
        if ($postId) {
509
            $postTarget = $sg->getPostVotePostMapper()->findById($postId);
510
            if ($postTarget) {
511
                foreach ($postTarget->getPostElements() as $element) {
512
                    $fbShareImage = $this->frontendUrl()->fromRoute('', array('channel' => ''), array('force_canonical' => true), false) . $element->getValue();
513
                    break;
514
                }
515
                
516
                $secretKey = strtoupper(substr(sha1(uniqid('pg_', true).'####'.time()), 0, 15));
517
                
@@ 669-672 (lines=4) @@
666
667
        $viewModel = $this->buildView($game);
668
    
669
        foreach ($post->getPostElements() as $element) {
670
            $fbShareImage = $this->frontendUrl()->fromRoute('', array('channel' => ''), array('force_canonical' => true), false) . $element->getValue();
671
            break;
672
        }
673
    
674
        $secretKey = strtoupper(substr(sha1(uniqid('pg_', true).'####'.time()), 0, 15));
675