Completed
Pull Request — master (#106)
by
unknown
22:56 queued 05:30
created
packages/Core/ConfigProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
             'middleware_pipeline' => [
51 51
                 // execute this middlweare on every /admin[*] path
52 52
                 'permission' => [
53
-                    'middleware' => [Middleware\AdminAuth::class],
53
+                    'middleware' => [ Middleware\AdminAuth::class ],
54 54
                     'priority'   => 100,
55 55
                     'path'       => '/admin'
56 56
                 ],
Please login to merge, or discard this patch.
packages/Core/Factory/Service/AdminUserServiceFactory.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 Core\Factory\Service;
5 5
 
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public function __invoke(ContainerInterface $container): AdminUserService
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 AdminUserService(
27 27
             new Bcrypt(),
Please login to merge, or discard this patch.
packages/Core/Factory/Service/MeetupApiServiceFactory.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 Core\Factory\Service;
5 5
 
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
      */
17 17
     public function __invoke(ContainerInterface $container): MeetupApiService
18 18
     {
19
-        $config = $container->get('config')['meetupApi'];
19
+        $config = $container->get('config')[ 'meetupApi' ];
20 20
 
21
-        return new MeetupApiService($config['key']);
21
+        return new MeetupApiService($config[ 'key' ]);
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
packages/Core/Middleware/AdminAuth.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
         if (!$user) {
55 55
             return $response->withStatus(302)->withHeader(
56 56
                 'Location',
57
-                $this->router->generateUri('auth', ['action' => 'login'])
57
+                $this->router->generateUri('auth', [ 'action' => 'login' ])
58 58
             );
59 59
         }
60 60
 
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.
packages/Newsletter/src/Web/Action/HandlePostActionFactory.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\Web\Action;
6 6
 
Please login to merge, or discard this patch.