Test Failed
Push — develop ( 9b573e...78dd5a )
by Stone
04:37 queued 12s
created
src/Controller/Trick/Admin/RevertHistoryTrickController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,13 +43,13 @@
 block discarded – undo
43 43
     public function revertHistory(Trick $trick, int $historyId, Request $request)
44 44
     {
45 45
         $submittedToken = $request->request->get('_token');
46
-        if (!$this->isCsrfTokenValid('revert-trick' . $historyId, $submittedToken)) {
46
+        if (!$this->isCsrfTokenValid('revert-trick'.$historyId, $submittedToken)) {
47 47
             throw new RedirectException($this->generateUrl('home'), 'Bad CSRF Token');
48 48
         }
49 49
         $version = $request->request->get('_version');
50 50
         $this->trickHistory->revertToHistory($trick->getId(), $version);
51 51
 
52
-        $this->addFlash(FlashMessageCategory::SUCCESS, 'Reverted ' . $trick->getName());
52
+        $this->addFlash(FlashMessageCategory::SUCCESS, 'Reverted '.$trick->getName());
53 53
         return $this->redirectToRoute('trick.show', [
54 54
             'id' => $trick->getId(),
55 55
             'slug' => $trick->getSlug(),
Please login to merge, or discard this patch.
src/History/TrickHistory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      * @param $version
39 39
      * Revert a trick to a history checkpoint.
40 40
      */
41
-    public function revertToHistory($id, $version){
41
+    public function revertToHistory($id, $version) {
42 42
         $trick = $this->em->find('App\Entity\Trick', $id);
43 43
         $this->repo->revert($trick, $version);
44 44
         $this->em->persist($trick);
Please login to merge, or discard this patch.