Passed
Pull Request — master (#353)
by Arman
03:05
created
src/Module/Templates/DemoApi/src/Middlewares/CommentOwner.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function apply(Request $request, Response $response, Closure $next)
38 38
     {
39
-        $uuid = (string)route_param('uuid');
39
+        $uuid = (string) route_param('uuid');
40 40
 
41 41
         $request->set('uuid', $uuid);
42 42
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     private function registerCustomRules(): void
67 67
     {
68
-        $this->validator->addRule('commentOwner', function ($commentUuid) {
68
+        $this->validator->addRule('commentOwner', function($commentUuid) {
69 69
             $comment = ServiceFactory::get(CommentService::class)->getComment($commentUuid);
70 70
             return !$comment->isEmpty() && $comment->user_uuid === auth()->user()->uuid;
71 71
         });
Please login to merge, or discard this patch.
src/Module/Templates/DemoWeb/src/Middlewares/CommentOwner.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function apply(Request $request, Response $response, Closure $next)
38 38
     {
39
-        $uuid = (string)route_param('uuid');
39
+        $uuid = (string) route_param('uuid');
40 40
 
41 41
         $request->set('uuid', $uuid);
42 42
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     private function registerCustomRules(): void
67 67
     {
68
-        $this->validator->addRule('commentOwner', function ($commentUuid) {
68
+        $this->validator->addRule('commentOwner', function($commentUuid) {
69 69
             $comment = ServiceFactory::get(CommentService::class)->getComment($commentUuid);
70 70
             return !$comment->isEmpty() && $comment->user_uuid === auth()->user()->uuid;
71 71
         });
Please login to merge, or discard this patch.