Completed
Pull Request — master (#114)
by
unknown
30:05
created
packages/Article/src/ConfigProvider.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
         return [
12 12
             'templates' => [
13 13
                 'paths' => [
14
-                    'article' => [__DIR__ . '/../templates/article'],
14
+                    'article' => [ __DIR__ . '/../templates/article' ],
15 15
                 ],
16 16
             ],
17 17
 
@@ -51,49 +51,49 @@  discard block
 block discarded – undo
51 51
                     'name'            => 'admin.posts',
52 52
                     'path'            => '/admin/posts',
53 53
                     'middleware'      => Controller\PostController::class,
54
-                    'allowed_methods' => ['GET'],
54
+                    'allowed_methods' => [ 'GET' ],
55 55
                 ],
56 56
                 [
57 57
                     'name'            => 'admin.posts.action',
58 58
                     'path'            => '/admin/posts/:action/:id',
59 59
                     'middleware'      => Controller\PostController::class,
60
-                    'allowed_methods' => ['GET', 'POST'],
60
+                    'allowed_methods' => [ 'GET', 'POST' ],
61 61
                 ],
62 62
                 [
63 63
                     'name'            => 'admin.discussions',
64 64
                     'path'            => '/admin/discussions',
65 65
                     'middleware'      => Controller\DiscussionController::class,
66
-                    'allowed_methods' => ['GET', 'POST']
66
+                    'allowed_methods' => [ 'GET', 'POST' ]
67 67
                 ],
68 68
                 [
69 69
                     'name'            => 'admin.discussions.action',
70 70
                     'path'            => '/admin/discussions/:action/:id',
71 71
                     'middleware'      => Controller\DiscussionController::class,
72
-                    'allowed_methods' => ['GET', 'POST']
72
+                    'allowed_methods' => [ 'GET', 'POST' ]
73 73
                 ],
74 74
                 [
75 75
                     'name'            => 'admin.events',
76 76
                     'path'            => '/admin/events',
77 77
                     'middleware'      => Controller\EventController::class,
78
-                    'allowed_methods' => ['GET', 'POST']
78
+                    'allowed_methods' => [ 'GET', 'POST' ]
79 79
                 ],
80 80
                 [
81 81
                     'name'            => 'admin.events.action',
82 82
                     'path'            => '/admin/events/:action/:id',
83 83
                     'middleware'      => Controller\EventController::class,
84
-                    'allowed_methods' => ['GET', 'POST']
84
+                    'allowed_methods' => [ 'GET', 'POST' ]
85 85
                 ],
86 86
                 [
87 87
                     'name'            => 'admin.videos',
88 88
                     'path'            => '/admin/videos',
89 89
                     'middleware'      => Controller\VideoController::class,
90
-                    'allowed_methods' => ['GET', 'POST']
90
+                    'allowed_methods' => [ 'GET', 'POST' ]
91 91
                 ],
92 92
                 [
93 93
                     'name'            => 'admin.videos.action',
94 94
                     'path'            => '/admin/videos/:action/:id',
95 95
                     'middleware'      => Controller\VideoController::class,
96
-                    'allowed_methods' => ['GET', 'POST']
96
+                    'allowed_methods' => [ 'GET', 'POST' ]
97 97
                 ]
98 98
             ],
99 99
 
Please login to merge, or discard this patch.
packages/Article/src/Factory/Service/VideoServiceFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Article\Factory\Service;
5 5
 
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function __invoke(ContainerInterface $container): VideoService
23 23
     {
24
-        $config = $container->get('config')['upload'];
25
-        $upload = new Upload($config['public_path'], $config['non_public_path']);
24
+        $config = $container->get('config')[ 'upload' ];
25
+        $upload = new Upload($config[ 'public_path' ], $config[ 'non_public_path' ]);
26 26
 
27 27
         return new VideoService(
28 28
             $container->get(ArticleMapper::class),
Please login to merge, or discard this patch.
packages/Article/src/Factory/Service/PostServiceFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Article\Factory\Service;
5 5
 
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public function __invoke(ContainerInterface $container): PostService
22 22
     {
23
-        $config = $container->get('config')['upload'];
24
-        $upload = new Upload($config['public_path'], $config['non_public_path']);
23
+        $config = $container->get('config')[ 'upload' ];
24
+        $upload = new Upload($config[ 'public_path' ], $config[ 'non_public_path' ]);
25 25
 
26 26
         return new PostService(
27 27
             $container->get(ArticleMapper::class),
Please login to merge, or discard this patch.
packages/Article/src/Factory/Service/EventServiceFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@
 block discarded – undo
19 19
      */
20 20
     public function __invoke(ContainerInterface $container)
21 21
     {
22
-        $config = $container->get('config')['upload'];
23
-        $upload = new Upload($config['public_path'], $config['non_public_path']);
22
+        $config = $container->get('config')[ 'upload' ];
23
+        $upload = new Upload($config[ 'public_path' ], $config[ 'non_public_path' ]);
24 24
 
25 25
         return new EventService(
26 26
             $container->get(ArticleMapper::class),
Please login to merge, or discard this patch.
packages/Article/src/Factory/Controller/DiscussionFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Article\Factory\Controller;
5 5
 
Please login to merge, or discard this patch.
packages/Newsletter/src/Service/NewsletterService.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,14 +15,14 @@
 block discarded – undo
15 15
 
16 16
     public function registerNew($email)
17 17
     {
18
-        if(!filter_var($email, FILTER_VALIDATE_EMAIL)) {
18
+        if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
19 19
             throw new \Exception('Email is not valid!', 400);
20 20
         }
21 21
 
22
-        $current = $this->newsletterMapper->select(['email' => $email])->current();
22
+        $current = $this->newsletterMapper->select([ 'email' => $email ])->current();
23 23
 
24
-        if(!$current) {
25
-            return $this->newsletterMapper->insert(['email' => $email]);
24
+        if (!$current) {
25
+            return $this->newsletterMapper->insert([ 'email' => $email ]);
26 26
         }
27 27
     }
28 28
 }
Please login to merge, or discard this patch.
packages/Newsletter/src/Service/NewsletterServiceFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Newsletter\Service;
6 6
 
Please login to merge, or discard this patch.
packages/Newsletter/src/Mapper/NewsletterMapperFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Newsletter\Mapper;
6 6
 
Please login to merge, or discard this patch.
packages/Newsletter/src/Web/Action/HandlePostAction.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,14 +20,14 @@
 block discarded – undo
20 20
     {
21 21
         try {
22 22
             $data  = $request->getParsedBody();
23
-            $email = isset($data['email']) ? $data['email'] : null;
23
+            $email = isset($data[ 'email' ]) ? $data[ 'email' ] : null;
24 24
 
25 25
             $this->newsletterService->registerNew($email);
26 26
 
27
-            return new JsonResponse(['message' => 'Uspešno ste se prijavili.']);
27
+            return new JsonResponse([ 'message' => 'Uspešno ste se prijavili.' ]);
28 28
         }
29
-        catch(\Exception $e) {
30
-            return new JsonResponse(['message' => $e->getMessage()], $e->getCode());
29
+        catch (\Exception $e) {
30
+            return new JsonResponse([ 'message' => $e->getMessage() ], $e->getCode());
31 31
         }
32 32
     }
33 33
 }
Please login to merge, or discard this patch.